org.jrdf.graph.datatype
Class StringValue

java.lang.Object
  extended by org.jrdf.graph.datatype.StringValue
All Implemented Interfaces:
Serializable, Comparable<DatatypeValue>, DatatypeValue, EquivComparable<DatatypeValue>, ValueCreator, Value

public class StringValue
extends Object
implements DatatypeValue

See Also:
Serialized Form

Constructor Summary
protected StringValue()
           
 
Method Summary
 int compareTo(DatatypeValue s)
           
 DatatypeValue create(Object object)
          Create a value based on an Java value.
 DatatypeValue create(String lexicalForm)
           
 boolean equals(Object obj)
           
 int equivCompareTo(DatatypeValue s)
           
 String getLexicalForm()
          Obtain the text of this literal.
 Object getValue()
          Object the native Java type for this value.
 int hashCode()
           
 boolean isWellFormedXML()
          Whether the literal is well formed XML.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringValue

protected StringValue()
Method Detail

create

public DatatypeValue create(Object object)
Description copied from interface: ValueCreator
Create a value based on an Java value. Will fail if there is no mapping registered.

Specified by:
create in interface ValueCreator
Parameters:
object - the Java object to convert to a value.
Returns:
a Value object, usually just wrapping the Java object.

create

public DatatypeValue create(String lexicalForm)
Specified by:
create in interface ValueCreator

getLexicalForm

public String getLexicalForm()
Description copied from interface: Value
Obtain the text of this literal.

Specified by:
getLexicalForm in interface Value
Returns:
the text of the literal, never null

getValue

public Object getValue()
Description copied from interface: Value
Object the native Java type for this value.

Specified by:
getValue in interface Value
Returns:
the native java type for this value.

isWellFormedXML

public boolean isWellFormedXML()
Description copied from interface: Value
Whether the literal is well formed XML.

Specified by:
isWellFormedXML in interface Value
Returns:
whether the literal is wll formed XML.

compareTo

public int compareTo(DatatypeValue s)
Specified by:
compareTo in interface Comparable<DatatypeValue>

equivCompareTo

public int equivCompareTo(DatatypeValue s)
Specified by:
equivCompareTo in interface EquivComparable<DatatypeValue>

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object