public class TransformationsGraphImpl extends Object implements TransformationsGraph
Transformations� Graph is responsible to find transformationUnit units which can be used in order to perform a transformationUnit for an object, from its content type (source) to a target content type. The transformations� graph consists of nodes which correspond to content types and edges to transformationUnit units.
The selection of the transformationUnit units is based to the following rules. In the beginning the graph searches for transformationUnit units which have exact match of the source and target content types. If no one is available, the graph tries to search for a path in the graph from the source content type to the target content type and thus create a composite transformationUnit unit. If the graph does not manage to find a path, it searches for existing transformationUnit units or paths but for content types which do not have exact match i.e. the media type and the subtype identifier are always taken under consideration but for the parameters the rule is that if the parameters of the content type (source / target) denoted in the transformationUnit unit are contained and their values match with the object�s content type / the target of the transformationUnit respectively, then the transformationUnit unit is supposed to support the transformationUnit even if the source�s object / target content type contains more parameters.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
TransformationsGraphImpl.Consistency |
| Constructor and Description |
|---|
TransformationsGraphImpl(IManager imanager)
Instantiates a new TransformationsGraphImpl
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys the graph.
|
ArrayList<TransformationUnit> |
findAnyTransformationUnits(ContentType sourceContentType,
ContentType targetContentType,
boolean createAndPublishCompositeTP)
Finds Transformation Units from the sourceContentType to the targetContentType.
|
ArrayList<TransformationUnit> |
findApplicableTransformationUnits(ContentType sourceContentType,
ContentType targetContentType,
boolean createAndPublishCompositeTP)
Finds applicable Transformation Units from the sourceContentType to the targetContentType.
|
ArrayList<ContentType> |
findAvailableTargetContentTypes(ContentType sourceContentType)
Finds the available target ContentTypes from the sourceContentType.
|
protected void |
update()
Updates the TransformationsGraphImpl
|
public TransformationsGraphImpl(IManager imanager)
imanager - The IManager from which the graph will read information.public void destroy()
TransformationsGraphdestroy in interface TransformationsGraphTransformationsGraph.destroy()protected void update()
throws Exception
Exceptionpublic ArrayList<TransformationUnit> findApplicableTransformationUnits(ContentType sourceContentType, ContentType targetContentType, boolean createAndPublishCompositeTP)
TransformationsGraphfindApplicableTransformationUnits in interface TransformationsGraphsourceContentType - The ContentType of the source DataElement.targetContentType - The ContentType of the target DataElement.createAndPublishCompositeTP - If true then a new composite TransformationProgram is created and published if no available TransformationProgram exists.TransformationsGraph.findApplicableTransformationUnits(org.gcube.datatransformation.datatransformationlibrary.model.ContentType, org.gcube.datatransformation.datatransformationlibrary.model.ContentType, boolean)public ArrayList<TransformationUnit> findAnyTransformationUnits(ContentType sourceContentType, ContentType targetContentType, boolean createAndPublishCompositeTP)
TransformationsGraphfindAnyTransformationUnits in interface TransformationsGraphsourceContentType - The ContentType of the source DataElement.targetContentType - The ContentType of the target DataElement.createAndPublishCompositeTP - If true then a new composite TransformationProgram is created and published if no available TransformationProgram exists.TransformationsGraph.findAnyTransformationUnits(org.gcube.datatransformation.datatransformationlibrary.model.ContentType, org.gcube.datatransformation.datatransformationlibrary.model.ContentType, boolean)public ArrayList<ContentType> findAvailableTargetContentTypes(ContentType sourceContentType)
TransformationsGraphfindAvailableTargetContentTypes in interface TransformationsGraphsourceContentType - The ContentType of the source DataElement.TransformationsGraph.findAvailableTargetContentTypes(org.gcube.datatransformation.datatransformationlibrary.model.ContentType)Copyright © 2014. All Rights Reserved.