org.apache.clerezza.rdf.core.impl
Class TypedLiteralImpl
java.lang.Object
org.apache.clerezza.rdf.core.impl.TypedLiteralImpl
- All Implemented Interfaces:
- Literal, Resource, TypedLiteral
public class TypedLiteralImpl
- extends Object
- implements TypedLiteral
- Author:
- reto
TypedLiteralImpl
public TypedLiteralImpl(String lexicalForm,
UriRef dataType)
- Parameters:
lexicalForm - dataType -
getDataType
public UriRef getDataType()
- Description copied from interface:
TypedLiteral
- Returns the data type which is a UriRef.
Note that the return value is not a node in the graph
- Specified by:
getDataType in interface TypedLiteral
- Returns:
- UriRef
getLexicalForm
public String getLexicalForm()
- Specified by:
getLexicalForm in interface Literal
- Returns:
- the text of this literal
hashCode
public int hashCode()
- Description copied from interface:
TypedLiteral
- The hash code is equal to the hash code of the lexical form
plus the hash code of the dataType
- Specified by:
hashCode in interface TypedLiteral- Overrides:
hashCode in class Object
- Returns:
- hash code
equals
public boolean equals(Object obj)
- Description copied from interface:
TypedLiteral
- Two TypedLiteral nodes are equal iff they have the same lexical form and
the same data type
- Specified by:
equals in interface TypedLiteral- Overrides:
equals in class Object
- Returns:
- true if
obj is an instance of TypedLiteral
for which the lexical form and the data type URI are equal to the ones
of this instance, false otherwise
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.