public class IRI extends Object implements OWLAnnotationSubject, OWLAnnotationValue, SWRLPredicate, CharSequence, OWLPrimitive, HasShortForm
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)
Accepts a visitor
|
<O> O |
accept(OWLObjectVisitorEx<O> visitor)
Accepts a visitor
|
char |
charAt(int index) |
int |
compareTo(OWLObject o) |
boolean |
containsEntityInSignature(OWLEntity owlEntity)
Determines if the signature of this object contains the specified entity.
|
static IRI |
create(File file) |
static IRI |
create(String str)
Creates an IRI from the specified String.
|
static IRI |
create(String prefix,
String suffix)
Creates an IRI by concatenating two strings.
|
static IRI |
create(URI uri) |
static IRI |
create(URL url) |
boolean |
equals(Object obj) |
static IRI |
generateDocumentIRI()
Gets an auto-generated ontology document IRI.
|
Set<OWLAnonymousIndividual> |
getAnonymousIndividuals()
Gets the anonymous individuals occurring in this object, as collected by
an OWLEntityCollector.
|
Set<OWLClass> |
getClassesInSignature()
A convenience method that obtains the classes that are in the signature
of this object
|
Set<OWLDataProperty> |
getDataPropertiesInSignature()
A convenience method that obtains the data properties that are in the
signature of this object
|
Set<OWLDatatype> |
getDatatypesInSignature()
A convenience method that obtains the datatypes that are in the signature
of this object
|
String |
getFragment()
Deprecated.
use getNCName() - getFragment() does not return a real
fragment. e.g., it does not allow / and () on it
|
Set<OWLNamedIndividual> |
getIndividualsInSignature()
A convenience method that obtains the individuals that are in the
signature of this object
|
String |
getNamespace() |
Set<OWLClassExpression> |
getNestedClassExpressions()
Gets all of the nested (includes top level) class expressions that are
used in this object
|
Set<OWLObjectProperty> |
getObjectPropertiesInSignature()
A convenience method that obtains the object properties that are in the
signature of this object
|
com.google.common.base.Optional<String> |
getRemainder() |
String |
getScheme() |
String |
getShortForm()
Gets the short form.
|
Set<OWLEntity> |
getSignature()
Gets the signature of this object
|
String |
getStart()
Deprecated.
use getNamespace instead - better name
|
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() |
String |
prefixedBy(String prefix) |
IRI |
resolve(String s) |
CharSequence |
subSequence(int start,
int end) |
String |
toQuotedString()
Obtained this IRI surrounded by angled brackets
|
String |
toString() |
URI |
toURI()
Obtains this IRI as a URI.
|
chars, codePoints
public URI toURI()
public boolean isAbsolute()
true
if this IRI is absolute or false
if this IRI
is not absolutepublic String getScheme()
@Deprecated public String getStart()
public String getNamespace()
public IRI resolve(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
@Deprecated public String getFragment()
null
if the IRI does not have a
fragmentpublic com.google.common.base.Optional<String> getRemainder()
public String toQuotedString()
public static IRI create(String str)
str
- The String that specifies the IRI. Cannot be null.public static IRI create(String prefix, String suffix)
prefix
- The first string. May be null
.suffix
- The second string. May be null
.public static IRI create(File file)
file
- the file to create the IRI from. Cannot be null.public static IRI create(URI uri)
uri
- the uri to create the IRI from. Cannot be nullpublic static IRI create(URL url) throws URISyntaxException
url
- the url to create the IRI from. Cannot be null.URISyntaxException
- if the URL is ill formedpublic static IRI generateDocumentIRI()
owlapi:ontologyTIMESTAMP
public int length()
length
in interface CharSequence
public char charAt(int index)
charAt
in interface CharSequence
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public String prefixedBy(String prefix)
prefix
- prefix to use for replacing the IRI namespacepublic String getShortForm()
HasShortForm
getShortForm
in interface HasShortForm
null
.public void accept(OWLObjectVisitor visitor)
OWLObject
public <O> O accept(OWLObjectVisitorEx<O> visitor)
OWLObject
public void accept(OWLAnnotationSubjectVisitor visitor)
accept
in interface OWLAnnotationSubject
visitor
- visitor to acceptpublic <E> E accept(OWLAnnotationSubjectVisitorEx<E> visitor)
accept
in interface OWLAnnotationSubject
E
- visitor return typevisitor
- visitor to acceptpublic Set<OWLClass> getClassesInSignature()
OWLObject
getClassesInSignature
in interface HasClassesInSignature
getClassesInSignature
in interface OWLObject
public Set<OWLDataProperty> getDataPropertiesInSignature()
OWLObject
getDataPropertiesInSignature
in interface HasDataPropertiesInSignature
getDataPropertiesInSignature
in interface OWLObject
public Set<OWLNamedIndividual> getIndividualsInSignature()
OWLObject
getIndividualsInSignature
in interface HasIndividualsInSignature
getIndividualsInSignature
in interface OWLObject
public Set<OWLObjectProperty> getObjectPropertiesInSignature()
OWLObject
getObjectPropertiesInSignature
in interface HasObjectPropertiesInSignature
getObjectPropertiesInSignature
in interface OWLObject
public Set<OWLEntity> getSignature()
OWLObject
getSignature
in interface HasSignature
getSignature
in interface OWLObject
public boolean containsEntityInSignature(OWLEntity owlEntity)
HasContainsEntityInSignature
containsEntityInSignature
in interface HasContainsEntityInSignature
owlEntity
- The entitytrue
if the signature of this object contains
owlEntity
, otherwise false
public Set<OWLAnonymousIndividual> getAnonymousIndividuals()
OWLObject
getAnonymousIndividuals
in interface HasAnonymousIndividuals
getAnonymousIndividuals
in interface OWLObject
public Set<OWLDatatype> getDatatypesInSignature()
OWLObject
getDatatypesInSignature
in interface HasDatatypesInSignature
getDatatypesInSignature
in interface OWLObject
public 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 Comparable<OWLObject>
public String toString()
toString
in interface CharSequence
toString
in class Object
public void accept(OWLAnnotationValueVisitor visitor)
accept
in interface OWLAnnotationValue
visitor
- visitor to acceptpublic <O> O accept(OWLAnnotationValueVisitorEx<O> visitor)
accept
in interface OWLAnnotationValue
O
- visitor return typevisitor
- visitor to acceptpublic 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.Copyright © 2017 The University of Manchester. All Rights Reserved.