public class TransformationHelpers
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
buildAddArcFromDirectiveValue(java.lang.String arcType,
java.lang.String fromDocURI)
Build a
TransformationDirective.PREDECESSORS_ADDITION_META directive value. |
static java.lang.String |
buildAddArcFromDirectiveValue(java.lang.String arcType,
java.lang.String rootDocumentURI,
java.lang.String targetDocumentURI)
Build a
TransformationDirective#INCOMING_ARC_ADDITION_META directive value. |
static java.lang.String |
buildAddArcToDirectiveValue(java.lang.String arcType,
java.lang.String toDocURI)
Build a
TransformationDirective.SUCCESSORS_ADDITION_META directive value. |
static java.lang.String |
buildAddArcToDirectiveValue(java.lang.String arcType,
java.lang.String rootDocumentURI,
java.lang.String targetDocumentURI)
Build a
TransformationDirective#OUTGOING_ARC_ADDITION_META directive value. |
static java.lang.String |
buildRemoveArcFromDirectiveValue(java.lang.String arcType,
java.lang.String fromDocURI)
Build a
TransformationDirective.PREDECESSORS_DELETION_META directive value. |
static java.lang.String |
buildRemoveArcFromDirectiveValue(java.lang.String arcType,
java.lang.String rootDocumentURI,
java.lang.String targetDocumentURI)
Build a
TransformationDirective.INCOMING_ARC_DELETION directive value. |
static java.lang.String |
buildRemoveArcToDirectiveValue(java.lang.String arcType,
java.lang.String toDocURI)
Build a
TransformationDirective.SUCCESSORS_DELETION_META directive value. |
static java.lang.String |
buildRemoveArcToDirectiveValue(java.lang.String arcType,
java.lang.String rootDocumentURI,
java.lang.String targetDocumentURI)
Build a
TransformationDirective.OUTGOING_ARC_DELETION directive value. |
static java.lang.String |
buildTypeInheritanceDirectiveValue(java.lang.String type,
java.lang.String... parentTypes)
Build a
ConsolidationDirective.DOCUMENT_TYPE directive value for a document. |
static java.util.List<java.lang.String> |
buildTypeInheritanceList(java.lang.String type,
java.lang.String... parentTypes)
Creates document's type inheritance list.
|
static <T> T |
checkNotNull(T ref,
java.lang.Object errorMessage) |
static java.lang.String |
checkNotNullAndNotEmpty(java.lang.String str,
java.lang.Object errorMessage) |
static java.lang.String |
getDocumentChildrenPath(java.lang.String uri)
Returns the document children path for the given document URI.
|
static java.lang.String |
getDocumentChildrenPath(java.lang.String uri,
java.lang.String path)
Returns the document children path for the given document URI, and optionally append an additional path.
|
static java.lang.String |
validateInput(java.lang.String inputValue,
char[] set) |
static java.lang.String |
validateMonoValuedInput(java.lang.String inputValue)
Validates the given mono-valued input value.
|
static java.lang.String |
validateMultiValuedInput(java.lang.String inputValue)
Validates the given multi-valued input value.
|
public static java.lang.String buildAddArcFromDirectiveValue(@Nonnull java.lang.String arcType, @Nonnull java.lang.String fromDocURI)
TransformationDirective.PREDECESSORS_ADDITION_META
directive value.arcType
- The arc type to consider.fromDocURI
- The URI of the other document defining the arc tail.ConsolidationDirective#PREDECESSORS_ADDITION_META
directive valuepublic static java.lang.String buildAddArcFromDirectiveValue(@Nonnull java.lang.String arcType, @Nonnull java.lang.String rootDocumentURI, @Nonnull java.lang.String targetDocumentURI)
TransformationDirective#INCOMING_ARC_ADDITION_META
directive value.arcType
- The arc type to consider.rootDocumentURI
- The URI of the root document.targetDocumentURI
- The URI of the target document.ConsolidationDirective#INCOMING_ARC_ADDITION_META
directive valuepublic static java.lang.String buildAddArcToDirectiveValue(@Nonnull java.lang.String arcType, @Nonnull java.lang.String toDocURI)
TransformationDirective.SUCCESSORS_ADDITION_META
directive value.arcType
- The arc type to consider.toDocURI
- The URI of the other document defining the arc head.ConsolidationDirective#SUCCESSORS_ADDITION_META
directive valuepublic static java.lang.String buildAddArcToDirectiveValue(@Nonnull java.lang.String arcType, @Nonnull java.lang.String rootDocumentURI, @Nonnull java.lang.String targetDocumentURI)
TransformationDirective#OUTGOING_ARC_ADDITION_META
directive value.arcType
- The arc type to consider.rootDocumentURI
- The URI of the root document.targetDocumentURI
- The URI of the target document.ConsolidationDirective#OUTGOING_ARC_ADDITION_META
directive valuepublic static java.lang.String buildRemoveArcFromDirectiveValue(@Nonnull java.lang.String arcType, @Nonnull java.lang.String fromDocURI)
TransformationDirective.PREDECESSORS_DELETION_META
directive value.arcType
- The arc type to consider.fromDocURI
- The URI of the other document defining the arc tail.ConsolidationDirective#PREDECESSORS_DELETION_META
directive valuepublic static java.lang.String buildRemoveArcFromDirectiveValue(@Nonnull java.lang.String arcType, @Nonnull java.lang.String rootDocumentURI, @Nonnull java.lang.String targetDocumentURI)
TransformationDirective.INCOMING_ARC_DELETION
directive value.arcType
- The arc type to consider.rootDocumentURI
- The URI of the root document.targetDocumentURI
- The URI of the target document.ConsolidationDirective#INCOMING_ARC_DELETION
directive valuepublic static java.lang.String buildRemoveArcToDirectiveValue(@Nonnull java.lang.String arcType, @Nonnull java.lang.String toDocURI)
TransformationDirective.SUCCESSORS_DELETION_META
directive value.arcType
- The arc type to consider.toDocURI
- The URI of the other document defining the arc head.ConsolidationDirective#SUCCESSORS_DELETION_META
directive valuepublic static java.lang.String buildRemoveArcToDirectiveValue(@Nonnull java.lang.String arcType, @Nonnull java.lang.String rootDocumentURI, @Nonnull java.lang.String targetDocumentURI)
TransformationDirective.OUTGOING_ARC_DELETION
directive value.arcType
- The arc type to consider.rootDocumentURI
- The URI of the root document.targetDocumentURI
- The URI of the target document.ConsolidationDirective#OUTGOING_ARC_DELETION
directive valuepublic static java.lang.String buildTypeInheritanceDirectiveValue(java.lang.String type, java.lang.String... parentTypes)
ConsolidationDirective.DOCUMENT_TYPE
directive value for a document.documentType
- The document representative type.parentTypes
- A possible list of parent types ordered from their natural hierarchy.ConsolidationDirective.DOCUMENT_TYPE
directive valuepublic static java.util.List<java.lang.String> buildTypeInheritanceList(java.lang.String type, java.lang.String... parentTypes)
type
- the type of a documentparentTypes
- the parent types of a documentpublic static final java.lang.String validateMonoValuedInput(java.lang.String inputValue)
inputValue
- the mono-valued input valuejava.lang.IllegalArgumentException
- if not a valid mono valued inputpublic static final java.lang.String validateMultiValuedInput(java.lang.String inputValue)
inputValue
- the multi-valued input valuejava.lang.IllegalArgumentException
- if not a valid mono valued inputpublic static java.lang.String getDocumentChildrenPath(java.lang.String uri)
uri
- the given document URIpublic static java.lang.String getDocumentChildrenPath(java.lang.String uri, java.lang.String path)
uri
- the given document URIpublic static <T> T checkNotNull(T ref, @Nullable java.lang.Object errorMessage)
public static java.lang.String checkNotNullAndNotEmpty(java.lang.String str, @Nullable java.lang.Object errorMessage)
public static final java.lang.String validateInput(java.lang.String inputValue, char[] set)
Copyright © 2013 Dassault Systèmes, All Rights Reserved.