📄 ontresource.java
字号:
// version info
/**
* <p>Assert that the given string is the value of the version info for this resource. Any existing
* statements for <code>versionInfo</code> will be removed.</p>
* @param info The version information for this resource
* @exception OntProfileException If the {@link Profile#VERSION_INFO()} property is not supported in the current language profile.
*/
public void setVersionInfo( String info );
/**
* <p>Add the given version information to this resource.</p>
* @param info A version information string for this resource
* @exception OntProfileException If the {@link Profile#VERSION_INFO()} property is not supported in the current language profile.
*/
public void addVersionInfo( String info );
/**
* <p>Answer the version information string for this object. If there is
* more than one such resource, an arbitrary selection is made.</p>
* @return A version info string
* @exception OntProfileException If the {@link Profile#VERSION_INFO()} property is not supported in the current language profile.
*/
public String getVersionInfo();
/**
* <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 OntProfileException If the {@link Profile#VERSION_INFO()} property is not supported in the current language profile.
*/
public ExtendedIterator listVersionInfo();
/**
* <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.
*/
public boolean hasVersionInfo( String info );
/**
* <p>Remove the statement that the given string provides version information about
* this resource. If this statement
* is not true of the current model, nothing happens.</p>
* @param info A version information string to be removed
*/
public void removeVersionInfo( String info );
// label
/**
* <p>Assert that the given string is the value of the label for this resource. Any existing
* statements for <code>label</code> will be removed.</p>
* @param label The label for this resource
* @param lang The language attribute for this label (EN, FR, etc) or null if not specified.
* @exception OntProfileException If the {@link Profile#LABEL()} property is not supported in the current language profile.
*/
public void setLabel( String label, String lang );
/**
* <p>Add the given label to this resource.</p>
* @param label A label string for this resource
* @param lang The language attribute for this label (EN, FR, etc) or null if not specified.
* @exception OntProfileException If the {@link Profile#LABEL()} property is not supported in the current language profile.
*/
public void addLabel( String label, String lang );
/**
* <p>Add the given label to this resource.</p>
* @param label The literal label
* @exception OntProfileException If the {@link Profile#LABEL()} property is not supported in the current language profile.
*/
public void addLabel( Literal label );
/**
* <p>Answer the label string for this object. If there is
* more than one such resource, an arbitrary selection is made.</p>
* @param lang The language attribute for the desired label (EN, FR, etc) or null for don't care. Will
* attempt to retreive the most specific label matching the given language</p>
* @return A label string matching the given language, or null if there is no matching label.
* @exception OntProfileException If the {@link Profile#LABEL()} property is not supported in the current language profile.
*/
public String getLabel( String lang );
/**
* <p>Answer an iterator over all of the label literals for this resource.</p>
* @param lang The language tag to restric the listed comments to, or null to select all comments
* @return An iterator over RDF {@link Literal}'s.
* @exception OntProfileException If the {@link Profile#LABEL()} property is not supported in the current language profile.
*/
public ExtendedIterator listLabels( String lang );
/**
* <p>Answer true if this resource has the given label</p>
* @param label The label to test for
* @param lang The optional language tag, or null for don't care.
* @return True if this resource has <code>label</code> as a label.
*/
public boolean hasLabel( String label, String lang );
/**
* <p>Answer true if this resource has the given label</p>
* @param label The label to test for
* @return True if this resource has <code>label</code> as a label.
*/
public boolean hasLabel( Literal label );
/**
* <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 string to be removed
* @param lang A lang tag, or null if not specified
*/
public void removeLabel( String label, String lang );
/**
* <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
*/
public void removeLabel( Literal label );
// comment
/**
* <p>Assert that the given string is the comment on this resource. Any existing
* statements for <code>comment</code> will be removed.</p>
* @param comment The comment for this resource
* @param lang The language attribute for this comment (EN, FR, etc) or null if not specified.
* @exception OntProfileException If the {@link Profile#COMMENT()} property is not supported in the current language profile.
*/
public void setComment( String comment, String lang );
/**
* <p>Add the given comment to this resource.</p>
* @param comment A comment string for this resource
* @param lang The language attribute for this comment (EN, FR, etc) or null if not specified.
* @exception OntProfileException If the {@link Profile#COMMENT()} property is not supported in the current language profile.
*/
public void addComment( String comment, String lang );
/**
* <p>Add the given comment to this resource.</p>
* @param comment The literal comment
* @exception OntProfileException If the {@link Profile#COMMENT()} property is not supported in the current language profile.
*/
public void addComment( Literal comment );
/**
* <p>Answer the comment string for this object. If there is
* more than one such resource, an arbitrary selection is made.</p>
* @param lang The language attribute for the desired comment (EN, FR, etc) or null for don't care. Will
* attempt to retreive the most specific comment matching the given language</p>
* @return A comment string matching the given language, or null if there is no matching comment.
* @exception OntProfileException If the {@link Profile#COMMENT()} property is not supported in the current language profile.
*/
public String getComment( String lang );
/**
* <p>Answer an iterator over all of the comment literals for this resource.</p>
* @param lang The language tag to restric the listed comments to, or null to select all comments
* @return An iterator over RDF {@link Literal}'s.
* @exception OntProfileException If the {@link Profile#COMMENT()} property is not supported in the current language profile.
*/
public ExtendedIterator listComments( String lang );
/**
* <p>Answer true if this resource has the given comment.</p>
* @param comment The comment to test for
* @param lang The optional language tag, or null for don't care.
* @return True if this resource has <code>comment</code> as a comment.
*/
public boolean hasComment( String comment, String lang );
/**
* <p>Answer true if this resource has the given comment.</p>
* @param comment The comment to test for
* @return True if this resource has <code>comment</code> as a comment.
*/
public boolean hasComment( Literal comment );
/**
* <p>Remove the statement that the given string is a comment on
* this resource. If this statement
* is not true of the current model, nothing happens.</p>
* @param comment A comment string to be removed
* @param lang A lang tag, or null if not specified
*/
public void removeComment( String comment, String lang );
/**
* <p>Remove the statement that the given string is a comment on
* this resource. If this statement
* is not true of the current model, nothing happens.</p>
* @param comment A comment literal to be removed
*/
public void removeComment( Literal comment );
// rdf:type
/**
* <p>Set the RDF type (ie the class) for this resource, replacing any
* existing <code>rdf:type</code> property. Any existing statements for the RDF type
* will first be removed.</p>
*
* @param cls The RDF resource denoting the new value for the <code>rdf:type</code> property,
* which will replace any existing type property.
*/
public void setRDFType( Resource cls );
/**
* <p>Add the given class as one of the <code>rdf:type</code>'s for this resource.</p>
*
* @param cls An RDF resource denoting a new value for the <code>rdf:type</code> property.
*/
public void addRDFType( Resource cls );
/**
* <p>
* Answer the <code>rdf:type</code> (ie the class) of this resource. If there
* is more than one type for this resource, the return value will be one of
* the values, but it is not specified which one (nor that it will consistently
* be the same one each time). Equivalent to <code>getRDFType( false )</code>.
* </p>
*
* @return A resource that is the rdf:type for this resource, or one of them if
* more than one is defined.
*/
public Resource getRDFType();
/**
* <p>
* Answer the <code>rdf:type</code> (ie the class) of this resource. If there
* is more than one type for this resource, the return value will be one of
* the values, but it is not specified which one (nor that it will consistently
* be the same one each time).
* </p>
*
* @param direct If true, only consider the direct types of this resource, and not
* the super-classes of the type(s).
* @return A resource that is the rdf:type for this resource, or one of them if
* more than one is defined.
*/
public Resource getRDFType( boolean direct );
/**
* <p>
* Answer an iterator over the RDF classes to which this resource belongs.
* </p>
*
* @param direct If true, only answer those resources that are direct types
* of this resource, not the super-classes of the class etc.
* @return An iterator over the set of this resource's classes. Each member
* of the iteration will be an {@link Resource}. Use
* <code>.as( OntClass.class )</code> to map this resource to
* an OntClass.
*/
public ExtendedIterator listRDFTypes( boolean direct );
/**
* <p>
* Answer true if this resource is a member of the class denoted by the
* given class resource.
* </p>
*
* @param ontClass Denotes a class to which this value may belong
* @param direct If true, only consider the direct types of this resource, ignoring
* the super-classes of the stated types.
* @return True if this resource has the given class as one of its <code>rdf:type</code>'s.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -