|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ca.quine.jcommons.transform.graph.TransformGraph
Constructor Summary | |
TransformGraph(String name)
|
Method Summary | |
void |
addEdge(TransformEdge edge)
|
static List |
createListOfListsOfAllOrders(List labels,
String[] newLabels)
Returns a List of all Lists that start with the elements in the given labels list, and comprise every order of elements from the newLabels String array. |
Path |
dijkstra(String sourceLabel,
String targetLabel)
|
void |
export(IPrintStream out)
|
TreeAndCost |
findMinimumCostTree(String nodeName,
String[] outputTypes)
This method is only used for testing. |
TransformEdge |
getEdgeWithTypes(String parentNode,
String childNode)
|
int |
getGeneticAlgorithmMinSize()
Returns the minimum number of output nodes for which the genetic algorithm will be used to determine the minimum cost path for a given transform. |
Imports |
getImports()
|
String |
getName()
|
TransformNode |
getNodeWithName(String nodeName)
|
int |
getNumEdges()
|
double |
getNumNodes()
|
ITransformer |
getTransformer(Object inputObject,
String inputType,
String[] outputTypes,
Object[] transformReceivers)
Finds a near-optimal path from the input type to all the output types and performs all the transforms to get the input type to those output types. |
ITransformer |
getTransformer(Object inputObject,
String inputType,
String outputType,
Object transformReceiver)
Finds the transforms required to take an Object in the input type to the output type, and then returns it as an ITransformer. |
void |
removeAllEdgeMarkers()
|
void |
removeAllNodeMarkers()
|
static String[] |
removeElement(String[] inputArray,
int i)
|
void |
setGeneticAlgorithmMinSize(int newSize)
Sets the minimum number of output nodes for which the genetic algorithm will be used to determine the minimum cost path for a given transform. |
void |
setImports(Imports imports)
|
void |
setName(String name)
|
void |
transform(Object inputObject,
String inputType,
String[] outputTypes,
Object[] receivers)
|
void |
transform(Object inputObject,
String inputType,
String outputType,
Object transformReceiver)
Finds the transforms required to take an Object in the input type to the output type, and then executes those transforms. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TransformGraph(String name)
Method Detail |
public void setGeneticAlgorithmMinSize(int newSize)
newSize
- public int getGeneticAlgorithmMinSize()
public Imports getImports()
public void setImports(Imports imports)
public String getName()
public void setName(String name)
public void addEdge(TransformEdge edge)
public void transform(Object inputObject, String inputType, String outputType, Object transformReceiver) throws GraphException
inputObject
- inputType
- outputType
- transformReceiver
- must implement <T>, where <T> is
the type in addTransformListener(<T>)
on the final transform that takes the Object to
the output type, or pass null
GraphException
public void transform(Object inputObject, String inputType, String[] outputTypes, Object[] receivers) throws GraphException
GraphException
public ITransformer getTransformer(Object inputObject, String inputType, String outputType, Object transformReceiver) throws GraphException
inputObject
- inputType
- outputType
- transformReceiver
- must implement <T>, where <T> is
the type in addTransformListener(<T>)
on the final transform that takes the Object to
the output type, or pass null
GraphException
public ITransformer getTransformer(Object inputObject, String inputType, String[] outputTypes, Object[] transformReceivers) throws GraphException
inputObject
- inputType
- outputTypes
- transformReceivers
- see transform(Object, String, String, Object)
GraphException
public TreeAndCost findMinimumCostTree(String nodeName, String[] outputTypes) throws GraphException
nodeName
-
GraphException
public Path dijkstra(String sourceLabel, String targetLabel)
public static List createListOfListsOfAllOrders(List labels, String[] newLabels)
labels
- newLabels
- public static String[] removeElement(String[] inputArray, int i)
public void removeAllNodeMarkers()
public void removeAllEdgeMarkers()
public TransformNode getNodeWithName(String nodeName)
public TransformEdge getEdgeWithTypes(String parentNode, String childNode)
public int getNumEdges()
public double getNumNodes()
public void export(IPrintStream out) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |