/** * <p>Answer the value of a given RDF property for this ontology resource, or null * if it doesn't have one. The value is returned as an RDFNode, from which * the concrete data value can be extracted for literals. If the value is * a resource, it will present the {@link OntResource} facet. * If there is more than one RDF * statement with the given property for the current value, it is not defined * which of the values will be returned.</p> * * @param property An RDF property * @return An RDFNode whose value is the value, or one of the values, of the * given property. If the property is not defined the method returns null. */ @Override public RDFNode getPropertyValue( Property property ) { Statement s = getProperty( property ); if (s == null) { return null; } else { return asOntResource( s.getObject() ); } }
/** * <p>Answer the value of a given RDF property for this ontology resource, or null * if it doesn't have one. The value is returned as an RDFNode, from which * the concrete data value can be extracted for literals. If the value is * a resource, it will present the {@link OntResource} facet. * If there is more than one RDF * statement with the given property for the current value, it is not defined * which of the values will be returned.</p> * * @param property An RDF property * @return An RDFNode whose value is the value, or one of the values, of the * given property. If the property is not defined the method returns null. */ @Override public RDFNode getPropertyValue( Property property ) { Statement s = getProperty( property ); if (s == null) { return null; } else { return asOntResource( s.getObject() ); } }
/** * <p>Answer an iterator over the set of all values for a given RDF property. Each * value in the iterator will be an RDFNode, representing the value (object) of * each statement in the underlying model.</p> * * @param property The property whose values are sought * @return An Iterator over the values of the property */ @Override public NodeIterator listPropertyValues( Property property ) { return new NodeIteratorImpl( listProperties( property ).mapWith( s -> asOntResource( s.getObject() ) ), null ); }
/** * <p>Answer an iterator over the set of all values for a given RDF property. Each * value in the iterator will be an RDFNode, representing the value (object) of * each statement in the underlying model.</p> * * @param property The property whose values are sought * @return An Iterator over the values of the property */ @Override public NodeIterator listPropertyValues( Property property ) { return new NodeIteratorImpl( listProperties( property ).mapWith( s -> asOntResource( s.getObject() ) ), null ); }
/** * <p>Answer an iterator over all of the resources that are declared to provide addition * information about this resource.</p> * @return An iterator over the resources providing additional definition on this resource. * @exception ProfileException If the {@link Profile#SEE_ALSO()} property is not supported in the current language profile. */ @Override public ExtendedIterator<RDFNode> listSeeAlso() { checkProfile( getProfile().SEE_ALSO(), "SEE_ALSO" ); return WrappedIterator.create( listProperties( getProfile().SEE_ALSO() ) ) .mapWith( s -> asOntResource( s.getObject() ) ); }
/** * <p>Answer an iterator over all of the resources that are declared to provide addition * information about this resource.</p> * @return An iterator over the resources providing additional definition on this resource. * @exception ProfileException If the {@link Profile#SEE_ALSO()} property is not supported in the current language profile. */ @Override public ExtendedIterator<RDFNode> listSeeAlso() { checkProfile( getProfile().SEE_ALSO(), "SEE_ALSO" ); return WrappedIterator.create( listProperties( getProfile().SEE_ALSO() ) ) .mapWith( s -> asOntResource( s.getObject() ) ); }
/** * <p>Answer an iterator over all of the resources that are declared to define * this resource. </p> * @return An iterator over the resources defining this resource. * @exception ProfileException If the {@link Profile#IS_DEFINED_BY()} property is not supported in the current language profile. */ @Override public ExtendedIterator<RDFNode> listIsDefinedBy() { checkProfile( getProfile().IS_DEFINED_BY(), "IS_DEFINED_BY" ); return WrappedIterator.create( listProperties( getProfile().IS_DEFINED_BY() ) ) .mapWith( s -> asOntResource( s.getObject() ) ); }
/** * <p>Answer an iterator over all of the resources that are declared to define * this resource. </p> * @return An iterator over the resources defining this resource. * @exception ProfileException If the {@link Profile#IS_DEFINED_BY()} property is not supported in the current language profile. */ @Override public ExtendedIterator<RDFNode> listIsDefinedBy() { checkProfile( getProfile().IS_DEFINED_BY(), "IS_DEFINED_BY" ); return WrappedIterator.create( listProperties( getProfile().IS_DEFINED_BY() ) ) .mapWith( s -> asOntResource( s.getObject() ) ); }