|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mulgara.mrg.Literal
public class Literal
A Literal node.
| Field Summary | |
|---|---|
static int |
TYPE_ID
The type identifier for Literals |
| Constructor Summary | |
|---|---|
Literal(String text)
Create a new simple literal. |
|
Literal(String text,
Object val,
URI type)
Create a structured typed literal. |
|
Literal(String text,
String lang)
Create a language coded literal. |
|
Literal(String text,
String lang,
URI type)
General mechanism for creating a literal. |
|
Literal(String text,
URI type)
Create a typed literal. |
|
| Method Summary | |
|---|---|
int |
compareTo(Node o)
Compares this object with the specified object for order. |
boolean |
equals(Object o)
Equality method. |
String |
getLang()
Gets the language code of this literal. |
String |
getText()
Gets the text of this literal. |
URI |
getType()
Gets the datatype of this literal. |
int |
getTypeId()
A type identifier to distinguish from the other types of Node. |
Object |
getValue()
Gets the typed data from this object. |
int |
hashCode()
The hashcode, based on the label. |
Object |
toJava()
Convert to a Java type. |
String |
toString()
Represents this node as a string. |
boolean |
valueEquals(Literal l)
Equality by value. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_ID
| Constructor Detail |
|---|
public Literal(String text)
text - The text of the literal.
public Literal(String text,
URI type)
text - The text of the literal.type - The URI of the datatype.
public Literal(String text,
Object val,
URI type)
text - The text of the literal.val - The data value for the literal.type - The URI of the datatype.
public Literal(String text,
String lang)
text - The text of the literal.lang - The language of the literal.
public Literal(String text,
String lang,
URI type)
text - The text of the literal.lang - The language of the literal.type - The URI of the datatype.| Method Detail |
|---|
public String getText()
public String getLang()
null.
public URI getType()
null.
public Object getValue()
public boolean valueEquals(Literal l)
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int getTypeId()
getTypeId in interface Nodepublic int compareTo(Node o)
compareTo in interface Comparable<Node>o - the object to be compared.
public String toString()
toString in class Objectpublic Object toJava()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||