eu.larkc.core.data.workflow
Class WorkflowDescription

java.lang.Object
  extended by eu.larkc.core.data.workflow.WorkflowDescription

public class WorkflowDescription
extends java.lang.Object

This class provides functions for extracting information out of a workflow description.

Author:
norlan

Field Summary
static org.openrdf.model.URI CONNECTS_TO_URI
          This URI represents the URI for the predicate connectsTo.
static org.openrdf.model.URI ENDPOINT_CONNECTS_TO_PIPE_URI
          This URI represents that an endpoint is connected to a pipe
static org.openrdf.model.URI ENDPOINT_TYPE_URI
          This URI represents the URI for the predicate endpointType.
static org.openrdf.model.URI IS_INPUT_SPLITTABLE_URI
          This URI represents the plugin parameter which indicates if multi threading can be used with this plugin.
static java.lang.String LARKC
          Namespace for LarKC.
static org.openrdf.model.URI NAMESPACE_URI
          This URI represents a mapping between an abbreviation and the corresponding namespace.
static org.openrdf.model.URI PIPE_HAS_SINK_URI
          This URI represents the predicate to connect a pipe with a sink.
static org.openrdf.model.URI PIPE_HAS_SOURCE_URI
          This URI represents the predicate for connecting a pipe with a source.
static org.openrdf.model.URI PLUGIN_PARAMETER_QUERY
          This URI represents that a plugin has a predefined SPARQL query as a parameter.
static org.openrdf.model.URI PLUGIN_PARAMETERS
          This URI represents that a plugin has specific parameters
static org.openrdf.model.URI PLUGIN_SINK_URI
          This URI represents the predicate for connecting a plugin with a sink.
static java.lang.String RDF
          Namespace for RDF.
static org.openrdf.model.URI RUNS_ON_URI
          This URI represents the URI for the predicate pluginRunsOn.
static org.openrdf.model.URI SOURCE_PLUGIN_URI
          This URI represents the predicate for connecting a source with a plugin.
static org.openrdf.model.URI TYPE_OF_URI
          This URI represents the URI for the predicate pluginType.
static org.openrdf.model.URI WORKFLOW_INPUT_PLUGIN_URI
          This URI represents the workflow input plugin
 
Constructor Summary
WorkflowDescription()
           
 
Method Summary
static org.jgrapht.graph.SimpleDirectedGraph<GraphNode,org.jgrapht.graph.DefaultEdge> constructJGraphT(SetOfStatements workflowDescription)
          This method constructs a JGraphT out of a workflow description.
static boolean containsQuery(SetOfStatements workflowDescription)
          This method checks if the workflow description contains a query.
static SetOfStatements getDeploymentDescriptionForPlugin(SetOfStatements workflowDescription, java.lang.String pluginID)
          This method extracts all deployment statements out of a workflow description that are relevant for a specific plugin.
static java.util.Map<java.lang.String,EndpointNode> getEndpoints(SetOfStatements workflowDescription)
          This method returns all endpoints that are specified in the workflow description.
static java.util.Map<java.lang.String,PipeNode> getPipes(SetOfStatements workflowDescription)
          Extracts all pipes out of a workflow description and returns a map containing the IDs for the pipe and the corresponding pipe node object.
static SetOfStatements getQueryFromWorkflowDescription(SetOfStatements workflowDescription)
          This method extracts the query out of a workflow description
static java.util.Map<java.lang.String,SinkNode> getSinks(SetOfStatements workflowDescription)
          Extracts all sinks of the workflow description.
static java.util.Map<java.lang.String,SourceNode> getSources(SetOfStatements workflowDescription)
          Extracts all sources of the workflow description.
static org.openrdf.model.Statement getSpecificParameterFromPluginParameters(SetOfStatements pluginParameters, java.lang.String parameter)
          Method to extract one specific parameter out of plugin parameters.
static SetOfStatements getWorkflowParametersForPlugin(SetOfStatements workflowDescription, java.lang.String pluginID)
          This method extracts all statements out of a workflow description that are relevant for a specific plugin.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LARKC

public static final java.lang.String LARKC
Namespace for LarKC.

See Also:
Constant Field Values

RDF

public static final java.lang.String RDF
Namespace for RDF.

See Also:
Constant Field Values

CONNECTS_TO_URI

public static final org.openrdf.model.URI CONNECTS_TO_URI
This URI represents the URI for the predicate connectsTo.


TYPE_OF_URI

public static final org.openrdf.model.URI TYPE_OF_URI
This URI represents the URI for the predicate pluginType.


ENDPOINT_TYPE_URI

public static final org.openrdf.model.URI ENDPOINT_TYPE_URI
This URI represents the URI for the predicate endpointType.


PLUGIN_PARAMETERS

public static final org.openrdf.model.URI PLUGIN_PARAMETERS
This URI represents that a plugin has specific parameters


WORKFLOW_INPUT_PLUGIN_URI

public static final org.openrdf.model.URI WORKFLOW_INPUT_PLUGIN_URI
This URI represents the workflow input plugin


RUNS_ON_URI

public static final org.openrdf.model.URI RUNS_ON_URI
This URI represents the URI for the predicate pluginRunsOn.


PLUGIN_PARAMETER_QUERY

public static final org.openrdf.model.URI PLUGIN_PARAMETER_QUERY
This URI represents that a plugin has a predefined SPARQL query as a parameter.


NAMESPACE_URI

public static final org.openrdf.model.URI NAMESPACE_URI
This URI represents a mapping between an abbreviation and the corresponding namespace.


IS_INPUT_SPLITTABLE_URI

public static final org.openrdf.model.URI IS_INPUT_SPLITTABLE_URI
This URI represents the plugin parameter which indicates if multi threading can be used with this plugin.


SOURCE_PLUGIN_URI

public static final org.openrdf.model.URI SOURCE_PLUGIN_URI
This URI represents the predicate for connecting a source with a plugin.


PLUGIN_SINK_URI

public static final org.openrdf.model.URI PLUGIN_SINK_URI
This URI represents the predicate for connecting a plugin with a sink.


PIPE_HAS_SOURCE_URI

public static final org.openrdf.model.URI PIPE_HAS_SOURCE_URI
This URI represents the predicate for connecting a pipe with a source.


PIPE_HAS_SINK_URI

public static final org.openrdf.model.URI PIPE_HAS_SINK_URI
This URI represents the predicate to connect a pipe with a sink.


ENDPOINT_CONNECTS_TO_PIPE_URI

public static final org.openrdf.model.URI ENDPOINT_CONNECTS_TO_PIPE_URI
This URI represents that an endpoint is connected to a pipe

Constructor Detail

WorkflowDescription

public WorkflowDescription()
Method Detail

constructJGraphT

public static org.jgrapht.graph.SimpleDirectedGraph<GraphNode,org.jgrapht.graph.DefaultEdge> constructJGraphT(SetOfStatements workflowDescription)
                                                                                                       throws IllegalWorkflowGraphException
This method constructs a JGraphT out of a workflow description.

Parameters:
workflowDescription - the workflow description
Returns:
a JGraph representing the workflow
Throws:
IllegalWorkflowGraphException

getEndpoints

public static java.util.Map<java.lang.String,EndpointNode> getEndpoints(SetOfStatements workflowDescription)
This method returns all endpoints that are specified in the workflow description.

Parameters:
workflowDescription - The workflow description
Returns:
Returns all endpoints that are specified in this workflow description

getSpecificParameterFromPluginParameters

public static org.openrdf.model.Statement getSpecificParameterFromPluginParameters(SetOfStatements pluginParameters,
                                                                                   java.lang.String parameter)
Method to extract one specific parameter out of plugin parameters.

Parameters:
pluginParameters - The plugin parameters.
parameter - The parameter looking for.
Returns:
The specific parameter.

getWorkflowParametersForPlugin

public static SetOfStatements getWorkflowParametersForPlugin(SetOfStatements workflowDescription,
                                                             java.lang.String pluginID)
                                                      throws MultiplePluginParametersException
This method extracts all statements out of a workflow description that are relevant for a specific plugin.

Parameters:
workflowDescription - the workflow description
pluginID - the id of the plugin
Returns:
returns all relevant statements for the specific plugin
Throws:
MultiplePluginParametersException

getDeploymentDescriptionForPlugin

public static SetOfStatements getDeploymentDescriptionForPlugin(SetOfStatements workflowDescription,
                                                                java.lang.String pluginID)
This method extracts all deployment statements out of a workflow description that are relevant for a specific plugin.

Parameters:
workflowDescription - the workflow description
pluginID - the id of the plugin
Returns:
returns the relevant deployment statements for the specific plugin

getQueryFromWorkflowDescription

public static SetOfStatements getQueryFromWorkflowDescription(SetOfStatements workflowDescription)
This method extracts the query out of a workflow description

Parameters:
workflowDescription - the workflow description
Returns:
the query if existend

containsQuery

public static boolean containsQuery(SetOfStatements workflowDescription)
This method checks if the workflow description contains a query.

Parameters:
workflowDescription - the workflow description
Returns:
true if the workflow description contains a query

getSources

public static java.util.Map<java.lang.String,SourceNode> getSources(SetOfStatements workflowDescription)
                                                             throws IllegalWorkflowGraphException
Extracts all sources of the workflow description.

Parameters:
workflowDescription - The workflow description
Returns:
A map with all sources spezified by the workflow description.
Throws:
IllegalWorkflowGraphException

getSinks

public static java.util.Map<java.lang.String,SinkNode> getSinks(SetOfStatements workflowDescription)
                                                         throws IllegalWorkflowGraphException
Extracts all sinks of the workflow description.

Parameters:
workflowDescription - The workflow description
Returns:
A map with all sinks spezified by the workflow description.
Throws:
IllegalWorkflowGraphException

getPipes

public static java.util.Map<java.lang.String,PipeNode> getPipes(SetOfStatements workflowDescription)
                                                         throws IllegalWorkflowGraphException
Extracts all pipes out of a workflow description and returns a map containing the IDs for the pipe and the corresponding pipe node object.

Parameters:
workflowDescription - the workflow description
Returns:
Map with IDs and pipe node objects.
Throws:
IllegalWorkflowGraphException