rule.owlrllite.rul Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of corese-core Show documentation
Show all versions of corese-core Show documentation
Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1
Query and Update.
]>
CONSTRUCT {
owl:Thing a owl:Class .
owl:Nothing a owl:Class .
}
WHERE {}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:arg1 ?x ; sp:arg2 ?y .
_:b0 sp:violationPath owl:sameAs .
_:b0 rdfs:label "Violates owl:differentFrom" .
}
WHERE {
?x owl:sameAs ?y .
?x owl:differentFrom ?y .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationRoot ?x .
_:b0 sp:arg1 ?zi ; sp:arg2 ?zj .
_:b0 rdfs:label "Violation of owl:AllDifferent" .
}
WHERE {
?x a owl:AllDifferent .
?x owl:members ?list1 .
?list1 rdf:rest* ?list2 .
?list2 rdf:first ?zi .
?list2 rdf:rest+ ?list3 .
?list3 rdf:first ?zj .
?zi owl:sameAs ?zj .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationRoot ?x .
_:b0 rdfs:label "Violation of owl:AllDifferent" .
_:b0 sp:arg1 ?zi ; sp:arg2 ?zj .
}
WHERE {
?x a owl:AllDifferent .
?x owl:distinctMembers ?list1 .
?list1 rdf:rest* ?list2 .
?list2 rdf:first ?zi .
?list2 rdf:rest+ ?list3 .
?list3 rdf:first ?zj .
?zi owl:sameAs ?zj .
}
CONSTRUCT {
?x a ?c .
}
WHERE {
?p rdfs:domain ?c .
?x ?p ?y .
}
CONSTRUCT {
?y a ?c .
}
WHERE {
?p rdfs:range ?c .
?x ?p ?y . filter(! isLiteral(?y))
}
CONSTRUCT {
?y1 owl:sameAs ?y2 .
}
WHERE {
?p a owl:FunctionalProperty .
?x ?p ?y1 .
?x ?p ?y2 .
FILTER (?y1 != ?y2) .
}
CONSTRUCT {
?x1 owl:sameAs ?x2 .
}
WHERE {
?p a owl:InverseFunctionalProperty .
?x1 ?p ?y .
?x2 ?p ?y .
FILTER (?x1 != ?x2) .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationRoot ?x .
_:b0 sp:violationPath ?p .
_:b0 rdfs:label "Irreflexive property" .
}
WHERE {
?p a owl:IrreflexiveProperty .
?x ?p ?x .
}
CONSTRUCT {
?y ?p ?x .
}
WHERE {
?p a owl:SymmetricProperty .
?x ?p ?y .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationPath ?p .
_:b0 rdfs:label "Antisymmetric property" .
_:b0 sp:arg1 ?x ; sp:arg2 ?y .
}
WHERE {
?p a owl:AsymmetricProperty .
?x ?p ?y .
?y ?p ?x .
}
CONSTRUCT {
?x ?p ?z .
}
WHERE {
?p a owl:TransitiveProperty .
?x ?p ?y .
?y ?p ?z .
}
CONSTRUCT {
?x ?p2 ?y .
}
WHERE {
?p1 rdfs:subPropertyOf ?p2 . filter(?p1 != ?p2)
?x ?p1 ?y .
}
CONSTRUCT {
?u ?p ?v .
}
WHERE {
{
select ?p
(group_concat(concat('<', ?pi, '>'); separator = '/') as ?exp)
(concat('select * where { ?u ', ?exp, ' ?v }') as ?query)
where {
?p owl:propertyChainAxiom ?x .
?x rdf:rest*/rdf:first ?pi
}
group by ?p
}
filter bound(?p)
bind(unnest(kg:sparql(?query)) as (?u, ?v))
}
CONSTRUCT {
?x ?p2 ?y .
}
WHERE {
?p1 owl:equivalentProperty ?p2 . filter(?p1 != ?p2)
?x ?p1 ?y .
}
CONSTRUCT {
?x ?p1 ?y .
}
WHERE {
?p1 owl:equivalentProperty ?p2 . filter(?p1 != ?p2)
?x ?p2 ?y .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationPath ?p1, ?p2 .
_:b0 rdfs:label "Property declared disjoint with" .
_:b0 sp:arg1 ?x ; sp:arg2 ?y .
}
WHERE {
?p1 owl:propertyDisjointWith ?p2 .
?x ?p1 ?y .
?x ?p2 ?y .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationRoot ?x .
_:b0 sp:violationPath ?pi .
_:b0 rdfs:label "Violation of owl:AllDisjointProperties" .
_:b0 sp:arg1 ?u ; sp:arg2 ?v .
}
WHERE {
?x a owl:AllDisjointProperties .
?x owl:members ?list1 .
?list1 rdf:rest* ?list2 .
?list2 rdf:first ?pi .
?list2 rdf:rest+ ?list3 .
?list3 rdf:first ?pj .
?u ?pi ?v .
?u ?pj ?v .
}
CONSTRUCT {
?y ?p2 ?x .
}
WHERE {
?p1 owl:inverseOf ?p2 .
?x ?p1 ?y .
}
CONSTRUCT {
?y ?p1 ?x .
}
WHERE {
?p1 owl:inverseOf ?p2 .
?x ?p2 ?y .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationPath ?p .
_:b0 rdfs:label "Negative Property Assertion" .
_:b0 sp:arg1 ?i1 ; sp:arg2 ?i2 .
}
WHERE {
?x owl:sourceIndividual ?i1 .
?x owl:assertionProperty ?p .
?x owl:targetIndividual ?i2 .
?i1 ?p ?i2 .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationPath ?p .
_:b0 rdfs:label "Negative Property Assertion" .
_:b0 sp:arg1 ?i ; sp:arg2 ?lt .
}
WHERE {
?x owl:sourceIndividual ?i .
?x owl:assertionProperty ?p .
?x owl:targetValue ?lt .
?i ?p ?lt .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationRoot ?x .
_:b0 rdfs:label "There exists an instance of owl:Nothing" .
}
WHERE {
?x a owl:Nothing .
}
CONSTRUCT {
?y a ?c .
}
WHERE {
?c owl:intersectionOf ?x .
?x rdf:first ?f
?y a ?f
filter not exists {
?x rdf:rest+/rdf:first ?ci
filter not exists { ?y a ?ci }
}
}
CONSTRUCT {
?y a ?ci .
}
WHERE {
?c owl:intersectionOf ?x .
?x rdf:rest*/rdf:first ?ci .
?y a ?c .
}
CONSTRUCT {
?y a ?c .
}
WHERE {
?c owl:unionOf ?x .
?x rdf:rest*/rdf:first ?ci .
?y a ?ci .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationRoot ?x .
_:b0 rdfs:label "ComplementOf Violation" .
_:b0 sp:arg1 ?c1 .
_:b0 sp:arg2 ?c2 .
}
WHERE {
?c1 owl:complementOf ?c2 .
?x a ?c1 .
?x a ?c2 .
}
CONSTRUCT {
?u a ?x .
}
WHERE {
?x owl:someValuesFrom ?y .
?x owl:onProperty ?p .
?u ?p ?v .
?v a ?y .
}
CONSTRUCT {
?u a ?x .
}
WHERE {
?x owl:someValuesFrom owl:Thing .
?x owl:onProperty ?p .
?u ?p ?v .
}
CONSTRUCT {
?v a ?y .
}
WHERE {
?x owl:allValuesFrom ?y .
?x owl:onProperty ?p .
?u a ?x .
?u ?p ?v .
}
CONSTRUCT {
?u ?p ?y .
}
WHERE {
?x owl:hasValue ?y .
?x owl:onProperty ?p .
?u a ?x .
}
CONSTRUCT {
?u a ?x .
}
WHERE {
?x owl:hasValue ?y .
?x owl:onProperty ?p .
?u ?p ?y .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationRoot ?x .
_:b0 sp:violationPath ?p .
_:b0 rdfs:label "owl:maxCardinality of 0" .
_:b0 sp:arg1 ?u ; sp:arg2 ?u .
}
WHERE {
?x owl:maxCardinality "0"^^xsd:nonNegativeInteger .
?x owl:onProperty ?p .
?u a ?x .
?u ?p ?y .
}
CONSTRUCT {
?y1 owl:sameAs ?y2 .
}
WHERE {
?x owl:maxCardinality "1"^^xsd:nonNegativeInteger .
?x owl:onProperty ?p .
?u a ?x .
?u ?p ?y1 .
?u ?p ?y2 .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationRoot ?c .
_:b0 sp:violationPath ?p .
_:b0 rdfs:label "Maximum qualified cardinality of 0" .
_:b0 sp:arg1 ?u ; sp:arg2 ?y .
}
WHERE {
?x owl:maxQualifiedCardinality "0"^^xsd:nonNegativeInteger .
?x owl:onProperty ?p .
?x owl:onClass ?c .
?u a ?x .
?u ?p ?y .
?y a ?c .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationRoot owl:Thing .
_:b0 sp:violationPath ?p .
_:b0 rdfs:label "Qualified max cardinality 0" .
_:b0 sp:arg1 ?u ; sp:arg2 ?y .
}
WHERE {
?x owl:maxQualifiedCardinality "0"^^xsd:nonNegativeInteger .
?x owl:onProperty ?p .
?x owl:onClass owl:Thing .
?u a ?x .
?u ?p ?y .
}
CONSTRUCT {
?y1 owl:sameAs ?y2 .
}
WHERE {
?x owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger .
?x owl:onProperty ?p .
?x owl:onClass ?c .
?u a ?x .
?u ?p ?y1 .
?y1 a ?c .
?u ?p ?y2 .
?y2 a ?c .
}
CONSTRUCT {
?y1 owl:sameAs ?y2 .
}
WHERE {
?x owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger .
?x owl:onProperty ?p .
?x owl:onClass owl:Thing .
?u a ?x .
?u ?p ?y1 .
?u ?p ?y2 .
}
CONSTRUCT {
?yi a ?c .
}
WHERE {
?c owl:oneOf ?x .
?x rdf:rest*/rdf:first ?yi .
filter (! isLiteral(?yi))
}
CONSTRUCT {
?x a ?c2 .
}
WHERE {
?c1 owl:equivalentClass ?c2 . filter(?c1 != ?c2)
?x a ?c1 .
}
CONSTRUCT {
?x a ?c1 .
}
WHERE {
?c1 owl:equivalentClass ?c2 . filter(?c1 != ?c2)
?x a ?c2 .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationRoot ?x .
_:b0 rdfs:label "Shared instance of disjoint classes" .
_:b0 sp:arg1 ?c1 ;
sp:arg2 ?c2
}
WHERE {
?c1 owl:disjointWith ?c2 .
?x a ?c1 .
?x a ?c2 .
}
prefix sp: <http://spinrdf.org/sp#>
CONSTRUCT {
_:b0 a sp:ConstraintViolation .
_:b0 sp:violationRoot ?x .
_:b0 rdfs:label "Shared instance of classes from an AllDisjointClasses block" .
_:b0 sp:arg1 ?ci ;
sp:arg2 ?cj
}
WHERE {
?y a owl:AllDisjointClasses .
?y owl:members ?list1 .
?list1 rdf:rest* ?list2 .
?list2 rdf:first ?ci .
?list2 rdf:rest+ ?list3 .
?list3 rdf:first ?cj .
?x a ?ci .
?x a ?cj .
}
CONSTRUCT {
?c rdfs:subClassOf ?c .
?c owl:equivalentClass ?c .
?c rdfs:subClassOf owl:Thing .
owl:Nothing rdfs:subClassOf ?c .
}
WHERE {
?c a owl:Class .
}
CONSTRUCT {
?c1 rdfs:subClassOf ?c2 .
?c2 rdfs:subClassOf ?c1 .
}
WHERE {
?c1 owl:equivalentClass ?c2 . filter(?c1 != ?c2)
}
CONSTRUCT {
?c rdfs:subClassOf ?ci .
}
WHERE {
?c owl:intersectionOf ?x .
?x rdf:rest*/rdf:first ?ci .
}
CONSTRUCT {
?ci rdfs:subClassOf ?c .
}
WHERE {
?c owl:unionOf ?x .
?x rdf:rest*/rdf:first ?ci .
}
CONSTRUCT {
?c1 owl:equivalentClass ?c2 .
}
WHERE {
?c1 rdfs:subClassOf ?c2 . filter(?c1 != ?c2)
?c2 rdfs:subClassOf ?c1 .
}
CONSTRUCT {
?p rdfs:subPropertyOf ?p .
?p owl:equivalentProperty ?p .
}
WHERE {
?p a owl:ObjectProperty .
}
CONSTRUCT {
?p owl:equivalentProperty ?p .
}
WHERE {
?p a owl:DatatypeProperty .
}
CONSTRUCT {
?p1 rdfs:subPropertyOf ?p2 .
?p2 rdfs:subPropertyOf ?p1 .
}
WHERE {
?p1 owl:equivalentProperty ?p2 . filter(?p1 != ?p2)
}
CONSTRUCT {
?p1 owl:equivalentProperty ?p2 .
}
WHERE {
?p1 rdfs:subPropertyOf ?p2 . filter(?p1 != ?p2)
?p2 rdfs:subPropertyOf ?p1 .
}
CONSTRUCT {
?p1 rdfs:subPropertyOf ?p3 .
}
WHERE {
?p1 rdfs:subPropertyOf ?p2 .
?p2 rdfs:subPropertyOf ?p3 .
}
CONSTRUCT {
?p rdfs:domain ?c2 .
}
WHERE {
?p rdfs:domain ?c1 .
?c1 rdfs:subClassOf ?c2 . filter(?c1 != ?c2)
}
CONSTRUCT {
?p1 rdfs:domain ?c .
}
WHERE {
?p2 rdfs:domain ?c .
?p1 rdfs:subPropertyOf ?p2 . filter(?p1 != ?p2)
}
CONSTRUCT {
?p rdfs:range ?c2 .
}
WHERE {
?p rdfs:range ?c1 .
?c1 rdfs:subClassOf ?c2 . filter(?c1 != ?c2)
}
CONSTRUCT {
?p1 rdfs:range ?c .
}
WHERE {
?p2 rdfs:range ?c .
?p1 rdfs:subPropertyOf ?p2 . filter(?p1 != ?p2)
}
CONSTRUCT {
?c1 rdfs:subClassOf ?c2 .
}
WHERE {
?p1 rdfs:subPropertyOf ?p2 . filter(?p1 != ?p2)
?c1 owl:hasValue ?i .
?c1 owl:onProperty ?p1 .
?c2 owl:hasValue ?i .
?c2 owl:onProperty ?p2 .
}
CONSTRUCT {
?c1 rdfs:subClassOf ?c2 .
}
WHERE {
#here
?y1 rdfs:subClassOf ?y2 . filter(?y1 != ?y2)
?c1 owl:someValuesFrom ?y1 .
?c1 owl:onProperty ?p .
?c2 owl:someValuesFrom ?y2 .
?c2 owl:onProperty ?p .
}
CONSTRUCT {
?c1 rdfs:subClassOf ?c2 .
}
WHERE {
?p1 rdfs:subPropertyOf ?p2 . filter(?p1 != ?p2)
?c1 owl:someValuesFrom ?y .
?c1 owl:onProperty ?p1 .
?c2 owl:someValuesFrom ?y .
?c2 owl:onProperty ?p2 .
}
CONSTRUCT {
?c1 rdfs:subClassOf ?c2 .
}
WHERE {
?y1 rdfs:subClassOf ?y2 . filter(?y1 != ?y2)
?c1 owl:allValuesFrom ?y1 .
?c1 owl:onProperty ?p .
?c2 owl:allValuesFrom ?y2 .
?c2 owl:onProperty ?p .
}
CONSTRUCT {
?c2 rdfs:subClassOf ?c1 .
}
WHERE {
?p1 rdfs:subPropertyOf ?p2 . filter(?p1 != ?p2)
?c1 owl:allValuesFrom ?y .
?c1 owl:onProperty ?p1 .
?c2 owl:allValuesFrom ?y .
?c2 owl:onProperty ?p2 .
}
CONSTRUCT {
?c1 rdfs:subClassOf ?c3 .
}
WHERE {
?c1 rdfs:subClassOf ?c2 .
?c2 rdfs:subClassOf ?c3 .
}
CONSTRUCT {
?x a ?c2 .
}
WHERE {
?x a ?c1 .
?c1 rdfs:subClassOf ?c2
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy