public class SimpleLiteral extends AbstractLiteral
Literal interface.| Modifier | Constructor and Description |
|---|---|
protected |
SimpleLiteral() |
protected |
SimpleLiteral(String label)
Creates a new plain literal with the supplied label.
|
protected |
SimpleLiteral(String label,
IRI datatype)
Creates a new datatyped literal with the supplied label and datatype.
|
protected |
SimpleLiteral(String label,
String language)
Creates a new plain literal with the supplied label and language tag.
|
protected |
SimpleLiteral(String label,
XSD.Datatype datatype) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
booleanValue() |
byte |
byteValue() |
XMLGregorianCalendar |
calendarValue() |
BigDecimal |
decimalValue() |
double |
doubleValue() |
boolean |
equals(Object o) |
float |
floatValue() |
IRI |
getDatatype() |
String |
getLabel() |
Optional<String> |
getLanguage() |
Optional<XSD.Datatype> |
getXsdDatatype() |
int |
hashCode() |
BigInteger |
integerValue() |
int |
intValue() |
long |
longValue() |
protected void |
setDatatype(IRI datatype) |
protected void |
setDatatype(XSD.Datatype datatype) |
protected void |
setLabel(String label) |
protected void |
setLanguage(String language) |
short |
shortValue() |
String |
stringValue() |
String |
toString()
Returns the label of the literal with its language or datatype.
|
temporalAccessorValue, temporalAmountValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitisBNode, isIRI, isResource, isTripleprotected SimpleLiteral()
protected SimpleLiteral(String label)
label - The label for the literal, must not be null.protected SimpleLiteral(String label, String language)
label - The label for the literal, must not be null.language - The language tag for the literal, must not be null and not be empty.protected SimpleLiteral(String label, IRI datatype)
label - The label for the literal, must not be null.datatype - The datatype for the literal.protected SimpleLiteral(String label, XSD.Datatype datatype)
protected void setLabel(String label)
public String getLabel()
protected void setLanguage(String language)
protected void setDatatype(IRI datatype)
protected void setDatatype(XSD.Datatype datatype)
public IRI getDatatype()
public Optional<XSD.Datatype> getXsdDatatype()
public boolean equals(Object o)
equals in interface Literalequals in class AbstractLiteralpublic int hashCode()
hashCode in interface LiteralhashCode in class AbstractLiteralpublic String toString()
toString in class AbstractLiteralorg.eclipse.rdf4j.rio.ntriples.NTriplesUtil#toNTriplesString(org.eclipse.rdf4j.model.Literal)public String stringValue()
stringValue in interface ValuestringValue in class AbstractLiteralpublic boolean booleanValue()
booleanValue in interface LiteralbooleanValue in class AbstractLiteralpublic byte byteValue()
byteValue in interface LiteralbyteValue in class AbstractLiteralpublic short shortValue()
shortValue in interface LiteralshortValue in class AbstractLiteralpublic int intValue()
intValue in interface LiteralintValue in class AbstractLiteralpublic long longValue()
longValue in interface LiterallongValue in class AbstractLiteralpublic float floatValue()
floatValue in interface LiteralfloatValue in class AbstractLiteralpublic double doubleValue()
doubleValue in interface LiteraldoubleValue in class AbstractLiteralpublic BigInteger integerValue()
integerValue in interface LiteralintegerValue in class AbstractLiteralpublic BigDecimal decimalValue()
decimalValue in interface LiteraldecimalValue in class AbstractLiteralpublic XMLGregorianCalendar calendarValue()
calendarValue in interface LiteralcalendarValue in class AbstractLiteralCopyright © 2015-2021 Eclipse Foundation. All Rights Reserved.