GraphDB's rule language supports inference and consistency checking rules. You can rewrite the same published Integrity Validation Constraints (ICV) using the GraphDB's PIE syntax like:
Managers must be employees
A more generic version of this rule is to replace the "RDFS range" inference rule:
Id: prp_rng
a <rdfs:range> b
c a d
------------------------------------
d <rdf:type> b
with the consistency checking equivalent:
Consistency: prp_rng_constraint
a <rdf:type> b
a <rdfs:range> c [Constraint b != c]
------------------------------------
If a rule with an empty consequence fires, it will generate a validation error.
Only employees can have an SSN
I would express the rule in a more generic way like that every type must have at least one property:
Consistency: min_cardinality
a <owl:minCardinalityConstraint> "1"^^xsd:nonNegativeInteger
a <owl:onType> b
c <rdf:type> b
------------------------------------
c a y
and then state in the ontology:
INSERT DATA {
:ssn owl:minCardinalityConstraint "1"^^xsd:nonNegativeInteger;
owl:onType :Employee.
};
A rule with consequence indicates that the statement must exist in the repository if the rule fires.
You can check more examples in the built-in ruleset.