sk.uniba.euromath.gene.exportgraph
Class TransformGraph

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

public final class TransformGraph
extends Object

A concrete instance of ExportGraph, with instantiated exporters.

Author:
Martin Vysny

Constructor Summary
TransformGraph()
          Constructs an empty graph.
TransformGraph(TransformGraph other)
          Copy-constructor.
 
Method Summary
 void add(TransformationInfo info, boolean replace)
          Registers given transformation info.
 void addAll(TransformGraph other, boolean replace)
          Registers infos from the other graph.
 void addDirectPipe(String ns, boolean replace)
          States that given namespace is to be transformed as-is to the coordinator.
 Set<String> allNamespaces()
          Returns unmodifiable set of all transformable namespaces.
 boolean contains(String namespace)
          Checks if there is transformer for a namespace.
 TransformationInfo get(String namespace)
          Returns transformer for given namespace.
 boolean isEmpty()
          Returns true if no transformers are registered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformGraph

public TransformGraph()
Constructs an empty graph.


TransformGraph

public TransformGraph(TransformGraph other)
Copy-constructor.

Parameters:
other - clone this graph.
Method Detail

add

public void add(TransformationInfo info,
                boolean replace)
Registers given transformation info. Ignored if there already exists transformationinfo processing the namespace.

Parameters:
info - the info to register. Must not be null.
replace - register always, replacing old info if necessary.
Throws:
NullPointerException - if info is null.

addDirectPipe

public void addDirectPipe(String ns,
                          boolean replace)
States that given namespace is to be transformed as-is to the coordinator. Ignored if there already exists transformationinfo processing the namespace.

Parameters:
ns - the info to register
replace - register always, replacing old info if necessary.

addAll

public void addAll(TransformGraph other,
                   boolean replace)
Registers infos from the other graph. Ignores info if there already exists transformationinfo processing the namespace.

Parameters:
other - register all infos from this graph.
replace - register always, replacing old info if necessary.

get

public TransformationInfo get(String namespace)
Returns transformer for given namespace.

Parameters:
namespace - the namespace
Returns:
transformer. May return null if the namespace is to be passed directly to the coordinator.
Throws:
IllegalArgumentException - if given namespace was not registered using one of the add methods.

contains

public boolean contains(String namespace)
Checks if there is transformer for a namespace.

Parameters:
namespace - a namespace to check
Returns:
true if there is valid transformer.

isEmpty

public boolean isEmpty()
Returns true if no transformers are registered.

Returns:
true if no transformers are registered.

allNamespaces

public Set<String> allNamespaces()
Returns unmodifiable set of all transformable namespaces.

Returns:
namespaces of all transformers registered in this graph.


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