public class EnhNode extends Polymorphic<RDFNode> implements FrontsNode
A specialisation of Polymorphic that models an extended node in a an extended graph. An extended node wraps a normal node, and adds additional convenience access or user affordances, though the state remains in the graph itself.
Modifier and Type  Method and Description 

<T extends RDFNode> 
as(Class<T> t)
allow subclasses to implement RDFNode & its subinterface

Node 
asNode()
Answer the graph node that this enhanced node wraps

<X extends RDFNode> 
canAs(Class<X> t)
APIlevel method for polymorphic testing

boolean 
equals(Object o)
An enhanced node is equal to another enhanced node n iff the underlying
nodes are equal.

EnhGraph 
getGraph()
Answer the graph containing this node

int 
hashCode()
The hash code of an enhanced node is defined to be the same as the underlying node.

boolean 
isAnon()
An enhanced node is Anon[ymous] iff its underlying node is Blank.

boolean 
isLiteral()
An enhanced node is Literal iff its underlying node is too.

boolean 
isResource()
An enhanced node is a resource if it's node is a URI node or a blank node.

boolean 
isURIResource()
An enhanced node is a URI resource iff its underlying node is too.

boolean 
isValid()
answer true iff this enhanced node is still underpinned in the graph
by triples appropriate to its type.

<X extends RDFNode> 
viewAs(Class<X> t)
Answer a facet of this node, where that facet is denoted by the
given type.

addView, supports
public Node asNode()
asNode
in interface FrontsNode
public EnhGraph getGraph()
public final boolean isAnon()
public final boolean isLiteral()
public final boolean isURIResource()
public final boolean isResource()
public <X extends RDFNode> X viewAs(Class<X> t)
t
 A type denoting the desired facet of the underlying nodepublic <T extends RDFNode> T as(Class<T> t)
public final int hashCode()
public final boolean equals(Object o)
equals
in class Polymorphic<RDFNode>
o
 An object to test for equality with this nodepublic boolean isValid()
Polymorphic
isValid
in class Polymorphic<RDFNode>
Licenced under the Apache License, Version 2.0