/** * <p>Answer true if this property is a transitive property</p> * @return True if this this property has an <code>rdf:type</code> that defines it as a transitive property. */ @Override public boolean isTransitiveProperty() { return hasRDFType( getProfile().TRANSITIVE_PROPERTY(), "TRANSITIVE_PROPERTY", false ); }
/** * <p>Answer a facet of this property as a transitive property, adding additional information to the model if necessary.</p> * @return This property, but converted to a TransitiveProperty facet */ @Override public TransitiveProperty convertToTransitiveProperty() { return convertToType( getProfile().TRANSITIVE_PROPERTY(), "TRANSITIVE_PROPERTY", TransitiveProperty.class ); }
/** * <p> * Answer an iterator that ranges over the transitive property resources in this model, i.e. * the resources with <code>rdf:type TransitiveProperty</code> or equivalent. * </p> * <p> * Specifically, the resources in this iterator will those whose type corresponds * to the value given in the ontology vocabulary associated with this model: see * {@link Profile#TRANSITIVE_PROPERTY}. * </p> * * @return An iterator over transitive property resources. */ @Override public ExtendedIterator<TransitiveProperty> listTransitiveProperties() { checkProfileEntry( getProfile().TRANSITIVE_PROPERTY(), "TRANSITIVE_PROPERTY" ); return findByTypeAs( getProfile().TRANSITIVE_PROPERTY(), TransitiveProperty.class ) .filterKeep( new UniqueFilter<TransitiveProperty>()); }
/** * <p>Answer a resource representing a transitive property, which is optionally * also functional. <strong>Note:</strong> although it is permitted in OWL full * to have functional transitive properties, it makes the language undecideable. * Functional transitive properties are not permitted in OWL Lite or OWL DL.</p> * @param uri The uri for the property. May not be null. * @param functional If true, the property is also functional * @return An TransitiveProperty resource, optionally also functional. */ @Override public TransitiveProperty createTransitiveProperty( String uri, boolean functional ) { checkProfileEntry( getProfile().TRANSITIVE_PROPERTY(), "TRANSITIVE_PROPERTY" ); TransitiveProperty p = createOntResource( TransitiveProperty.class, getProfile().TRANSITIVE_PROPERTY(), uri ); if (functional) { checkProfileEntry( getProfile().FUNCTIONAL_PROPERTY(), "FUNCTIONAL_PROPERTY" ); p.addProperty( RDF.type, getProfile().FUNCTIONAL_PROPERTY() ); } return p; }
pi = pi.andThen( mOnt.listStatements( null, RDF.type, prof.SYMMETRIC_PROPERTY() ) ); if (prof.TRANSITIVE_PROPERTY() != null) { pi = pi.andThen( mOnt.listStatements( null, RDF.type, prof.TRANSITIVE_PROPERTY() ) );