Exemplo n.º 1
0
def run_pa2checker(annotations):
    pa2checker.revert_checker_source()

    for annotation, classes in annotations.iteritems():
        pa2checker.create_type_annotation(annotation)
        pa2checker.update_ontology_utils(annotation, classes)
    pa2checker.recompile_checker_framework()
Exemplo n.º 2
0
def run_pa2checker(ontology_values):
    pa2checker.revert_checker_source()

    for ontology_value, classes in ontology_values.iteritems():
        pa2checker.insert_ontology_value(ontology_value)
        pa2checker.update_ontology_utils(ontology_value, classes)
    common.recompile_checker_framework()
Exemplo n.º 3
0
def run_pa2checker(annotations):
  pa2checker.revert_checker_source()

  for annotation, classes in annotations.iteritems():
    pa2checker.create_type_annotation(annotation)
    pa2checker.update_ontology_utils(annotation, classes)
    pa2checker.recompile_checker_framework()
Exemplo n.º 4
0
def type_mappings_to_rules(json_file):
    with open(json_file) as data_file:
        data = json.load(data_file)

    for mapping in data["type_mappings"]:
        ontology_value = mapping["ontology_value"]
        java_types = mapping["java_types"]
        pa2checker.insert_ontology_value(ontology_value)
        pa2checker.update_ontology_utils(ontology_value, java_types)

    common.recompile_checker_framework()