org.ontoware.rdf2go.model.node
Class Variable

java.lang.Object
  extended by org.ontoware.rdf2go.model.node.Variable
All Implemented Interfaces:
NodeOrVariable, ResourceOrVariable, UriOrVariable

public class Variable
extends java.lang.Object
implements ResourceOrVariable, UriOrVariable, NodeOrVariable

This variable models wildcards in triple pattern queres. Only onw instance of this class if allows: ANY. This allows type-safe methods.

Author:
voelkel

Field Summary
static Variable ANY
           
 
Method Summary
 BlankNode asBlankNode()
           
 DatatypeLiteral asDatatypeLiteral()
           
 LanguageTagLiteral asLanguageTagLiteral()
           
 Literal asLiteral()
           
 Resource asResource()
           
 URI asURI()
           
 int compareTo(Node other)
           
 boolean equals(java.lang.Object other)
          There is only one Variable, so it's equals to itself.
 int hashCode()
           
 java.lang.String toSPARQL()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY

public static final Variable ANY
Method Detail

asResource

public Resource asResource()
                    throws java.lang.ClassCastException
Throws:
java.lang.ClassCastException

asLiteral

public Literal asLiteral()
                  throws java.lang.ClassCastException
Throws:
java.lang.ClassCastException

asDatatypeLiteral

public DatatypeLiteral asDatatypeLiteral()
                                  throws java.lang.ClassCastException
Throws:
java.lang.ClassCastException

asLanguageTagLiteral

public LanguageTagLiteral asLanguageTagLiteral()
                                        throws java.lang.ClassCastException
Throws:
java.lang.ClassCastException

asURI

public URI asURI()
          throws java.lang.ClassCastException
Throws:
java.lang.ClassCastException

asBlankNode

public BlankNode asBlankNode()
                      throws java.lang.ClassCastException
Throws:
java.lang.ClassCastException

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
There is only one Variable, so it's equals to itself.

Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(Node other)

toSPARQL

public java.lang.String toSPARQL()


Copyright © 2005-2008 FZI - Forschungszentrum Informatik | Karlsruhe | Germany. All Rights Reserved.