@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 ); } };
public void testShortestPath6() { Property p = m_model.createProperty( NS + "p" ); Property q = m_model.createProperty( NS + "q" ); // a - b - a by q // tests loop detection m_a.addProperty( q, m_b ); m_b.addProperty( q, m_a ); assertNull( OntTools.findShortestPath( m_model, m_a, m_c, new OntTools.PredicatesFilter( new Property[] {p,q} ) ) ); }
public void testShortestPath7() { Property p = m_model.createProperty( NS + "p" ); Property q = m_model.createProperty( NS + "q" ); // a - d - e - f by p and q m_a.addProperty( p, m_d ); m_d.addProperty( q, m_e ); m_d.addProperty( q, m_b ); m_e.addProperty( p, m_f ); testPath( OntTools.findShortestPath( m_model, m_a, m_f, new OntTools.PredicatesFilter( new Property[] {p,q} ) ), new Property[] {p,q,p} ); }
@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 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 an AllDifferent facet if it has rdf:type owl:AllDifferent or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, AllDifferent.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 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 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 ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being a MinCardinalityRestriction 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, MinCardinalityRestriction.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 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 SymmetricProperty facet if it has rdf:type owl:SymmetricProperty or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, SymmetricProperty.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an FunctionalProperty facet if it has rdf:type owl:FunctionalProperty or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, FunctionalProperty.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being a MinCardinalityRestriction 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, MinCardinalityRestriction.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being a MaxCardinalityRestriction 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, MaxCardinalityRestriction.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being an SymmetricProperty facet if it has rdf:type owl:SymmetricProperty or equivalent Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, SymmetricProperty.class ); } };
@Override public boolean canWrap( Node node, EnhGraph eg ) { // node will support being a AllValuesFromRestriction facet if it has rdf:type owl:Restriction or equivalent // and the combination of owl:onProperty and owl:allValuesFrom (or equivalents) Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; return (profile != null) && profile.isSupported( node, eg, AllValuesFromRestriction.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 an Restriction 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, Restriction.class ); } };