|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.gene.exportgraph.GraphNode
public final class GraphNode
Represents a single node in the exporter graph. The path may be extended by attaching nodes, however node compatibility must be kept. Equal only to itself.
Field Summary | |
---|---|
ExporterInfo |
info
Exporter that this node represents. |
String |
targetNamespace
If info is null then this represents a namespace of the
source document fragment. |
Method Summary | |
---|---|
void |
attachNode(GraphNode node)
Attaches given node to the followers of this node (creates an edge oriented from this node to given node). |
static void |
checkCompatibility(GraphNode prev,
GraphNode next)
Checks compatibility of these two nodes. |
static void |
checkCompatibility(Set<String> ns,
EnumSet<ResultEnum> nsTypes,
GraphNode next)
Checks compatibility of a node. |
boolean |
equals(Object obj)
|
Set<String> |
getResultNamespaces()
Returns all namespaces for which a child node is registered. |
EnumSet<ResultEnum> |
getResultTypes()
Returns supported result types. |
Set<String> |
getTargets()
Returns all namespaces that this node can produce. |
List<GraphNode> |
getTargets(String namespaceUri)
Returns an unmodifiable list of nodes that may process given namespace. |
boolean |
hasFollowers()
Checks if this node has at least one follower node. |
int |
hashCode()
|
boolean |
isAscendantOf(GraphNode other)
Checks if there is a follower path from this node to the other node. |
boolean |
isSourceNode()
Checks if this graph node is a source node (intended to read data directly from the document). |
static GraphNode |
newExporterNode(ExporterInfo info)
Returns node that represents an exporter. |
static GraphNode |
newSourceNode(String namespace)
Returns node that represents a document source. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final ExporterInfo info
null
if the node
represents a source document fragment.
public final String targetNamespace
null
then this represents a namespace of the
source document fragment.
Method Detail |
---|
public static GraphNode newExporterNode(ExporterInfo info)
info
- exporter info
public static GraphNode newSourceNode(String namespace)
namespace
- namespace of the document fragment.
public void attachNode(GraphNode node)
node
- node to attach.public static void checkCompatibility(Set<String> ns, EnumSet<ResultEnum> nsTypes, GraphNode next)
next
must accept at least
one namespace ns
and next
's source must be
compatible with nsTypes
.
ns
- namespaces produced by previous node.nsTypes
- all kinds of output that previous node is able to produce.next
- a node that'll be linked to the previous node.public static void checkCompatibility(GraphNode prev, GraphNode next)
next
must accept
namespace produced by prev
, and next
's
source must be compatible with prev
's source.
prev
- previous nodenext
- a node that'll be linked to the previous node.public String toString()
toString
in class Object
public List<GraphNode> getTargets(String namespaceUri)
namespaceUri
- the result namespace of this node.
null
if no nodes were registered.public Set<String> getResultNamespaces()
public Set<String> getTargets()
info.targets
(or
targetNamespace
if info is null
)public EnumSet<ResultEnum> getResultTypes()
info.resultTypes
or ResultEnum.DOM
if info is null
.public final boolean equals(Object obj)
equals
in class Object
public final int hashCode()
hashCode
in class Object
public final boolean isSourceNode()
true
if this is source node.public final boolean hasFollowers()
true
if getResultNamespaces()
returns a
non-empty collection.public final boolean isAscendantOf(GraphNode other)
other
node.
other
- the possible descendant of this node.
true
if other node is descendant of this node.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |