|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.gene.exportgraph.ExportGraphBuilder
public final class ExportGraphBuilder
Builds the export graph due to specified requirements. Thread-safe.
Field Summary | |
---|---|
Set<String> |
forbidden
Forbidden namespaces. |
Set<ExporterInfo> |
preferred
Sets priority of this exporter to 200, regardless of previous priority. |
Constructor Summary | |
---|---|
ExportGraphBuilder()
The constructor. |
Method Summary | |
---|---|
ExportGraph |
newGraph(Collection<? extends String> sourceNamespaces,
CoordinatorInfo info)
For each namespace, a regular export path is constructed via newGraph(String, String) . |
ExportGraph |
newGraph(Collection<? extends String> sourceNamespaces,
String coordinatorId)
For each namespace, a regular export path is constructed via newGraph(String, String) . |
GraphNode |
newGraph(String sourceNamespace,
EnumSet<ResultEnum> provides,
INamespaceAcceptor requires)
Produces a graph of exporters, that are able to process given namespace and return namespaces from given set. |
GraphNode |
newGraph(String sourceNamespace,
EnumSet<ResultEnum> provides,
Map<String,EnumSet<SourceEnum>> requires)
Produces a graph of exporters, that are able to process given namespace and return namespaces from given set. |
GraphNode |
newGraph(String sourceNamespace,
String coordinatorId)
Produces a graph of exporters, that are able to process given namespace and return namespaces from given set. |
GraphNode |
newWildcardGraphNode(String sourceNamespace,
CoordinatorInfo info)
Constructs a new graph node, able to deliver given namespace to the coordinator using a wildcard exporter. |
void |
prefer(String sourceNamespace,
String targetNamespace)
Prefers all exporters that transforms source namespace to target namespace. |
void |
prefer(TransformationInfo info)
Prefers all exporters contained in given transformation object. |
TransformGraph |
toTransformationInfo(ExportGraph graph,
ExportHelper helper,
String coordinatorId,
IGraphEdgeSelector selector)
For each graph node in given graph produces a transformation info. |
TransformationInfo |
toTransformationInfo(GraphNode node,
ExportHelper c,
CoordinatorInfo coordinatorInfo,
IGraphEdgeSelector selector)
Produces the transformation info instance. |
TransformationInfo |
toTransformationInfo(GraphNode node,
ExportHelper c,
EnumSet<ResultEnum> provides,
INamespaceAcceptor requires,
IGraphEdgeSelector selector)
Produces the transformation info instance. |
TransformationInfo |
toTransformationInfo(GraphNode node,
ExportHelper c,
EnumSet<ResultEnum> provides,
Map<String,EnumSet<SourceEnum>> requires,
IGraphEdgeSelector selector)
Produces the transformation info instance. |
TransformationInfo |
toTransformationInfo(GraphNode node,
ExportHelper c,
String coordinatorId,
IGraphEdgeSelector selector)
Produces the transformation info instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Set<String> forbidden
public final Set<ExporterInfo> preferred
Constructor Detail |
---|
public ExportGraphBuilder()
Method Detail |
---|
public TransformationInfo toTransformationInfo(GraphNode node, ExportHelper c, EnumSet<ResultEnum> provides, Map<String,EnumSet<SourceEnum>> requires, IGraphEdgeSelector selector) throws ExportException
node
- a starting nodec
- the exporter helperprovides
- which kinds of input shall be provided to first exporter.
If transforming from XMLAccess then it should be
ResultEnum.DOM
.requires
- which kinds of input is required from last exporters.
Maps namespace URI to the types enum.selector
- may select from multiple edges oriented from given graph
node. If null
then
GraphEdgeSelectors.getFirstOptionSelector()
is used.
null
if document may be directly passed to the coordinator.
ExportException
- if exporter fails to initialize.public TransformationInfo toTransformationInfo(GraphNode node, ExportHelper c, String coordinatorId, IGraphEdgeSelector selector) throws ExportException
node
- a starting nodec
- the exporter contextcoordinatorId
- the coordinator identifier.selector
- may select from multiple edges oriented from given graph
node. If null
then
GraphEdgeSelectors.getFirstOptionSelector()
is used.
null
if document may be directly passed to the coordinator.
ExportException
- if exporter fails to initialize.public TransformationInfo toTransformationInfo(GraphNode node, ExportHelper c, CoordinatorInfo coordinatorInfo, IGraphEdgeSelector selector) throws ExportException
node
- a starting nodec
- the exporter contextcoordinatorInfo
- the coordinator info.selector
- may select from multiple edges oriented from given graph
node. If null
then
GraphEdgeSelectors.getFirstOptionSelector()
is used.
null
if document may be directly passed to the coordinator.
ExportException
- if exporter fails to initialize.public TransformGraph toTransformationInfo(ExportGraph graph, ExportHelper helper, String coordinatorId, IGraphEdgeSelector selector) throws ExportException
graph
- the graph.helper
- exporter helper instance.coordinatorId
- coordinator identifierselector
- may select from multiple edges oriented from given graph
node. If null
then
GraphEdgeSelectors.getFirstOptionSelector()
is used.
toTransformationInfo(GraphNode, ExportHelper, String, IGraphEdgeSelector)
.
ExportException
- if exporter fails to initialize.public TransformationInfo toTransformationInfo(GraphNode node, ExportHelper c, EnumSet<ResultEnum> provides, INamespaceAcceptor requires, IGraphEdgeSelector selector) throws ExportException
node
- a starting nodec
- the exporter contextprovides
- which kinds of input shall be provided to first exporter.
If transforming from XMLAccess then it should be
ResultEnum.DOM
.requires
- which kinds of input is required from last exporters.
Maps namespace URI to the types enum.selector
- may select from multiple edges oriented from given graph
node. If null
then
GraphEdgeSelectors.getFirstOptionSelector()
is used.
null
if document may be directly passed to the coordinator.
ExportException
- if exporter fails to initialize.public GraphNode newGraph(String sourceNamespace, EnumSet<ResultEnum> provides, Map<String,EnumSet<SourceEnum>> requires)
Produces a graph of exporters, that are able to process given namespace and return namespaces from given set. If two paths are found in some point then only the one with higher priority is kept (if they have the same priority then both are kept).
sourceNamespace
- the source namespace of the document that'll be
transformed.provides
- in which format the document is available.requires
- these namespaces is coordinator able to process.
null
if such graph cannot be
constructedpublic GraphNode newGraph(String sourceNamespace, EnumSet<ResultEnum> provides, INamespaceAcceptor requires)
Produces a graph of exporters, that are able to process given namespace and return namespaces from given set. If two paths are found in some point then only the one with higher priority is kept (if they have the same priority then both are kept).
sourceNamespace
- the source namespace of the document that'll be
transformed.provides
- in which format the document is available.requires
- these namespaces is coordinator able to process.
null
if such graph cannot be
constructedpublic GraphNode newGraph(String sourceNamespace, String coordinatorId)
Produces a graph of exporters, that are able to process given namespace and return namespaces from given set. If two paths are found in some point then only the one with higher priority is kept (if they have the same priority then both are kept).
sourceNamespace
- the source namespace of the document that'll be
transformed.coordinatorId
- the coordinator that'll receive the export output.
null
if such graph cannot be
constructedpublic ExportGraph newGraph(Collection<? extends String> sourceNamespaces, String coordinatorId) throws ExportException
For each namespace, a regular export path is constructed via
newGraph(String, String)
. If this fails, a wildcard exporter
*->XSL-FO
is used.
sourceNamespaces
- the source namespaces of the document that'll be
transformed.coordinatorId
- the coordinator that'll receive the export output.
ExportException
- if construction of the wildcard exporter fails.public ExportGraph newGraph(Collection<? extends String> sourceNamespaces, CoordinatorInfo info) throws ExportException
For each namespace, a regular export path is constructed via
newGraph(String, String)
. If this fails, a wildcard exporter
*->XSL-FO
is used.
sourceNamespaces
- the source namespaces of the document that'll be
transformed.info
- the coordinator info instance.
ExportException
- if construction of the wildcard exporter fails.public GraphNode newWildcardGraphNode(String sourceNamespace, CoordinatorInfo info) throws ExportException
sourceNamespace
- the namespace to be delivered.info
- the coordinator info
ExportException
- when coordinator is not able to handle XSL-FO
input.public void prefer(TransformationInfo info)
info
- the exporter tree. All exporters in this tree are added to
the preferred
set.public void prefer(String sourceNamespace, String targetNamespace)
sourceNamespace
- the source namespace.targetNamespace
- the target namespace.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |