|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.model.impl.LiteralImpl
public class LiteralImpl
An implementation of the Literal interface.
| Constructor Summary | |
|---|---|
LiteralImpl(String label)
Creates a new plain literal with the supplied label. |
|
LiteralImpl(String label,
String language)
Creates a new plain literal with the supplied label and language tag. |
|
LiteralImpl(String label,
URI datatype)
Creates a new datyped literal with the supplied label and datatype. |
|
| Method Summary | |
|---|---|
boolean |
booleanValue()
Returns the boolean value of this literal. |
byte |
byteValue()
Returns the byte value of this literal. |
XMLGregorianCalendar |
calendarValue()
Returns the XMLGregorianCalendar value of this literal. |
BigDecimal |
decimalValue()
Returns the decimal value of this literal. |
double |
doubleValue()
Returns the double value of this literal. |
boolean |
equals(Object o)
Compares a literal object to another object. |
float |
floatValue()
Returns the float value of this literal. |
URI |
getDatatype()
Gets the datatype for this literal. |
String |
getLabel()
Gets the label of this literal. |
String |
getLanguage()
Gets the language tag for this literal, normalized to lower case. |
int |
hashCode()
Returns the literal's hash code. |
BigInteger |
integerValue()
Returns the integer value of this literal. |
int |
intValue()
Returns the int value of this literal. |
long |
longValue()
Returns the long value of this literal. |
short |
shortValue()
Returns the short value of this literal. |
String |
stringValue()
Returns the String-value of a Value object. |
String |
toString()
Returns the label of the literal. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LiteralImpl(String label)
label - The label for the literal, must not be null.
public LiteralImpl(String label,
String language)
label - The label for the literal, must not be null.language - The language tag for the literal.
public LiteralImpl(String label,
URI datatype)
label - The label for the literal, must not be null.datatype - The datatype for the literal.| Method Detail |
|---|
public String getLabel()
Literal
getLabel in interface Literalpublic String getLanguage()
Literal
getLanguage in interface Literalpublic URI getDatatype()
Literal
getDatatype in interface Literalpublic boolean equals(Object o)
Literal
equals in interface Literalequals in class Objecto - The object to compare this literal to.
Literal and if their labels, language tags and datatypes
are equal.public int hashCode()
Literal
hashCode in interface LiteralhashCode in class Objectpublic String toString()
toString in class Objectpublic String stringValue()
ValueLiteral's label, a URI's URI or a BNode's ID.
stringValue in interface Valuepublic boolean booleanValue()
Literal
booleanValue in interface Literalpublic byte byteValue()
Literal
byteValue in interface Literalpublic short shortValue()
Literal
shortValue in interface Literalpublic int intValue()
Literal
intValue in interface Literalpublic long longValue()
Literal
longValue in interface Literalpublic float floatValue()
Literal
floatValue in interface Literalpublic double doubleValue()
Literal
doubleValue in interface Literalpublic BigInteger integerValue()
Literal
integerValue in interface Literalpublic BigDecimal decimalValue()
Literal
decimalValue in interface Literalpublic XMLGregorianCalendar calendarValue()
LiteralXMLGregorianCalendar value of this literal. A calendar
representation can be given for literals whose label conforms to the
syntax of the following XML
Schema datatypes: dateTime, time,
date, gYearMonth, gMonthDay,
gYear, gMonth or gDay.
calendarValue in interface Literal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||