sk.uniba.euromath.gene.exportgraph
Class ExportGraph

java.lang.Object
  extended by sk.uniba.euromath.gene.exportgraph.ExportGraph

public final class ExportGraph
extends Object

Describes full export graph, including processing description of not known namespaces.

In case of unknown namespace, a special exporter will be constructed, converting a XML to XSL-FO as an element tree, similar to opening the XML in a browser without any presentation layout (CSS) attached.

Author:
Martin Vysny

Constructor Summary
ExportGraph(List<? extends GraphNode> regularGraphNodes, List<? extends GraphNode> wildcardGraphNodes)
          Constructor.
 
Method Summary
 void addAllNodes(ExportGraph other, boolean force)
          Adds all nodes from the other graph.
 void addNode(GraphNode node, boolean isRegular, boolean force)
          Registers given node.
 boolean containsRegularOnly()
          Checks if this graph contains only regular paths.
 List<GraphNode> getAllNodes()
          Returns all graph nodes.
 Map<String,GraphNode> getAllNodesAsMap()
          Returns all graph nodes as a map.
 List<GraphNode> getRegularNodes()
          Return unmodifiable list of all regular nodes.
 boolean isEmpty()
          Returns true if this graph does not contain any node.
 boolean isRegular(GraphNode node)
          Checks if given node is a regular graph node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportGraph

public ExportGraph(List<? extends GraphNode> regularGraphNodes,
                   List<? extends GraphNode> wildcardGraphNodes)
Constructor. Clones both lists.

Parameters:
regularGraphNodes - Nodes that are able to process the document using regular exporters. May be null.
wildcardGraphNodes - If no graph path for given document namespace to a coordinator can't be found then a 'wildcard' exporter is used. This exporter transforms any XML document into XSL-FO document. May be null.
Method Detail

containsRegularOnly

public boolean containsRegularOnly()
Checks if this graph contains only regular paths.

Returns:
true if no paths containing wildcard exporters are present in the graph.

getAllNodes

public List<GraphNode> getAllNodes()
Returns all graph nodes.

Returns:
union of regularGraphNodes and wildcardGraphNodes.

getRegularNodes

public List<GraphNode> getRegularNodes()
Return unmodifiable list of all regular nodes.

Returns:
list of nodes that does not use wildcard exporters.

getAllNodesAsMap

public Map<String,GraphNode> getAllNodesAsMap()
Returns all graph nodes as a map. The map maps namespace to the graph node.

Returns:
map of all known export paths.

isEmpty

public boolean isEmpty()
Returns true if this graph does not contain any node.

Returns:
true if the graph is empty.

isRegular

public boolean isRegular(GraphNode node)
Checks if given node is a regular graph node.

Parameters:
node - node to check.
Returns:
true if this node is regular, false if it connects to a wildcard exporter.

addAllNodes

public void addAllNodes(ExportGraph other,
                        boolean force)
Adds all nodes from the other graph. Namespaces of regular nodes already defined in this graph are ignored. Nodes from the other graph are not cloned.

Parameters:
other - the other graph.
force - if true then nodes are registered and replaces previous node if necessary.

addNode

public void addNode(GraphNode node,
                    boolean isRegular,
                    boolean force)
Registers given node. The node is ignored if there is already a regular node, processing the namespace.

Parameters:
node - the node to register
isRegular - whether the node is regular or not.
force - if true then the node is registered and replaces previous node if necessary.


Copyright 2003-2003-2006 null. All Rights Reserved.