eu.larkc.core.pluginManager.remote.GAT
Class ResourceDescription

java.lang.Object
  extended by eu.larkc.core.pluginManager.remote.GAT.ResourceDescription

public class ResourceDescription
extends java.lang.Object

This class provides functions for extracting information out of a workflow description and creating GatResourceDescription for the GatPluginManager.

Author:
Alexey Cheptsov

Field Summary
static org.openrdf.model.URI NAMESPACE_URI
          This URI represents a mapping between an abbreviation and the corresponding namespace.
 
Constructor Summary
ResourceDescription()
           
 
Method Summary
static SetOfStatements getDescriptionParametersForResource(SetOfStatements resourceDescription, java.lang.String resourceID)
          This method extracts all statements out of a resource description that are relevant for a specific resource.
static GatResourceDescription getGatResourceDescriptionFromProperties(SetOfStatements resourceProperties)
          Creates a GatResourceDescription out of a SetOfStaments describing the resource
static JeeResourceDescription getJeeResourceDescriptionFromProperties(SetOfStatements resourceProperties)
          Creates a GatResourceDescription out of a SetOfStaments describing the resource
static SetOfStatements getResourceDescriptionFromRdfFile(java.lang.String resourceID)
          This method extracts the resource description out of an .rdf file.
static org.openrdf.model.Statement getResourceTypeForResource(SetOfStatements resourceDescription, java.lang.String resourceID)
          Returns a statement containing the remote resource type (e.g.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE_URI

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

Constructor Detail

ResourceDescription

public ResourceDescription()
Method Detail

getDescriptionParametersForResource

public static SetOfStatements getDescriptionParametersForResource(SetOfStatements resourceDescription,
                                                                  java.lang.String resourceID)
                                                           throws MultiplePluginParametersException
This method extracts all statements out of a resource description that are relevant for a specific resource.

Parameters:
resourceDescription - the SetOfStatements containing resource description
resourceID - the id of the resource the information is to be extracted for
Returns:
returns all relevant statements for the specific resource
Throws:
MultiplePluginParametersException

getResourceTypeForResource

public static org.openrdf.model.Statement getResourceTypeForResource(SetOfStatements resourceDescription,
                                                                     java.lang.String resourceID)
                                                              throws MultiplePluginParametersException
Returns a statement containing the remote resource type (e.g. GAT, Tomcat etc.)

Parameters:
resourceDescription - the SetOfStatements containing resource description
resourceID - the id of the resource the information is to be extracted for
Returns:
returns the statement with the resource type
Throws:
MultiplePluginParametersException

getResourceDescriptionFromRdfFile

public static SetOfStatements getResourceDescriptionFromRdfFile(java.lang.String resourceID)
                                                         throws org.openrdf.rio.RDFParseException,
                                                                org.openrdf.rio.RDFHandlerException,
                                                                java.io.IOException
This method extracts the resource description out of an .rdf file.

Parameters:
resourceID - identification of the resource, used to extract the information from the file "identificator.rdf"
Returns:
returns all relevant statements for the specific resource
Throws:
org.openrdf.rio.RDFParseException
org.openrdf.rio.RDFHandlerException
java.io.IOException

getGatResourceDescriptionFromProperties

public static GatResourceDescription getGatResourceDescriptionFromProperties(SetOfStatements resourceProperties)
Creates a GatResourceDescription out of a SetOfStaments describing the resource

Parameters:
resourceProperties - the SetOfStatements containing resource properties
Returns:
the constructed GatResourceDescription

getJeeResourceDescriptionFromProperties

public static JeeResourceDescription getJeeResourceDescriptionFromProperties(SetOfStatements resourceProperties)
Creates a GatResourceDescription out of a SetOfStaments describing the resource

Parameters:
resourceProperties - the SetOfStatements containing resource properties
Returns:
the constructed GatResourceDescription