org.openanzo.glitter.rdf
Class PlainLiteral
java.lang.Object
org.openanzo.glitter.rdf.Literal
org.openanzo.glitter.rdf.PlainLiteral
- All Implemented Interfaces:
- ILiteralTerm, IPlainLiteralTerm, RDFTerm, TriplePatternComponent
public class PlainLiteral
- extends Literal
- implements IPlainLiteralTerm
An implementation of IPlainLiteralTerm to represent plain literals in
a query parsed by Glitter.
- Author:
- lee
|
Constructor Summary |
PlainLiteral(java.lang.String value)
Build a plain literal from its lexical value. |
PlainLiteral(java.lang.String value,
java.lang.String language)
Build a plain literal from its lexical value and language. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
PlainLiteral
public PlainLiteral(java.lang.String value,
java.lang.String language)
- Build a plain literal from its lexical value and language.
- Parameters:
value - language -
PlainLiteral
public PlainLiteral(java.lang.String value)
- Build a plain literal from its lexical value.
- Parameters:
value -
getLanguage
public java.lang.String getLanguage()
- Specified by:
getLanguage in interface IPlainLiteralTerm
- Returns:
- The language tag for this plain literal. May be null, unless
IPlainLiteralTerm.hasLanguage()
returns true.
hasLanguage
public boolean hasLanguage()
- Specified by:
hasLanguage in interface IPlainLiteralTerm
- Returns:
- whether or not this literal has a language tag
getLexicalForm
public java.lang.String getLexicalForm()
- Specified by:
getLexicalForm in interface ILiteralTerm- Specified by:
getLexicalForm in class Literal
- Returns:
- The lexical form of the literal.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
compareTo
public int compareTo(TriplePatternComponent o)
- Description copied from interface:
TriplePatternComponent
- Compares to TriplePatternComponents for ordering.
- Specified by:
compareTo in interface TriplePatternComponent
- Returns:
- -1 if this comes before other; 0 if
TriplePatternComponent.equals(Object) is
true, and 1 otherwise.
isPlainLiteral
public boolean isPlainLiteral()
- Specified by:
isPlainLiteral in interface ILiteralTerm
- Returns:
- whether or not this is a plain literal.
isTypedLiteral
public boolean isTypedLiteral()
- Specified by:
isTypedLiteral in interface ILiteralTerm
- Returns:
- whether or not this is a typed literal.
Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.