org.ontoware.rdf2go.model.node.impl
Class ResourceImpl

java.lang.Object
  extended by org.ontoware.rdf2go.model.node.impl.ResourceImpl
All Implemented Interfaces:
java.lang.Comparable<Node>, Node, NodeOrVariable, Resource, ResourceOrVariable
Direct Known Subclasses:
URIImpl

public abstract class ResourceImpl
extends java.lang.Object
implements Resource


Constructor Summary
ResourceImpl()
           
 
Method Summary
 boolean asBoolean()
           
 DatatypeLiteral asDatatypeLiteral()
          A convenience method for a cast to org.ontoware.rdf2go.model.node.DatatypeLiteral
 java.util.Date asDate()
           
 int asInt()
           
 LanguageTagLiteral asLanguageTagLiteral()
          A convenience method for a cast to org.ontoware.rdf2go.model.node.LanguageTagLiteral
 Literal asLiteral()
          A convenience method for a cast to org.ontoware.rdf2go.model.node.Literal
 Resource asResource()
          A convenience method for a cast to org.ontoware.rdf2go.model.node.Resource
 java.lang.String asString()
           
abstract  boolean equals(java.lang.Object other)
           
abstract  int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ontoware.rdf2go.model.node.Node
asBlankNode, asURI, toSPARQL
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

ResourceImpl

public ResourceImpl()
Method Detail

equals

public abstract boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

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

asResource

public Resource asResource()
                    throws java.lang.ClassCastException
Description copied from interface: Node
A convenience method for a cast to org.ontoware.rdf2go.model.node.Resource

Specified by:
asResource in interface Node
Returns:
this Node casted as a Resource
Throws:
java.lang.ClassCastException - if the node is not a Resource

asLiteral

public Literal asLiteral()
                  throws java.lang.ClassCastException
Description copied from interface: Node
A convenience method for a cast to org.ontoware.rdf2go.model.node.Literal

Specified by:
asLiteral in interface Node
Returns:
this Node casted as a Literal
Throws:
java.lang.ClassCastException - if the node is not a Literal

asDatatypeLiteral

public DatatypeLiteral asDatatypeLiteral()
                                  throws java.lang.ClassCastException
Description copied from interface: Node
A convenience method for a cast to org.ontoware.rdf2go.model.node.DatatypeLiteral

Specified by:
asDatatypeLiteral in interface Node
Returns:
this Node casted as a DatatypeLiteral
Throws:
java.lang.ClassCastException - if the node is not a DatatypeLiteral

asLanguageTagLiteral

public LanguageTagLiteral asLanguageTagLiteral()
                                        throws java.lang.ClassCastException
Description copied from interface: Node
A convenience method for a cast to org.ontoware.rdf2go.model.node.LanguageTagLiteral

Specified by:
asLanguageTagLiteral in interface Node
Returns:
this Node casted as a LanguageTagLiteral
Throws:
java.lang.ClassCastException - if the node is not a LanguageTagLiteral

asString

public java.lang.String asString()
                          throws ModelRuntimeException
Throws:
ModelRuntimeException

asInt

public int asInt()
          throws ModelRuntimeException
Throws:
ModelRuntimeException

asBoolean

public boolean asBoolean()
                  throws ModelRuntimeException
Throws:
ModelRuntimeException

asDate

public java.util.Date asDate()
                      throws ModelRuntimeException
Throws:
ModelRuntimeException


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