|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gate.creole.ontology.Literal
public class Literal
The class Literal represents a literal value as defined in section 6.5 of http://www.w3.org/TR/rdf-concepts . A literal value consists of a lexical form which is represented as a unicode string and in addition optionally either a language tag or a datatype.
Constructor Summary | |
---|---|
Literal(String value)
Create a plain literal (i.e an untyped literal) without a language tag (the language is null). |
|
Literal(String value,
DataType dataType)
Create a typed literal. |
|
Literal(String value,
Locale language)
Deprecated. Use the constructor Literal(String value, String languagetag) instead |
|
Literal(String value,
String languagetag)
Create a plain literal associated with a language tag. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
DataType |
getDataType()
Gets the datatype of the literal. |
Locale |
getLanguage()
Deprecated. Use the method getLanguageTag() instead. |
String |
getLanguageTag()
The language tag of the literal as a two-character lowercase language code or null if no language tag is associated. |
String |
getValue()
Returns the value (lexical form) associated with this instance of literal. |
int |
hashCode()
|
String |
toString()
This method always returns the string representation of the literal value in the same way as getValue(). |
String |
toTurtle()
The representation of the literal in Turtle language (see http://www.w3.org/TeamSubmission/turtle/) Note that datatype URIs for typed literals will always be represented as full URIs and not use the xsd namespace. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Literal(String value)
@Deprecated public Literal(String value, Locale language)
value
- language
- public Literal(String value, String languagetag)
value
- languagetag
- public Literal(String value, DataType dataType) throws InvalidValueException
value
- dataType
-
InvalidValueException
Method Detail |
---|
public DataType getDataType()
public String getValue()
@Deprecated public Locale getLanguage()
public String getLanguageTag()
public String toString()
toString
in class Object
public String toTurtle()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |