public class OWLLiteralImplString extends Object implements OWLLiteral
Constructor and Description |
---|
OWLLiteralImplString(String literal) |
Modifier and Type | Method and Description |
---|---|
void |
accept(OWLAnnotationValueVisitor visitor) |
<O> O |
accept(OWLAnnotationValueVisitorEx<O> visitor) |
void |
accept(OWLDataVisitor visitor) |
<O> O |
accept(OWLDataVisitorEx<O> visitor) |
void |
accept(OWLObjectVisitor visitor)
Accepts a visitor
|
<O> O |
accept(OWLObjectVisitorEx<O> visitor)
Accepts a visitor
|
com.google.common.base.Optional<OWLAnonymousIndividual> |
asAnonymousIndividual() |
com.google.common.base.Optional<IRI> |
asIRI() |
com.google.common.base.Optional<OWLLiteral> |
asLiteral() |
int |
compareTo(OWLObject o) |
boolean |
containsEntityInSignature(OWLEntity owlEntity)
Determines if the signature of this object contains the specified entity.
|
boolean |
equals(Object obj) |
Set<OWLAnnotationProperty> |
getAnnotationPropertiesInSignature()
A convenience method that obtains the annotation properties that are in
the signature of this object
|
Set<OWLAnonymousIndividual> |
getAnonymousIndividuals()
Gets the anonymous individuals occurring in this object.
|
Set<OWLClass> |
getClassesInSignature()
Gets the classes 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
|
OWLDatatype |
getDatatype()
Gets the
OWLDatatype which types this literal. |
Set<OWLDatatype> |
getDatatypesInSignature()
A convenience method that obtains the datatypes that are in the signature
of this object
|
Set<OWLNamedIndividual> |
getIndividualsInSignature()
A convenience method that obtains the individuals that are in the
signature of this object
|
String |
getLang()
Gets the language tag of this literal.
|
String |
getLiteral()
Gets the lexical value of this literal.
|
Set<OWLClassExpression> |
getNestedClassExpressions()
Gets all of the nested (includes top level) class expressions (anonymous and named) 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
|
Set<OWLEntity> |
getSignature()
Gets the signature of this object.
|
int |
hashCode() |
boolean |
hasLang()
Determines if this literal has a language tag.
|
boolean |
hasLang(String l)
Determines if this
OWLLiteral has a particular language tag. |
boolean |
isBoolean()
Determines if this literal is typed with a datatype that has an IRI that
is
"http://www.w3.org/2001/XMLSchema#"boolean . |
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 |
isDouble()
Determines if this literal is typed with a datatype that has an IRI that
is
"http://www.w3.org/2001/XMLSchema#"double . |
boolean |
isFloat()
Determines if this literal is typed with a datatype that has an IRI that
is
"http://www.w3.org/2001/XMLSchema#"float . |
boolean |
isInteger()
Determines if this literal is typed with a datatype that has an IRI that
is
"http://www.w3.org/2001/XMLSchema#"integer . |
boolean |
isRDFPlainLiteral()
Determines if the datatype of this literal is
rdf:PlainLiteral . |
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).
|
boolean |
parseBoolean()
Parses the lexical value of this literal into a boolean.
|
double |
parseDouble()
Parses the lexical value of this literal into a double.
|
float |
parseFloat()
Parses the lexical value of this literal into a float.
|
int |
parseInteger()
Parses the lexical value of this literal into an integer.
|
getClass, notify, notifyAll, toString, wait, wait, wait
isLiteral
isIndividual, isIRI, toString
isAnonymous, isNamed
public String getLiteral()
OWLLiteral
rdf:PlainLiteral
then the abbreviated lexical form will be
returned. That is, the language tag is not included.getLiteral
in interface OWLLiteral
rdf:PlainLiteral
then the return values are as follows:
If the literal is of the form "abc@"^^rdf:PlainLiteral
then the return value will be "abc" (without the language tag
included). If the literal is of the form
"abc@langTag"^^rdf:PlainLiteral
then the return value
will be "abc" (without the language tag included).public boolean hasLang()
OWLLiteral
hasLang
in interface OWLLiteral
true
if this literal has a non-empty language tag,
otherwise false
public int parseInteger() throws NumberFormatException
OWLLiteral
"http://www.w3.org/2001/XMLSchema#"integer
)parseInteger
in interface OWLLiteral
NumberFormatException
- if the lexical form could not be parsed into an integer because
it is not in the lexical space of the integer datatype.public boolean isRDFPlainLiteral()
OWLLiteral
rdf:PlainLiteral
.
Note that literals that are abbreviated in the functional syntax (and
other concrete syntaxes) and are of the form "abc"
or
"abc"@langTag
will be of the type rdf:PlainLiteral
after
parsing.isRDFPlainLiteral
in interface OWLLiteral
true
if the datatype of this literal is rdf:PlainLiteral,
otherwise false
.public boolean isInteger()
OWLLiteral
"http://www.w3.org/2001/XMLSchema#"integer
.isInteger
in interface OWLLiteral
true
if this literal is typed with
"http://www.w3.org/2001/XMLSchema#"integer
, i.e. this
literal represents an integer, otherwise false
.public boolean isBoolean()
OWLLiteral
"http://www.w3.org/2001/XMLSchema#"boolean
.isBoolean
in interface OWLLiteral
true
if this literal is typed with
"http://www.w3.org/2001/XMLSchema#"boolean
, i.e. this
literal represents a boolean, otherwise false
.public boolean isDouble()
OWLLiteral
"http://www.w3.org/2001/XMLSchema#"double
.isDouble
in interface OWLLiteral
true
if this literal is typed with
"http://www.w3.org/2001/XMLSchema#"double
, i.e. this
literal represents a double, otherwise false
.public boolean isFloat()
OWLLiteral
"http://www.w3.org/2001/XMLSchema#"float
.isFloat
in interface OWLLiteral
true
if this literal is typed with
"http://www.w3.org/2001/XMLSchema#"float
, i.e. this
literal represents a float, otherwise false
.public boolean parseBoolean()
OWLLiteral
"http://www.w3.org/2001/XMLSchema#"boolean
).parseBoolean
in interface OWLLiteral
public double parseDouble()
OWLLiteral
"http://www.w3.org/2001/XMLSchema#"double
).parseDouble
in interface OWLLiteral
public float parseFloat()
OWLLiteral
"http://www.w3.org/2001/XMLSchema#"float
).parseFloat
in interface OWLLiteral
public String getLang()
OWLLiteral
getLang
in interface HasLang
getLang
in interface OWLLiteral
rdf:PlainLiteral
, or because its language tag is empty,
then the empty string will be returned. (The null
value
is never returned).public boolean hasLang(String l)
OWLLiteral
OWLLiteral
has a particular language tag.hasLang
in interface OWLLiteral
l
- The specific lang to test for. The tag will be normalised - white
space will be trimmed from the end and it will be converted to
lower case.true
if this literal has a language tag equal to
lang
, otherwise false
.public OWLDatatype getDatatype()
OWLLiteral
OWLDatatype
which types this literal.getDatatype
in interface OWLLiteral
OWLDatatype
that types this literal. Note that for
strings with language tag (previously considered to be untyped
literals) the datatype will be rdf:PlainLiteral. The return value
is never null
.public void accept(OWLDataVisitor visitor)
accept
in interface OWLLiteral
visitor
- visitorpublic <O> O accept(OWLDataVisitorEx<O> visitor)
accept
in interface OWLLiteral
O
- visitor return typevisitor
- visitorpublic 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 void accept(OWLObjectVisitor visitor)
OWLObject
public <O> O accept(OWLObjectVisitorEx<O> visitor)
OWLObject
public Set<OWLEntity> getSignature()
HasSignature
getSignature
in interface HasSignature
public Set<OWLAnonymousIndividual> getAnonymousIndividuals()
HasAnonymousIndividuals
getAnonymousIndividuals
in interface HasAnonymousIndividuals
public Set<OWLClass> getClassesInSignature()
HasClassesInSignature
getClassesInSignature
in interface HasClassesInSignature
public Set<OWLAnnotationProperty> getAnnotationPropertiesInSignature()
HasAnnotationPropertiesInSignature
getAnnotationPropertiesInSignature
in interface HasAnnotationPropertiesInSignature
public Set<OWLDataProperty> getDataPropertiesInSignature()
HasDataPropertiesInSignature
getDataPropertiesInSignature
in interface HasDataPropertiesInSignature
public Set<OWLObjectProperty> getObjectPropertiesInSignature()
HasObjectPropertiesInSignature
getObjectPropertiesInSignature
in interface HasObjectPropertiesInSignature
public Set<OWLNamedIndividual> getIndividualsInSignature()
HasIndividualsInSignature
getIndividualsInSignature
in interface HasIndividualsInSignature
public Set<OWLDatatype> getDatatypesInSignature()
HasDatatypesInSignature
getDatatypesInSignature
in interface HasDatatypesInSignature
public Set<OWLClassExpression> getNestedClassExpressions()
OWLObject
getNestedClassExpressions
in interface OWLObject
OWLClassExpression
s that represent the
nested class expressions used in this object.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 int compareTo(OWLObject o)
compareTo
in interface Comparable<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 com.google.common.base.Optional<IRI> asIRI()
asIRI
in interface OWLAnnotationValue
public com.google.common.base.Optional<OWLAnonymousIndividual> asAnonymousIndividual()
asAnonymousIndividual
in interface OWLAnnotationValue
public com.google.common.base.Optional<OWLLiteral> asLiteral()
asLiteral
in interface OWLAnnotationValue
Copyright © 2020 The University of Manchester. All rights reserved.