public static boolean isMinCardinalityQRestriction( Node node, EnhGraph eg ) { // node will support being a QualifiedRestriction facet if it has rdf:type owl:Restriction or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, MinCardinalityQRestriction.class ); }
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an InverseFunctionalProperty facet if it has rdf:type owl:InverseFunctionalProperty or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, InverseFunctionalProperty.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an Individual facet if it is a URI node or bNode Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, Individual.class ); } };
public static boolean isMaxCardinalityQRestriction( Node node, EnhGraph eg ) { // node will support being a QualifiedRestriction facet if it has rdf:type owl:Restriction or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, MaxCardinalityQRestriction.class ); }
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an TransitiveProperty facet if it has rdf:type owl:TransitiveProperty or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, TransitiveProperty.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an DatatypeProperty facet if it has rdf:type owl:DatatypeProperty or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, DatatypeProperty.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being a CardinalityRestriction facet if it has rdf:type owl:Restriction or equivalent // and the combination of owl:onProperty and owl:cardinality (or equivalents) Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, CardinalityRestriction.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an AnnotationProperty facet if it has rdf:type owl:AnnotationProperty or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, AnnotationProperty.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an ObjectProperty facet if it has rdf:type owl:ObjectProperty or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, ObjectProperty.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an OntProperty facet if it has rdf:type owl:Property or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, OntProperty.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being a HasValueRestriction facet if it has rdf:type owl:Restriction or equivalent // and the combination of owl:onProperty and owl:hasValue (or equivalents) Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, HasValueRestriction.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an Ontology facet if it has rdf:type owl:Ontology or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, Ontology.class ); } };
public static boolean isCardinalityQRestriction( Node node, EnhGraph eg ) { // node will support being a QualifiedRestriction facet if it has rdf:type owl:Restriction or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, CardinalityQRestriction.class ); }
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an OntClass facet if it has rdf:type owl:Class or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, OntClass.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an DataRange facet if it has rdf:type owl:Datarange and is a bNode Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, DataRange.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being a SomeValuesFromRestriction facet if it has rdf:type owl:Restriction or equivalent // and the combination of owl:onProperty and owl:someValuesFrom (or equivalents) Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, SomeValuesFromRestriction.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an IntersectionClass facet if it has rdf:type owl:Class and an owl:intersectionOf statement (or equivalents) Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, OntClass.class ) && AbstractProfile.containsSome( eg, node, profile.INTERSECTION_OF() ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an UnionClass facet if it has rdf:type owl:Class and an owl:unionOf statement (or equivalents) Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; Property union = (profile == null) ? null : profile.UNION_OF(); return (profile != null) && profile.isSupported( node, eg, OntClass.class ) && union != null && eg.asGraph().contains( node, union.asNode(), Node.ANY ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an EnumeratedClass facet if it has rdf:type owl:Class and an owl:oneOf statement (or equivalents) Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, OntClass.class ) && eg.asGraph().contains( node, profile.ONE_OF().asNode(), Node.ANY ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an ComplementClass facet if it has rdf:type owl:Class and an owl:complementOf statement (or equivalents) Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; Property comp = (profile == null) ? null : profile.COMPLEMENT_OF(); return (profile != null) && profile.isSupported( node, eg, OntClass.class ) && comp != null && eg.asGraph().contains( node, comp.asNode(), Node.ANY ); } };