/** * <p>Add a statement declaring that this resource is distinct from the given resource.</p> * @param res A resource that declared to be distinct from this resource * @exception ProfileException If the {@link Profile#DIFFERENT_FROM()} property is not supported in the current language profile. */ @Override public void addDifferentFrom( Resource res ) { addPropertyValue( getProfile().DIFFERENT_FROM(), "DIFFERENT_FROM", res ); }
/** * <p>Add a resource that is declared to provided additional information about the definition of this resource</p> * @param res A resource that provides extra information on this resource * @exception ProfileException If the {@link Profile#SEE_ALSO()} property is not supported in the current language profile. */ @Override public void addSeeAlso( Resource res ) { addPropertyValue( getProfile().SEE_ALSO(), "SEE_ALSO", res ); }
/** * <p>Answer true if this resource has the given resource as a source of additional information.</p> * @param res A resource to test against * @return True if the <code>res</code> provides more information on this resource. */ @Override public boolean hasSeeAlso( Resource res ) { return hasPropertyValue( getProfile().SEE_ALSO(), "SEE_ALSO", res ); }
/** * <p>Answer true if this resource is defined by the given resource.</p> * @param res A resource to test against * @return True if <code>res</code> defines this resource. */ @Override public boolean isDefinedBy( Resource res ) { return hasPropertyValue( getProfile().IS_DEFINED_BY(), "IS_DEFINED_BY", res ); }
/** * <p>Remove the statement that the given string is a label for * this resource. If this statement * is not true of the current model, nothing happens.</p> * @param label A label literal to be removed */ @Override public void removeLabel( Literal label ) { removePropertyValue( getProfile().LABEL(), "LABEL", label ); }
/** * <p>Answer true if this resource is different from the given resource.</p> * @param res A resource to test against * @return True if the resources are declared to be distinct via a <code>differentFrom</code> statement. */ @Override public boolean isDifferentFrom( Resource res ) { return hasPropertyValue( getProfile().DIFFERENT_FROM(), "DIFFERENT_FROM", res ); }
/** * <p>Remove the statement that this resource is different the given resource. If this statement * is not true of the current model, nothing happens.</p> * @param res A resource that may be declared to be differentFrom this resource */ @Override public void removeDifferentFrom( Resource res ) { removePropertyValue( getProfile().DIFFERENT_FROM(), "DIFFERENT_FROM", res ); }
/** * <p>Answer true if this resource has the given version information</p> * @param info Version information to test for * @return True if this resource has <code>info</code> as version information. */ @Override public boolean hasVersionInfo( String info ) { checkProfile( getProfile().VERSION_INFO(), "VERSION_INFO" ); return hasProperty( getProfile().VERSION_INFO(), info ); }
/** * <p>Add the given label to this resource.</p> * @param label The literal label * @exception ProfileException If the {@link Profile#LABEL()} property is not supported in the current language profile. */ @Override public void addLabel( Literal label ) { addPropertyValue( getProfile().LABEL(), "LABEL", label ); }
/** * <p>Answer true if this resource can be viewed as an object property</p> * @return True if this resource can be viewed as an ObjectProperty */ @Override public boolean isObjectProperty() { return getProfile().OBJECT_PROPERTY() != null && canAs( ObjectProperty.class ); }
/** * <p>Answer true if this resource can be viewed as an 'all different' declaration</p> * @return True if this resource can be viewed as an AllDifferent node */ @Override public boolean isAllDifferent() { return getProfile().ALL_DIFFERENT() != null && canAs( AllDifferent.class ); }
/** * <p>Assert equivalence between the given resource and this resource. Any existing * statements for <code>sameAs</code> will be removed.</p> * @param res The resource that is declared to be the same as this resource * @exception ProfileException If the {@link Profile#SAME_AS()} property is not supported in the current language profile. */ @Override public void setSameAs( Resource res ) { setPropertyValue( getProfile().SAME_AS(), "SAME_AS", res ); }
/** * <p>Add a resource that is declared to be equivalent to this resource.</p> * @param res A resource that declared to be the same as this resource * @exception ProfileException If the {@link Profile#SAME_AS()} property is not supported in the current language profile. */ @Override public void addSameAs( Resource res ) { addPropertyValue( getProfile().SAME_AS(), "SAME_AS", res ); }
/** * <p>Add a resource that is declared to provided additional information about the definition of this resource</p> * @param res A resource that provides extra information on this resource * @exception ProfileException If the {@link Profile#SEE_ALSO()} property is not supported in the current language profile. */ @Override public void addSeeAlso( Resource res ) { addPropertyValue( getProfile().SEE_ALSO(), "SEE_ALSO", res ); }
/** * <p>Answer a resource that provides additional information about this resource. If more than one such resource * is defined, make an arbitrary choice.</p> * @return res A resource that provides additional information about this resource * @exception ProfileException If the {@link Profile#SEE_ALSO()} property is not supported in the current language profile. */ @Override public Resource getSeeAlso() { return objectAsResource( getProfile().SEE_ALSO(), "SEE_ALSO" ); }
/** * <p>Remove the statement that this resource is defined by the given resource. If this statement * is not true of the current model, nothing happens.</p> * @param res A resource that may be declared to define this resource */ @Override public void removeDefinedBy( Resource res ) { removePropertyValue( getProfile().IS_DEFINED_BY(), "IS_DEFINED_BY", res ); }
/** * <p>Answer an iterator over all of the version info strings for this resource.</p> * @return An iterator over the version info strings for this resource. * @exception ProfileException If the {@link Profile#VERSION_INFO()} property is not supported in the current language profile. */ @Override public ExtendedIterator<String> listVersionInfo() { checkProfile( getProfile().VERSION_INFO(), "VERSION_INFO" ); return WrappedIterator.create( listProperties( getProfile().VERSION_INFO() ) ) .mapWith( s -> s.getString() ); }
/** * <p>Answer an iterator over all of the version info strings for this resource.</p> * @return An iterator over the version info strings for this resource. * @exception ProfileException If the {@link Profile#VERSION_INFO()} property is not supported in the current language profile. */ @Override public ExtendedIterator<String> listVersionInfo() { checkProfile( getProfile().VERSION_INFO(), "VERSION_INFO" ); return WrappedIterator.create( listProperties( getProfile().VERSION_INFO() ) ) .mapWith( s -> s.getString() ); }
/** * <p>Answer an iterator over all of the comment literals for this resource.</p> * @return An iterator over RDF {@link Literal}'s. * @exception ProfileException If the {@link Profile#COMMENT()} property is not supported in the current language profile. */ @Override public ExtendedIterator<RDFNode> listComments( String lang ) { checkProfile( getProfile().COMMENT(), "COMMENT" ); return WrappedIterator.create( listProperties( getProfile().COMMENT() ) ) .filterKeep( new LangTagFilter( lang ) ) .mapWith( s -> s.getObject() ); }
/** * <p>Answer an iterator over all of the comment literals for this resource.</p> * @return An iterator over RDF {@link Literal}'s. * @exception ProfileException If the {@link Profile#COMMENT()} property is not supported in the current language profile. */ @Override public ExtendedIterator<RDFNode> listComments( String lang ) { checkProfile( getProfile().COMMENT(), "COMMENT" ); return WrappedIterator.create( listProperties( getProfile().COMMENT() ) ) .filterKeep( new LangTagFilter( lang ) ) .mapWith( s -> s.getObject() ); }