SMILA 1.0 API documentation

org.eclipse.smila.ontology.pipelets
Class CreateResourcePipelet

java.lang.Object
  extended by org.eclipse.smila.ontology.pipelets.ASesameRecordPipelet
      extended by org.eclipse.smila.ontology.pipelets.CreateResourcePipelet
All Implemented Interfaces:
Pipelet

public class CreateResourcePipelet
extends ASesameRecordPipelet

ensure that a resource with a specified type and name exists. The name property is configurable, by default rdfs:label is used. The created URIs are written to some attribute for later reference.

Author:
jschumacher

Field Summary
static java.lang.String PARAM_LABELATTRIBUTE
          configuration property/parameter name for specifying the attribute name containing resource names: "labelAttribute".
static java.lang.String PARAM_LABELPREDICATE
          configuration property/parameter name for specifying the predicate used to lookup names: "labelPredicate" (optional, default is rdfs:label).
static java.lang.String PARAM_TYPEURI
          configuration property/parameter name for specifying the URI of the required class: "typeUri".
static java.lang.String PARAM_URIATTRIBUTE
          configuration property/parameter name for specifying the attribute name that takes the created/found URIs: "uriAttribute".
static java.lang.String PARAM_URIPREFIX
          configuration property/parameter name for specifying a prefix for the URIs created from the resource name: "uriPrefix" (optional, default is "urn:").
 
Fields inherited from class org.eclipse.smila.ontology.pipelets.ASesameRecordPipelet
_configuration, _valueHelper, PARAM_RECORDFILTER, PARAM_REPOSITORY
 
Constructor Summary
CreateResourcePipelet()
           
 
Method Summary
 java.lang.String[] process(Blackboard blackboard, java.lang.String[] recordIds)
          process given records.
 
Methods inherited from class org.eclipse.smila.ontology.pipelets.ASesameRecordPipelet
configure, createUri, getParameters, getRepositoryConnection, getSesameOntologyManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_LABELATTRIBUTE

public static final java.lang.String PARAM_LABELATTRIBUTE
configuration property/parameter name for specifying the attribute name containing resource names: "labelAttribute".

See Also:
Constant Field Values

PARAM_URIATTRIBUTE

public static final java.lang.String PARAM_URIATTRIBUTE
configuration property/parameter name for specifying the attribute name that takes the created/found URIs: "uriAttribute".

See Also:
Constant Field Values

PARAM_LABELPREDICATE

public static final java.lang.String PARAM_LABELPREDICATE
configuration property/parameter name for specifying the predicate used to lookup names: "labelPredicate" (optional, default is rdfs:label).

See Also:
Constant Field Values

PARAM_TYPEURI

public static final java.lang.String PARAM_TYPEURI
configuration property/parameter name for specifying the URI of the required class: "typeUri".

See Also:
Constant Field Values

PARAM_URIPREFIX

public static final java.lang.String PARAM_URIPREFIX
configuration property/parameter name for specifying a prefix for the URIs created from the resource name: "uriPrefix" (optional, default is "urn:").

See Also:
Constant Field Values
Constructor Detail

CreateResourcePipelet

public CreateResourcePipelet()
Method Detail

process

public java.lang.String[] process(Blackboard blackboard,
                                  java.lang.String[] recordIds)
                           throws ProcessingException
process given records.

Parameters:
blackboard - Blackboard holding and managing the records.
recordIds - Ids of records to process.
Returns:
Ids of records to be passed into the next pipelet. By default this should be the same as the passed in recordIds unless there is a specific (businesslogic) reason not to do so.
Throws:
ProcessingException - error during processing.

SMILA 1.0 API documentation