|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An RDF Literal.
Literal objects can be interpreted as typed values. The literal string
is considered to be a serialization of the typed value. Methods are
provided for retrieving built in java types which are represented by
the string produced by their toString
method. A generic
method for creating an arbitrary object using a factory is also
provided.
This interface provides methods supporting typed literals. This means
that methods are provided which will translate a built in type, or an
object to an RDF Literal. This translation is done by invoking the
toString()
method of the object, or its built in equivalent.
The reverse translation is also supported. This is built in for built
in types. Factory objects, provided by the application, are used
for application objects.
Method Summary | |
boolean |
equals(java.lang.Object o)
Test whether another object is equal to this object. |
boolean |
getBoolean()
Interpret the literal as a String representation of a Boolean and return its value. |
byte |
getByte()
Interpret the literal as a String representation of a byte and return its value. |
char |
getChar()
Interpret the literal as a String representation of a char and return its value. |
double |
getDouble()
Interpret the literal as a String representation of a double and return its value. |
float |
getFloat()
Interpret the literal as a String representation of a float and return its value. |
int |
getInt()
Interpret the literal as a String representation of an int and return its value. |
java.lang.String |
getLanguage()
If a language is defined for this literal return it |
long |
getLong()
Interpret the literal as a String representation of a long and return its value. |
java.lang.Object |
getObject(ObjectF f)
Interpret the literal as a String representation of an object. |
short |
getShort()
Interpret the literal as a String representation of a short and return its value. |
java.lang.String |
getString()
Return the String value of the literal |
boolean |
getWellFormed()
Return whether Literal is well formed XML |
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.RDFNode |
toString |
Method Detail |
public boolean getBoolean() throws RDFException
RDFException
- Generic RDF Exceptionpublic byte getByte() throws RDFException
RDFException
- Generic RDF Exceptionpublic short getShort() throws RDFException
RDFException
- Generic RDF Exceptionpublic int getInt() throws RDFException
RDFException
- Generic RDF Exceptionpublic long getLong() throws RDFException
RDFException
- Generic RDF Exceptionpublic char getChar() throws RDFException
RDFException
- Generic RDF Exceptionpublic float getFloat() throws RDFException
RDFException
- Generic RDF Exceptionpublic double getDouble() throws RDFException
RDFException
- Generic RDF Exceptionpublic java.lang.String getString() throws RDFException
RDFException
- Generic RDF Exceptionpublic java.lang.Object getObject(ObjectF f) throws RDFException
f
- A factory object for creating the returned object.RDFException
- Generic RDF Exceptionpublic java.lang.String getLanguage()
public boolean getWellFormed()
public boolean equals(java.lang.Object o)
A Literal is equal to another object only if the object is also a Literal and the string value and language of both literals are equal.
equals
in class java.lang.Object
o
- The object to test against
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |