public interface LiteralProvider extends DatatypeProvider
Modifier and Type | Method and Description |
---|---|
OWLLiteral |
getOWLLiteral(boolean value)
Convenience method that obtains a literal typed as a boolean.
|
OWLLiteral |
getOWLLiteral(double value)
Convenience method that obtains a literal typed as a double.
|
OWLLiteral |
getOWLLiteral(float value)
Convenience method that obtains a literal typed as a float.
|
OWLLiteral |
getOWLLiteral(int value)
Convenience method that obtains a literal typed as an integer.
|
OWLLiteral |
getOWLLiteral(String value)
Gets a literal that has the specified lexical value, and has the datatype xsd:string.
|
default OWLLiteral |
getOWLLiteral(String lexicalValue,
OWL2Datatype datatype)
Gets an
OWLLiteral , which has the specified lexical value, and is typed with the
specified datatype. |
OWLLiteral |
getOWLLiteral(String lexicalValue,
OWLDatatype datatype)
Gets an
OWLLiteral , which has the specified lexical value, and is typed with the
specified datatype. |
OWLLiteral |
getOWLLiteral(String literal,
String lang)
Gets an OWLLiteral with a language tag.
|
getOWLDatatype, getOWLDatatype, getOWLDatatype, getOWLDatatype, getOWLDatatype
OWLLiteral getOWLLiteral(String lexicalValue, OWLDatatype datatype)
OWLLiteral
, which has the specified lexical value, and is typed with the
specified datatype.lexicalValue
- The lexical value.datatype
- The datatype.rdf:PlainLiteral
, and the lexical value contains a language tag
then the language tag will be parsed out of the lexical value. For example,
"abc@en"^^rdf:PlainLiteral would be parsed into a lexical value of "abc" and a
language tag of "en".default OWLLiteral getOWLLiteral(String lexicalValue, OWL2Datatype datatype)
OWLLiteral
, which has the specified lexical value, and is typed with the
specified datatype.lexicalValue
- The lexical value.datatype
- The datatype.rdf:PlainLiteral
, and the lexical value contains a language tag
then the language tag will be parsed out of the lexical value. For example,
"abc@en"^^rdf:PlainLiteral would be parsed into a lexical value of "abc" and a
language tag of "en".OWLLiteral getOWLLiteral(int value)
value
- The value of the literalOWLLiteral
whose literal is the lexical value of the integer, and whose
data type is xsd:integer.OWLLiteral getOWLLiteral(double value)
value
- The value of the literalOWLLiteral
whose literal is the lexical value of the double, and whose
data type is xsd:double.OWLLiteral getOWLLiteral(boolean value)
value
- The value of the literalOWLLiteral
whose literal is the lexical value of the boolean, and whose
data type is xsd:boolean.OWLLiteral getOWLLiteral(float value)
value
- The value of the literalOWLLiteral
whose literal is the lexical value of the float, and whose data
type is xsd:float.OWLLiteral getOWLLiteral(String value)
value
- The lexical value of the literal.OWLLiteral getOWLLiteral(String literal, @Nullable String lang)
OWLRDFVocabulary.RDF_PLAIN_LITERAL
).literal
- The string literal.lang
- The language tag. The empty string may be specified to indicate an empty language
tag. Leading and trailing white space will be removed from the tag and the tag will be
normalised to LOWER CASE. If lang
is null
then lang
will be
converted to the empty string (for backwards compatibility). If not empty, the tag is
formed according to BCP47
but the OWL API will not check that the tag conforms to this specification - it is up
to the caller to ensure this.Copyright © 2020 The University of Manchester. All rights reserved.