public class IRI extends java.lang.Object implements OWLAnnotationSubject, OWLAnnotationValue, SWRLPredicate, java.lang.CharSequence
Modifier | Constructor and Description |
---|---|
protected |
IRI(java.lang.String s) |
protected |
IRI(java.lang.String prefix,
java.lang.String fragment)
Constructs an IRI which is built from the concatenation of the specified prefix and suffix.
|
protected |
IRI(java.net.URI uri) |
Modifier and Type | Method and Description |
---|---|
void |
accept(OWLAnnotationSubjectVisitor visitor) |
<E> E |
accept(OWLAnnotationSubjectVisitorEx<E> visitor) |
void |
accept(OWLAnnotationValueVisitor visitor) |
<O> O |
accept(OWLAnnotationValueVisitorEx<O> visitor) |
void |
accept(OWLObjectVisitor visitor) |
<O> O |
accept(OWLObjectVisitorEx<O> visitor) |
char |
charAt(int index)
Returns the
char value at the specified index. |
int |
compareTo(OWLObject o) |
static IRI |
create(java.io.File file) |
static IRI |
create(java.lang.String str)
Creates an IRI from the specified String.
|
static IRI |
create(java.lang.String prefix,
java.lang.String suffix)
Creates an IRI by concatenating two strings.
|
static IRI |
create(java.net.URI uri) |
static IRI |
create(java.net.URL url) |
boolean |
equals(java.lang.Object obj) |
static IRI |
generateDocumentIRI()
Gets an auto-generated ontology document IRI.
|
java.util.Set<OWLAnonymousIndividual> |
getAnonymousIndividuals()
Gets the anonymous individuals occurring in this object, as collected by an
OWLEntityCollector.
|
java.util.Set<OWLClass> |
getClassesInSignature()
A convenience method that obtains the classes
that are in the signature of this object
|
java.util.Set<OWLDataProperty> |
getDataPropertiesInSignature()
A convenience method that obtains the data properties
that are in the signature of this object
|
java.util.Set<OWLDatatype> |
getDatatypesInSignature()
A convenience method that obtains the datatypes
that are in the signature of this object
|
java.lang.String |
getFragment()
Gets the fragment of the IRI.
|
java.util.Set<OWLNamedIndividual> |
getIndividualsInSignature()
A convenience method that obtains the individuals
that are in the signature of this object
|
java.util.Set<OWLClassExpression> |
getNestedClassExpressions()
Gets all of the nested (includes top level) class expressions that are used in this object
|
java.util.Set<OWLObjectProperty> |
getObjectPropertiesInSignature()
A convenience method that obtains the object properties
that are in the signature of this object
|
java.lang.String |
getScheme() |
java.util.Set<OWLEntity> |
getSignature()
Gets the signature of this object
|
java.lang.String |
getStart() |
int |
hashCode() |
boolean |
isAbsolute()
Determines if this IRI is absolute
|
boolean |
isBottomEntity()
Determines if this object is either, owl:Nothing (the bottom class), owl:bottomObjectProperty (the bottom object property)
, owl:bottomDataProperty (the bottom data property).
|
boolean |
isNothing()
Determines if this IRI is equal to the IRI that
owl:Nothing
is named with |
boolean |
isPlainLiteral()
Determines if this IRI is equal to the IRI that is named
rdf:PlainLiteral |
boolean |
isReservedVocabulary()
Determines if this IRI is in the reserved vocabulary.
|
boolean |
isThing()
Determines if this IRI is equal to the IRI that
owl:Thing is
named with |
boolean |
isTopEntity()
Determines if this object is either, owl:Thing (the top class), owl:topObjectProperty (the top object property)
, owl:topDataProperty (the top data property) or rdfs:Literal (the top datatype).
|
int |
length()
Returns the length of this character sequence.
|
IRI |
resolve(java.lang.String s) |
java.lang.CharSequence |
subSequence(int start,
int end)
Returns a new
CharSequence that is a subsequence of this sequence. |
java.lang.String |
toQuotedString()
Obtained this IRI surrounded by angled brackets
|
java.lang.String |
toString() |
java.net.URI |
toURI()
Obtains this IRI as a URI.
|
protected IRI(java.lang.String prefix, java.lang.String fragment)
prefix
- The prefix.fragment
- The suffix.protected IRI(java.lang.String s)
protected IRI(java.net.URI uri)
public java.net.URI toURI()
public boolean isAbsolute()
true
if this IRI is absolute or false
if this IRI is not absolutepublic java.lang.String getScheme()
public java.lang.String getStart()
public IRI resolve(java.lang.String s)
s
- the IRI stirng to be resolvedpublic boolean isReservedVocabulary()
true
if the IRI is in the reserved vocabulary,
otherwise false
.public boolean isThing()
owl:Thing
is
named withtrue
if this IRI is equal to
<http://www.w3.org/2002/07/owl#Thing> and otherwise
false
public boolean isNothing()
owl:Nothing
is named withtrue
if this IRI is equal to
<http://www.w3.org/2002/07/owl#Nothing> and otherwise
false
public boolean isPlainLiteral()
rdf:PlainLiteral
true
if this IRI is equal to
<http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral>,
otherwise false
public java.lang.String getFragment()
null
if the IRI does not have a
fragmentpublic java.lang.String toQuotedString()
public static IRI create(java.lang.String str)
str
- The String that specifies the IRI. Cannot be null.public static IRI create(java.lang.String prefix, java.lang.String suffix)
prefix
- The first string. May be null
.suffix
- The second string. May be null
.public static IRI create(java.io.File file)
file
- the file to create the IRI from. Cannot be null.public static IRI create(java.net.URI uri)
uri
- the uri to create the IRI from. Cannot be nullpublic static IRI create(java.net.URL url) throws java.net.URISyntaxException
url
- the url to create the IRI from. Cannot be null.java.net.URISyntaxException
- if the URL is ill formedpublic static IRI generateDocumentIRI()
owlapi:ontologyTIMESTAMP
public int length()
char
s in the sequence.length
in interface java.lang.CharSequence
char
s in this sequencepublic char charAt(int index)
char
value at the specified index. An index ranges from zero
to length() - 1. The first char
value of the sequence is at
index zero, the next at index one, and so on, as for array
indexing.
If the char
value specified by the index is a
surrogate, the surrogate
value is returned.
charAt
in interface java.lang.CharSequence
index
- the index of the char
value to be returnedchar
valuejava.lang.IndexOutOfBoundsException
- if the index argument is negative or not less than
length()public java.lang.CharSequence subSequence(int start, int end)
CharSequence
that is a subsequence of this sequence.
The subsequence starts with the char
value at the specified index and
ends with the char
value at index end - 1. The length
(in char
s) of the
returned sequence is end - start, so if start == end
then an empty sequence is returned. subSequence
in interface java.lang.CharSequence
start
- the start index, inclusiveend
- the end index, exclusivejava.lang.IndexOutOfBoundsException
- if start or end are negative,
if end is greater than length(),
or if start is greater than endpublic void accept(OWLObjectVisitor visitor)
public <O> O accept(OWLObjectVisitorEx<O> visitor)
public void accept(OWLAnnotationSubjectVisitor visitor)
accept
in interface OWLAnnotationSubject
public <E> E accept(OWLAnnotationSubjectVisitorEx<E> visitor)
accept
in interface OWLAnnotationSubject
public java.util.Set<OWLClass> getClassesInSignature()
OWLObject
getClassesInSignature
in interface OWLObject
public java.util.Set<OWLDataProperty> getDataPropertiesInSignature()
OWLObject
getDataPropertiesInSignature
in interface OWLObject
public java.util.Set<OWLNamedIndividual> getIndividualsInSignature()
OWLObject
getIndividualsInSignature
in interface OWLObject
public java.util.Set<OWLObjectProperty> getObjectPropertiesInSignature()
OWLObject
getObjectPropertiesInSignature
in interface OWLObject
public java.util.Set<OWLEntity> getSignature()
OWLObject
getSignature
in interface OWLObject
public java.util.Set<OWLAnonymousIndividual> getAnonymousIndividuals()
OWLObject
getAnonymousIndividuals
in interface OWLObject
public java.util.Set<OWLDatatype> getDatatypesInSignature()
OWLObject
getDatatypesInSignature
in interface OWLObject
public java.util.Set<OWLClassExpression> getNestedClassExpressions()
OWLObject
getNestedClassExpressions
in interface OWLObject
OWLClassExpression
s that represent the nested class
expressions used in this object.public int compareTo(OWLObject o)
compareTo
in interface java.lang.Comparable<OWLObject>
public java.lang.String toString()
toString
in interface java.lang.CharSequence
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void accept(OWLAnnotationValueVisitor visitor)
accept
in interface OWLAnnotationValue
public <O> O accept(OWLAnnotationValueVisitorEx<O> visitor)
accept
in interface OWLAnnotationValue
public boolean isTopEntity()
OWLObject
isTopEntity
in interface OWLObject
true
if this object corresponds to one of the above entities.public boolean isBottomEntity()
OWLObject
isBottomEntity
in interface OWLObject
true
if this object corresponds to one of the above entities.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object