Skip to content
Snippets Groups Projects
Commit d7c12f6f authored by Patrick Beyersdorffer's avatar Patrick Beyersdorffer
Browse files

small consistency fixes

parent 3a1cb54e
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,6 @@ co = rdflib.URIRef("http://www.semanticweb.org/beyersdo/ontologies/2022/10/AQM#C ...@@ -22,7 +22,6 @@ co = rdflib.URIRef("http://www.semanticweb.org/beyersdo/ontologies/2022/10/AQM#C
qa = rdflib.URIRef("http://www.semanticweb.org/beyersdo/ontologies/2022/10/AQM#QualityAttribute") qa = rdflib.URIRef("http://www.semanticweb.org/beyersdo/ontologies/2022/10/AQM#QualityAttribute")
vf = rdflib.URIRef("http://www.semanticweb.org/beyersdo/ontologies/2022/10/AQM#VariationFactor") vf = rdflib.URIRef("http://www.semanticweb.org/beyersdo/ontologies/2022/10/AQM#VariationFactor")
purposes = [a, c, es, im, ma, me, mo, pr, sp] purposes = [a, c, es, im, ma, me, mo, pr, sp]
measurement_purposes = [a, c, es, im, ma, me, mo, pr] measurement_purposes = [a, c, es, im, ma, me, mo, pr]
...@@ -48,22 +47,25 @@ def getAQM(conversion=True): ...@@ -48,22 +47,25 @@ def getAQM(conversion=True):
def createAQMSubgraphForConsensus(source, conversion=True): def createAQMSubgraphForConsensus(source, conversion=True):
""" """
This function shall enable the analysis of semantic equivalence of one quality model (source) with the others in the AQM. This function shall enable the analysis of semantic equivalence of one quality model (source) with the others in the AQM.
Thereby, different understandings about quality models are aligned resulting in a consensus about quality.
If the AQM contains domain standards with regulations on the desired quality, the fulfillment of this regulations can be verified.
A subgraph of the AQM is needed, containing the requested quality model (source) and quality attributes of other quality models, A subgraph of the AQM is needed, containing the requested quality model (source) and quality attributes of other quality models,
that are aligned via the isEquivalent object property. that are aligned via the isEquivalent object property.
Note: The source needs to be a string representation of the annotation property "Citation" in the AQM (currently in AlphaBixTex format) Note: The source needs to be a string representation of the annotation property "Citation" in the AQM (currently in AlphaBixTex format)
""" """
#Load the current backup of the AQM and create an empty subgraph #Load current backup of the AQM and create empty subgraph
aqm = rdflib.Graph(base="http://www.semanticweb.org/beyersdo/ontologies/2022/10/AQM#") aqm = rdflib.Graph(base="http://www.semanticweb.org/beyersdo/ontologies/2022/10/AQM#")
aqm.parse(os.path.join(str(os.getcwd()) + "\\application\\static\\data\\AQM.owl")) aqm.parse(os.path.join(str(os.getcwd()) + "\\application\\static\\data\\AQM.owl"))
subgraph = rdflib.Graph() subgraph = rdflib.Graph()
#Iterate through all triples with the annotation property "Citation" and having the value of the requested source. #Iterate through all triples with the annotation property "Citation" having the value of the requested source.
for s, p, o in aqm.triples((None, ci, rdflib.Literal(source, lang="en"))): for s, p, o in aqm.triples((None, ci, rdflib.Literal(source, lang="en"))):
subgraph.add((s,p,o)) #subgraph now contains all quality attributes / variation factors of the requested quality model subgraph.add((s,p,o)) #subgraph now contains all quality attributes of the requested quality model
#For given quality attribute / variation factor, add properties (e.g. subClassOf or annotations) #For given quality attribute / variation factor, add properties (e.g. subClassOf or annotations)
for s1, p1, o1 in aqm.triples((s, None, None)): for s1, p1, o1 in aqm.triples((s, None, None)):
...@@ -185,7 +187,6 @@ def createAQMSubgraphForMeasurement(source): ...@@ -185,7 +187,6 @@ def createAQMSubgraphForMeasurement(source):
#Check if object property has range in measurement_purposes #Check if object property has range in measurement_purposes
if o2 in measurement_purposes: if o2 in measurement_purposes:
print(str(s2))
subgraph.add((s2, p2, o2)) subgraph.add((s2, p2, o2))
subgraph.add((s1, p1, o1)) subgraph.add((s1, p1, o1))
......
No preview for this file type
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment