public abstract class ProcessElementIdentifierTools
extends java.lang.Object
URI := [<elementType>BASE_TYPE_DELIMITER]BASE[IDENTIFIER_PATH_REL_TO_BASE][?<Field>][#RANGE]
BASE_TYPE_DELIMITER := BASE_TYPE_DELIMITER
BASE := <baseType>[//AUTHORITY]/BASE_ID
AUTHORITY := <symbolicNameOfAuthority>
BASE_ID := PATH_ID
IDENTIFIER_PATH_REL_TO_BASE := /PATH_ID[/PATH_ID]*
PATH_ID := <id> | (<id>[PATH_ID_DELIMITER<id>]+)
PATH_ID_DELIMITER := PATH_ID_DELIMITER
RANGE := (<startIndex>RANGE_DELIMITER<endIndex>)
RANGE_DELIMITER := RANGE_DELIMITER
TYPE := [<elementType>BASE_TYPE_DELIMITER]<baseType>
IDENTIFIER_PATH := /BASE_ID[IDENTIFIER_PATH_REL_TO_BASE]
The BASE identifies the template or the instance the referenced process element belongs to. The authority the designated template or instance belongs to is specified by a symbolic name. The currently valid authority has to be looked up with the aid of a naming service. The given symbolic name is the key. This ensures that the designated template or instance may be migrated to another authority (i. e. server) without the need of adapting the URIs that reference it.
The RANGE argument narrows the referenced element further (see example).
Example: In order to report that the staff assignment rule of the node with
nodeID = 5 that belongs to the instance with instanceID = 0 is incorrect in
the range 2nd to 4th character the following process element URI may be
offered to the user:
node-instance://localhost/0/5?StaffAssignmentRule#(2-4)
It is assumed that the instance is hosted in the locally executed ADEPT2
system. The BASE 'instance://localhost/0' references the
affected instance.
The URI generation of the following process elements is supported:
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BASE_TYPE_DELIMITER
Determines the delimiter used to separate the type of the base
(Template/Instance) from the type the identified process element is of.
|
protected static java.util.logging.Logger |
logger
The logger instance used to log error messages.
|
static java.lang.String |
PATH_ID_DELIMITER
Determines the delimiter used to separate the parts of a locally valid
process element ID.
|
static java.lang.String |
RANGE_DELIMITER
Determines the delimiter that seperates the start and the end index of the
RANGE part of the process element URI:
|
| Constructor and Description |
|---|
ProcessElementIdentifierTools() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
generateIdentifierPathRelToBase(Node node,
ExecutableBusinessProcess ebp,
ProcessModelParameter parameter) |
static java.lang.String |
generateIdentifierPathRelToBase(Node startNode,
Node endNode) |
static java.net.URI |
generateProcessElementIdentifierURI(java.net.URI baseURI,
java.lang.String elementType,
java.lang.String identifierPathRelToBase)
Sets up the process element identifier URI by the aid of the passed
information.
|
static java.net.URI |
generateProcessElementIdentifierURI(java.net.URI baseURI,
java.lang.String elementType,
java.lang.String identifierPathRelToBase,
java.lang.String field)
Sets up the URI that references a certain field of a process element by the
aid of the passed information.
|
static java.net.URI |
generateProcessElementIdentifierURI(java.net.URI baseURI,
java.lang.String elementType,
java.lang.String identifierPathRelToBase,
java.lang.String field,
java.lang.String range)
Sets up the URI that references a certain field of a process element by the
aid of the passed information.
|
static java.net.URI |
getBase(java.net.URI elementIdentifier)
Returns the process element identifer URI of the base mentioned within the
passed element identifier URI.
|
static java.lang.String |
getBaseID(java.net.URI elementIdentifier)
Returns the ID of the Template or Instance that is the base of the
referenced process element.
|
static java.lang.String |
getBaseType(java.net.URI elementIdentifier)
Returns type of the process element identified as the base of the passed
process element identifier URI.
|
static java.net.URI |
getBlockIdentifier(java.net.URI baseURI,
Node startNode,
Node endNode) |
static java.net.URI |
getBranchIdentifier(java.net.URI baseURI,
Node startNode,
Node endNode) |
static java.net.URI |
getDataEdgeIdentifier(java.net.URI baseURI,
Node node,
DataElement dataElement,
ActivityConstants.AccessType direction)
Sets up the process element identifier URI for the specified data edge
(node, dataElement, direction). |
static java.net.URI |
getDataElementIdentifier(java.net.URI baseURI,
DataElement dataElement)
Sets up the process element identifier URI for the given data element.
|
static java.net.URI |
getDataElementIdentifier(java.net.URI baseURI,
DataElement dataElement,
java.lang.String field)
Sets up the process element identifier URI for the given data element.
|
static java.net.URI |
getDataElementIdentifier(java.net.URI baseURI,
DataElement dataElement,
java.lang.String field,
java.lang.String range)
Sets up the process element identifier URI for the given data element.
|
static java.net.URI |
getEBPIdentifier(java.net.URI baseURI,
Node node,
ExecutableBusinessProcess ebp)
Sets up the process element identifier URI for the given EBP.
|
static java.net.URI |
getEdgeIdentifier(java.net.URI baseURI,
Node startNode,
Node endNode,
ProcessConstants.EdgeType type) |
static java.lang.String |
getElementID(java.net.URI elementIdentifier)
Returns the locally valid ID assigned to the process element referenced by
the given URI.
|
static java.lang.String |
getElementType(java.net.URI elementIdentifier)
Returns the type of the element referenced by the URI.
|
static java.lang.String |
getField(java.net.URI elementIdentifier)
Returns the field referenced be the passed URI or null if no field is
referenced by the URI.
|
static java.lang.String |
getIdentifierPath(java.net.URI elementIdentifier)
Returns the identifier path of the passed URI.
|
static java.lang.String |
getIdentifierPathRelToBase(java.net.URI elementIdentifier)
Returns the identifier path without the leading baseID.
|
static java.net.URI |
getInstanceIdentifier(java.lang.String symbolicNameOfAuthority,
Instance instance)
Constructs the process element identifier URI for the given instance.
|
static java.net.URI |
getNodeIdentifier(java.net.URI baseURI,
Node node)
Sets up the process element identifier URI for the given node.
|
static java.net.URI |
getNodeIdentifier(java.net.URI baseURI,
Node node,
java.lang.String field)
Sets up the process element identifier URI for specified field of the given
node.
|
static java.net.URI |
getNodeIdentifier(java.net.URI baseURI,
Node node,
java.lang.String field,
java.lang.String range)
Sets up the process element identifier URI for specified field of the given
node and detail it with the given range.
|
static java.net.URI |
getParameterIdentifier(java.net.URI baseURI,
Node node,
ExecutableBusinessProcess ebp,
ProcessModelParameter parameter) |
static java.net.URI |
getParameterIdentifier(java.net.URI baseURI,
Node node,
ExecutableBusinessProcess ebp,
ProcessModelParameter parameter,
java.lang.String field) |
static java.net.URI |
getParameterIdentifier(java.net.URI baseURI,
Node node,
ExecutableBusinessProcess ebp,
ProcessModelParameter parameter,
java.lang.String field,
java.lang.String range) |
static java.lang.String[] |
getPathIDsOfIdentifierPath(java.net.URI elementIdentifier)
Returns the single IDs mentioned within the identifier path ordered by
their occurrence.
|
static java.lang.String |
getRange(java.net.URI elementIdentifier)
Returns the range specified within the process element identifier URI or
null if no range is specified.
|
static java.net.URI |
getTemplateIdentifier(Template template,
java.lang.String symbolicNameOfAuthority)
Constructs the process element identifier URI for the given template.
|
static java.lang.String |
getType(java.net.URI elementIdentifier)
Returns the type of the process element URI.
|
static java.lang.String[] |
getTypesOfIdentifierPath(java.net.URI elementIdentifier)
Returns the types of the process elements the IDs of the identifier path
are linked to.
|
protected static final java.util.logging.Logger logger
public static final java.lang.String BASE_TYPE_DELIMITER
public static final java.lang.String PATH_ID_DELIMITER
'-' a data edge is locally identified by
(nodeID-dataelementID-dataAccess). Be aware: The
PATH_ID_DELIMITER must not be '/'!public static final java.lang.String RANGE_DELIMITER
public static java.lang.String getType(java.net.URI elementIdentifier)
TYPE := [<elementType>BASE_TYPE_DELIMITER]<baseType>elementIdentifier - the process element URI to be parsed.public static java.net.URI getBase(java.net.URI elementIdentifier)
elementIdentifier - the process element URI to be parsedpublic static java.lang.String getBaseID(java.net.URI elementIdentifier)
BASE_ID:= <id> | (<id>[PATH_ID_DELIMITER<id>]+)elementIdentifier - the process element URI to be parsed.public static java.lang.String getBaseType(java.net.URI elementIdentifier)
elementIdentifier - the process element URI to be parsed.public static java.lang.String getElementType(java.net.URI elementIdentifier)
elementIdentifier - the process element URI to be parsed.public static java.lang.String getIdentifierPath(java.net.URI elementIdentifier)
IDENTIFIER_PATH := /BASE_ID[IDENTIFIER_PATH_REL_TO_BASE]
with
BASE_ID := PATH_ID.
IDENTIFIER_PATH_REL_TO_BASE := /PATH_ID[/PATH_ID]*
PATH_ID := <id> | (<id>[PATH_ID_DELIMITER<id>]+)
PATH_ID_DELIMITER := PATH_ID_DELIMITER
elementIdentifier - elementIdentifier the process element URI to be
parsed.public static java.lang.String getIdentifierPathRelToBase(java.net.URI elementIdentifier)
IDENTIFIER_PATH_REL_TO_BASE := /PATH_ID[/PATH_ID]*
PATH_ID := <id> | (<id>[PATH_ID_DELIMITER<id>]+).
PATH_ID_DELIMITER := PATH_ID_DELIMITER
elementIdentifier - the process element URI to be parsed.public static java.lang.String[] getTypesOfIdentifierPath(java.net.URI elementIdentifier)
Example: This method being applied to the process element identifier 'dataedge-template://localhost/0/(4-5-Read)'
returns the array ('template', 'dataedge') because the first
ID '0' represents a templateID and second one '(4-5-Read)' identifies the
dataedge belonging to the mentioned template.
elementIdentifier - the process element URI to be parsed.public static java.lang.String[] getPathIDsOfIdentifierPath(java.net.URI elementIdentifier)
Example: This method being applied to the process element identifier 'dataedge-template://localhost/0/(4-5-Read)'
returns the array ('0', '(4-5-Read)').
elementIdentifier - the process element URI to be parsed.public static java.lang.String getElementID(java.net.URI elementIdentifier)
Example: This method being applied to the process element identifier 'dataedge-template://localhost/0/(4-5-Read)'
returns (4-5-READ) as the ID of the dataedge.
elementIdentifier - the process element URI to be parsed.public static java.lang.String getField(java.net.URI elementIdentifier)
elementIdentifier - The process element URI to be parsed.public static java.lang.String getRange(java.net.URI elementIdentifier)
elementIdentifier - The process element URI to be parsed.public static java.net.URI generateProcessElementIdentifierURI(java.net.URI baseURI,
java.lang.String elementType,
java.lang.String identifierPathRelToBase)
baseURI - The template or instance the process element to identify
belongs to.elementType - the type of the process element to identify.identifierPathRelToBase - the identifier path without the base IDnull if an error occurred.public static java.net.URI generateProcessElementIdentifierURI(java.net.URI baseURI,
java.lang.String elementType,
java.lang.String identifierPathRelToBase,
java.lang.String field)
baseURI - The template or instance the process element to identify
belongs to.elementType - the type of the process element to identify.identifierPathRelToBase - the identifier path without the base IDfield - field of the process element to referencenull if an error occurred.public static java.net.URI generateProcessElementIdentifierURI(java.net.URI baseURI,
java.lang.String elementType,
java.lang.String identifierPathRelToBase,
java.lang.String field,
java.lang.String range)
null is
returned.baseURI - The template or instance the process element to identify
belongs to.elementType - the type of the process element to identify.identifierPathRelToBase - the identifier path without the base IDfield - field of the process element to referencerange - The start and the end index of the rangenull if an error occurred (e. g. an
URISyntaxException was thrown or the 'range' parameter is supplied
but not the 'field' parameter).public static java.lang.String generateIdentifierPathRelToBase(Node startNode, Node endNode)
startNode - endNode - public static java.lang.String generateIdentifierPathRelToBase(Node node, ExecutableBusinessProcess ebp, ProcessModelParameter parameter)
node - The node of the ebp the parameter is assigned to.ebp - The ebp the parameter is assigned to.parameter - the parameter that should be identified.public static java.net.URI getTemplateIdentifier(Template template, java.lang.String symbolicNameOfAuthority)
The authority the template belongs to is referenced by a symbolic name. The symbolic name must be resolved with the aid of a naming service.
template - The template that should be referenced by the URI.symbolicNameOfAuthority - The symbolic name of the authority the
template belongs to, used for naming service lookups.public static java.net.URI getInstanceIdentifier(java.lang.String symbolicNameOfAuthority,
Instance instance)
symbolicNameOfAuthority - The symbolic name of the authority the
template belongs to, used for naming service lookups.instance - The template that should be referenced by the URI.null if an error occurred.public static java.net.URI getNodeIdentifier(java.net.URI baseURI,
Node node)
baseURI - The process element identifier URI of the template or
instance the node belongs to.node - the node that should be identified.null if an error occurred.public static java.net.URI getNodeIdentifier(java.net.URI baseURI,
Node node,
java.lang.String field)
baseURI - The process element identifier URI of the template or
instance the given node belongs to.node - The node whose field should be referenced.field - The field of the node that should be referencednull if an error occurred.public static java.net.URI getNodeIdentifier(java.net.URI baseURI,
Node node,
java.lang.String field,
java.lang.String range)
baseURI - The process element identifier URI of the template or
instance the given node belongs to.node - The node whose field should be referenced.field - The field of the node that should be referenced in part.range - The section of the given field that is referenced.null if an error occurred.public static java.net.URI getDataElementIdentifier(java.net.URI baseURI,
DataElement dataElement)
baseURI - The process element identifier URI of the template or
instance the data element belongs to.dataElement - the data element that should be identified.null if an error occurred.public static java.net.URI getDataElementIdentifier(java.net.URI baseURI,
DataElement dataElement,
java.lang.String field)
baseURI - The process element identifier URI of the template or
instance the data element belongs to.dataElement - the data element that should be identified.field - The field that should be referenced.null if an error occurred.public static java.net.URI getDataElementIdentifier(java.net.URI baseURI,
DataElement dataElement,
java.lang.String field,
java.lang.String range)
baseURI - The process element identifier URI of the template or
instance the data element belongs to.dataElement - the data element that should be identified.field - The field, that should be referenced in part.range - The range of the field that should be referenced.null if an error occurred.public static java.net.URI getDataEdgeIdentifier(java.net.URI baseURI,
Node node,
DataElement dataElement,
ActivityConstants.AccessType direction)
(node, dataElement, direction).baseURI - The process element identifier URI of the template or
instance the data edge belongs to.node - The node the data edge is connected to.dataElement - The data element the data edge is connected to.direction - Statement if it is a reading data edge or if it is a
writing data edge.null if an error occurred.public static java.net.URI getEBPIdentifier(java.net.URI baseURI,
Node node,
ExecutableBusinessProcess ebp)
baseURI - The process element identifier URI of the template or
instance the EBP belongs to.node - The node the given EBP is assigned to.ebp - The EBP a process element identifier URI should be created for.null if an error occurred (e. g. the given EBP is
not of type Activity or LightWeightProcess).public static java.net.URI getEdgeIdentifier(java.net.URI baseURI,
Node startNode,
Node endNode,
ProcessConstants.EdgeType type)
baseURI - The process element identifier URI of the template or
instance the edge belongs to.startNode - The node where the edge starts.endNode - The node where the edge ends.type - The type of the given edge.null if an error occurred.public static java.net.URI getBranchIdentifier(java.net.URI baseURI,
Node startNode,
Node endNode)
baseURI - The process element identifier URI of the template or
instance the branch belongs to.startNode - The node where the branch starts.endNode - The first node in a branch or node where the branch ends.null if an error occurred.public static java.net.URI getBlockIdentifier(java.net.URI baseURI,
Node startNode,
Node endNode)
baseURI - The process element identifier URI of the template or
instance the block belongs to.startNode - The node where the block starts.endNode - The node where the block ends.null if an error occurred.public static java.net.URI getParameterIdentifier(java.net.URI baseURI,
Node node,
ExecutableBusinessProcess ebp,
ProcessModelParameter parameter)
baseURI - The process element identifier URI of the template or
instance the parameter belongs to.node - The node of the ebp the parameter is assigned to.ebp - The ebp the parameter is assigned to.parameter - The parameter, that URI should point to.null if an error occurred.public static java.net.URI getParameterIdentifier(java.net.URI baseURI,
Node node,
ExecutableBusinessProcess ebp,
ProcessModelParameter parameter,
java.lang.String field)
baseURI - The process element identifier URI of the template or
instance the parameter belongs to.node - The node of the ebp the parameter is assigned to.ebp - The ebp the parameter is assigned to.parameter - The parameter, that URI should point to.field - The field of the parameter that should be referencednull if an error occurred.public static java.net.URI getParameterIdentifier(java.net.URI baseURI,
Node node,
ExecutableBusinessProcess ebp,
ProcessModelParameter parameter,
java.lang.String field,
java.lang.String range)
baseURI - The process element identifier URI of the template or
instance the parameter belongs to.node - The node of the ebp the parameter is assigned to.ebp - The ebp the parameter is assigned to.parameter - The parameter, that URI should point to.field - The field of the parameter that should be referenced.range - The section of the given field that is referenced.null if an error occurred.