All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ament.OntologyBundle.1.0.2.source-code.replaceBlankAxiomAnnotation.update Maven / Gradle / Ivy

Go to download

A Gradle plugin to package (or bundle) an OWL ontology in a jar to make it easy to use in Java-based software projects. Copyright © 2023, 2024 RTX BBN Technologies

There is a newer version: 1.0.3
Show newest version
prefix obo:   
prefix owl:   
prefix provo: 
prefix rdfs:  

# Works against axiom annotations found in BFO, but likely not others.

delete {
	?axiom a owl:Axiom ;
		owl:annotatedSource ?annSrc ;
		owl:annotatedProperty ?annProp ;
		owl:annotatedTarget ?annTgt ;
		obo:IAO_0010000 ?oboAxiomLabel ;
		provo:dm ?provDataModelSection ;
		provo:definition ?provDefinition ;
		rdfs:seeAlso ?seeAlso ;
		rdfs:comment ?comment .
} insert {
	?axiomIri a owl:Axiom ;
		owl:annotatedSource ?annSrc ;
		owl:annotatedProperty ?annProp ;
		owl:annotatedTarget ?annTgt ;
		obo:IAO_0010000 ?oboAxiomLabel ;
		provo:dm ?provDataModelSection ;
		provo:definition ?provDefinition ;
		rdfs:seeAlso ?seeAlso ;
		rdfs:comment ?comment .
} where {
	?axiom a owl:Axiom ;
		owl:annotatedSource ?annSrc ;
		owl:annotatedProperty ?annProp ;
		owl:annotatedTarget ?annTgt .
	optional { ?axiom obo:IAO_0010000 ?oboAxiomLabel . }
	optional { ?axiom provo:dm ?provDataModelSection . }
	optional { ?axiom provo:definition ?provDefinition . }
	optional { ?axiom rdfs:seeAlso ?seeAlso . }
	optional { ?axiom rdfs:comment ?comment . }
	filter ( isblank(?axiom)
		&& !isblank(?annSrc)
		&& !isblank(?annProp)
		&& !isblank(?annTgt)
		&& (!bound(?oboAxiomLabel) || !isblank(?oboAxiomLabel))
		&& (!bound(?provDataModelSection) || !isblank(?provDataModelSection))
		&& (!bound(?provDefinition) || !isblank(?provDefinition))
		&& (!bound(?seeAlso) || !isblank(?seeAlso))
		&& (!bound(?comment) || !isblank(?comment)) )
	bind (?_fillNS as ?fillNS)
	bind ( concat(str(?annSrc), "\n", str(?annProp), "\n", str(?annTgt), "\n",
		if(bound(?oboAxiomLabel), str(?oboAxiomLabel), ""), "\n",
		if(bound(?provDataModelSection), str(?provDataModelSection), ""), "\n",
		if(bound(?provDefinition), str(?provDefinition), ""), "\n",
		if(bound(?seeAlso), str(?seeAlso), ""), "\n",
		if(bound(?comment), str(?comment), "")) as ?toHash )
	bind ( iri(concat(str(?fillNS), "z", sha256(?toHash))) as ?axiomIri )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy