diff --git a/server/OntologyAPI.py b/server/OntologyAPI.py index 4a34087..f39022d 100644 --- a/server/OntologyAPI.py +++ b/server/OntologyAPI.py @@ -15,12 +15,11 @@ def recursivly_add_subclasses(super_class): output_obj = { "name": str(super_class).split(".")[-1], "otherInformation":[{ - "otherInfoID":"OntologyIRI", - "description":["Iri referencing the Ontology Class definition"], + "otherInfoID":"SemanticDescription", + "description":["URI referencing the Ontology Class definition"], "otherValue":[{ "valueString": super_class.iri, - "dataType":"Text", - "unitOfMeasure":"url", + "dataType":"uriReference", "key":str(super_class) }] }], diff --git a/server/RecipeAPI.py b/server/RecipeAPI.py index 1ab23c5..76ded6f 100644 --- a/server/RecipeAPI.py +++ b/server/RecipeAPI.py @@ -30,7 +30,7 @@ def get_all_recipe_capabilities(file_content): continue for otherInfo in otherInfos: otherInfoId = otherInfo.find(ns+'OtherInfoID') - if otherInfoId.text == "OntologyIRI": + if otherInfoId.text == "SemanticDescription": capabilities.append({ "ID": processElement.find(ns+'ID').text, "IRI":otherInfo.find(ns+'OtherValue').find(ns+'ValueString').text diff --git a/server/server.py b/server/server.py index be34e7f..5ddbe92 100644 --- a/server/server.py +++ b/server/server.py @@ -11,7 +11,7 @@ from RecipeAPI import recipe_api, get_all_recipe_capabilities from OntologyAPI import ontology_api -from AasAPI import aas_api, get_all_aasx_capabilities, get_aasx_id +from AasAPI import aas_api, get_all_aasx_capabilities, get_all_aas_capabilities, get_aasx_id ontologies = {} aas = {} @@ -195,7 +195,7 @@ def check_capabilities_complex(): for element in unique_recipe_capabilities: for filename in aasx_files: aasx = aasx_files[filename] - aasx_capabilities = get_all_aasx_capabilities(aasx) + aasx_capabilities = get_all_aas_capabilities(aasx) unique_aasx_capabilities = set(item['IRI'] for item in aasx_capabilities) if element in unique_aasx_capabilities: print("found capability: " + element) @@ -218,7 +218,7 @@ def check_capabilities_complex(): else: string = "There are no Capability IRIS in Recipe that can be realized by an given AAS." print(string) - return make_response(string, 400) + return make_response(string, 200)