store/Pipeline

Source:

Methods

addTransform(type, args) → {String}

Description:
  • Adds a new transform.

Source:
Parameters:
Name Type Description
type String

one of the getTransforms.

args Object

a hash of key value pairs for this transform.

Returns:

the newly transforms id (for this session, may change after save / load so take care).

Type
String

execute(sourceEntry, params) → {entryURIArrayPromise}

Description:
  • Executes the pipeline with the given source entry as input, if not provided the pipeline will be used as sourceentry.

Source:
Parameters:
Name Type Description
sourceEntry Entry

an optional entry containing some data that is to be transformed, e.g. can be a CSV file.

params object

additional parameters used in the execution of the pipeline, e.g. action (with value create, replace or append) and datasetURL pointing to the existing dataset in rowstore.

Returns:

an array of entry URIs that where created/modified by this execution.

Type
entryURIArrayPromise

getDestination() → {String|undefined}

Description:
  • The destination where the result (in the form of a single RDF graph) should end up (within the specified entry's graph resource). If empty string, a new entry will be created to store the results. If undefined, the result will not go to a single destination, see getDetectDestination instead. Some transform types does not respect the destination, e.g. currently ROWSTORE which always creates a new entry containing the results.

Source:
Returns:

an entry URI where the result should go, empty string for new entries for every execution or undefined if no destination has been specified.

Type
String | undefined

getDetectDestination() → {boolean}

Description:
  • Detect destination means that the result of the last transform (a graph) should be attempted to be split into multiple entries according to markings in the graph.

    I.e. it detects and adds a set of entries from the graph via the anonymous closure algorithm starting from blank nodes resources with either one of the two following properties that both indicate which entryId to use:

    • http://entrystore.org/terms/mergeResourceId or the
    • http://entrystore.org/terms/referenceResourceId
    The mergeResourceId indicates that the corresponding entry should be merged or created if it does not exist. The referenceResourceId only indicates that another entry (via its resource id) should be referenced from the graph (which might be inside an entry indicated by mergeResourceId).
Source:
Returns:

true if destination should be detected.

Type
boolean

getPipelineArgumentStatements(argumentType) → {Array.<rdfjson/Statement>}

Description:
  • Get arguments marked with a specific type or all otherwise

Source:
Parameters:
Name Type Description
argumentType
Returns:
Type
Array.<rdfjson/Statement>

getPipelineArguments(argumentType) → {Object}

Description:
  • Get the pipeline generic arguments

Source:
To Do:
  • make Map?
Parameters:
Name Type Description
argumentType
Returns:

there's a one to one mapping between object <key, values> and argument <key, value>

Type
Object

getPriority(transformId) → {number}

Source:
Parameters:
Name Type Description
transformId String

the blank node of a specific transform as retrieved by getTransforms.

Returns:

the priority as a float.

Type
number

getTransformArguments(transformId) → {Object|undefined}

Source:
Parameters:
Name Type Description
transformId String

the blank node of a specific transform as retrieved by getTransforms. If no id is provided arguments from all transforms will be returned in a single merged object.

Returns:

the arguments for a transform (or all transforms) as an object hash with property value pairs.

Type
Object | undefined

getTransformArgumentsKeys(transformId) → {Array}

Source:
Parameters:
Name Type Default Description
transformId String null

the blank node of a specific transform as retrieved by getTransforms.

Returns:

of arguments' keys

Type
Array

getTransformForType(transformType) → {string|undefined}

Description:
  • Finds a transform with the given type and returns its id.

Source:
Parameters:
Name Type Description
transformType

the transform type to look for

Returns:

transform id, undefined if no transform was found for the given type

Type
string | undefined

getTransformProperty(transformType, property) → {*|undefined}

Description:
  • Retrieves a transform argument value for a specific transform type and property (key).

Source:
Parameters:
Name Type Description
transformType string
property string
Returns:
Type
* | undefined

getTransformType(transformId) → {String}

Source:
Parameters:
Name Type Description
transformId String

the blank node of a specific transform as retrieved by getTransforms.

Returns:

one of the values specified in Pipeline#transformTypes.

Type
String

getTransforms() → {Array.<String>}

Source:
Returns:

of transform ids, typically blank node ids, hence, they are not preserved between saves / loads so take care.

Type
Array.<String>

removePipelineArguments(argumentType)

Description:
  • Remove all argument statements

Source:
Parameters:
Name Type Description
argumentType

removeTransform(transformId)

Description:
  • Removes a transform.

Source:
See:
  • Pipeline#getTransforms
Parameters:
Name Type Description
transformId String

the blank node of a specific transform as retrieved by getTransforms.

setDestination(entryOrEntryURI)

Source:
See:
  • Pipeline#getDestination
Parameters:
Name Type Description
entryOrEntryURI String

entry URI, empty string for new entries every time, use undefined to remove destination setting altogether.

setDetectDestination(detect)

Source:
See:
  • Pipeline#getDetectDestination
Parameters:
Name Type Description
detect boolean

if true detection of entry references in the graph is attempted.

setOrderOfTransforms(transforms)

Description:
  • Changes the order of the transforms by changing their priority properties.

Source:
See:
  • Pipeline#getTransforms
Parameters:
Name Type Description
transforms Array

getTransforms.

setPipelineArguments(args, argumentType)

Description:
  • Generic <key, value, type> arguments to be saved in the pipeline resource Removes existing arguments by argumentType

Source:
Parameters:
Name Type Description
args
argumentType

setPriority(transformId, prio)

Description:
  • It is recommended to use setOrderOfTransforms instead.

Source:
See:
  • Pipeline#setOrderOfTransforms
Parameters:
Name Type Description
transformId String

the blank node of a specific transform as retrieved by getTransforms.

prio number

the priority as a float.

setTransformArguments(transformId, args)

Description:
  • Replaces the current arguments with those provided.

Source:
Parameters:
Name Type Description
transformId String

the blank node of a specific transform as retrieved by getTransforms.

args Object

the arguments for the transform as an object hash with property value pairs.

setTransformProperty(transformIdOrType, key, value)

Description:
  • Sets or updates an individual property (key-value pair in arguments) of a transform. The transform is identified either explicitly by an id or via a transformType (assumed unique).

Source:
Parameters:
Name Type Description
transformIdOrType string

corresponds to the transform to change the property for

key string
value string

setTransformType(transformId, transformType)

Source:
Parameters:
Name Type Description
transformId String

the blank node of a specific transform as retrieved by getTransforms.

transformType String

one of the options in Pipeline#transformTypes.