public class PushAPITransformationHelpers
extends java.lang.Object
Document
.Modifier and Type | Method and Description |
---|---|
static void |
addArcFrom(Document document,
java.lang.String arcType,
java.lang.String fromDocURI)
Registers an arc addition from another document to the current one.
|
static void |
addArcFrom(Document document,
java.lang.String arcType,
java.lang.String rootDocumentURI,
java.lang.String targetDocumentURI)
Registers an incoming arc addition, incoming from a given target document to a root document.
|
static void |
addArcTo(Document document,
java.lang.String arcType,
java.lang.String toDocURI)
Registers an arc addition from the current document to another one.
|
static void |
addArcTo(Document document,
java.lang.String arcType,
java.lang.String rootDocumentURI,
java.lang.String targetDocumentURI)
Registers an outgoing arc addition, outgoing from a given root document to a target document.
|
static void |
createChildDocument(Document document,
Document parentDocument,
java.lang.String subURI,
java.lang.String type,
java.lang.String... parentTypes)
Creates a transformation document from a parent one and with the required given properties.
|
static void |
createChildDocument(Document document,
java.lang.String parentDocumentURI,
java.lang.String subURI,
java.lang.String type,
java.lang.String... parentTypes)
Creates a transformation document from a parent one and with the required given properties.
|
static java.lang.String |
createChildDocumentAndGet(Document document,
Document parentDocument,
java.lang.String subURI,
java.lang.String type,
java.lang.String... parentTypes)
Creates a transformation document from a parent one and with the required given properties.
|
static java.lang.String |
createChildDocumentAndGet(Document document,
java.lang.String parentDocumentURI,
java.lang.String subURI,
java.lang.String type,
java.lang.String... parentTypes)
Creates a transformation document from a parent one and with the required given properties.
|
static void |
createDocument(Document document,
java.lang.String uri,
java.lang.String type,
java.lang.String... parentTypes)
Creates a transformation document with the required given properties, and with automatic memory management.
|
static void |
createUnmanagedDocument(Document document,
java.lang.String uri,
java.lang.String type,
java.lang.String... parentTypes)
Creates a transformation document with the required given properties without automatic memory management (as
described in
#createDocument(String, String, String...) . |
static void |
deleteDocument(Document document,
java.lang.String uri)
Sends a deletion order for the document with the URI and all of its children.
|
static void |
deleteDocument(Document document,
java.lang.String uri,
boolean deleteChildren)
Sends a deletion order for the document with the given uri, recursive or not.
|
static void |
deleteDocumentChildren(Document document,
java.lang.String parentURI)
Sends a deletion order for all the document children.
|
static void |
deleteDocumentChildren(Document document,
java.lang.String parentURI,
java.lang.String path)
Sends a deletion order for all the document children.
|
static void |
deleteDocumentRootPath(Document document,
java.lang.String rootPath)
Deletes a set of documents corresponding to a URI prefix.
|
static java.lang.String |
getType(Document document)
Returns the document representative type.
|
static java.util.List<java.lang.String> |
getTypeInheritanceList(Document document)
Returns the document type inheritance list, ordered from their natural hierarchy.
|
static void |
removeAllPredecessorArcs(Document document)
Registers for deletion all adjacent arcs heading to the current document.
|
static void |
removeAllPredecessorArcs(Document document,
java.lang.String rootDocumentURI)
Registers for deletion all adjacent arcs heading to the given root document.
|
static void |
removeAllSuccessorArcs(Document document)
Registers for deletion all adjacent arcs starting from the current document.
|
static void |
removeAllSuccessorArcs(Document document,
java.lang.String rootDocumentURI)
Registers for deletion all adjacent arcs starting from a given root document.
|
static void |
removeArcFrom(Document document,
java.lang.String arcType,
java.lang.String fromDocURI)
Registers for deletion the arc with the type given and starting from the document specified to the current one.
|
static void |
removeArcFrom(Document document,
java.lang.String arcType,
java.lang.String rootDocumentURI,
java.lang.String targetDocumentURI)
Registers an incoming arc deletion, incoming from a given target document to a root document.
|
static void |
removeArcTo(Document document,
java.lang.String arcType,
java.lang.String toDocURI)
Registers for deletion the arc with the given type and starting from the current document to the other one specified.
|
static void |
removeArcTo(Document document,
java.lang.String arcType,
java.lang.String rootDocumentURI,
java.lang.String targetDocumentURI)
Registers an outgoing arc deletion, outgoing from a given root document to a target document.
|
static void |
setManaged(Document document)
Defines the current document as managed.
|
static void |
setType(Document document,
java.lang.String documentType,
java.lang.String... parentTypes)
Defines the current document representative type, as well as its possible parents.
|
public static void createDocument(@Nonnull Document document, @Nonnull java.lang.String uri, @Nonnull java.lang.String type, @Nullable java.lang.String... parentTypes)
#createUnmanagedDocument(String, String, String...)
where one needs to delete
the created document explicitly.document
- A CloudView PushAPI Document
to carry `Transformation` directives.uri
- The unique document identifier.type
- The document representative type.parentTypes
- A possible list of parent types ordered from their natural hierarchy.public static void createChildDocument(@Nonnull Document document, @Nonnull Document parentDocument, @Nonnull java.lang.String subURI, @Nonnull java.lang.String type, @Nullable java.lang.String... parentTypes)
document
- A CloudView PushAPI Document
to carry `Transformation` directives.parentDocument
- The parent document to consider.subURI
- The sub-URI that will added to the parent one in order to define a new unique one.type
- The document representative type.parentTypes
- A possible list of parent types ordered from their natural hierarchy.public static java.lang.String createChildDocumentAndGet(@Nonnull Document document, @Nonnull Document parentDocument, @Nonnull java.lang.String subURI, @Nonnull java.lang.String type, @Nullable java.lang.String... parentTypes)
document
- A CloudView PushAPI Document
to carry `Transformation` directives.parentDocument
- The parent document to consider.subURI
- The sub-URI that will added to the parent one in order to define a new unique one.type
- The document representative type.parentTypes
- A possible list of parent types ordered from their natural hierarchy.public static void createChildDocument(@Nonnull Document document, @Nonnull java.lang.String parentDocumentURI, @Nonnull java.lang.String subURI, @Nonnull java.lang.String type, @Nullable java.lang.String... parentTypes)
document
- A CloudView PushAPI Document
to carry `Transformation` directives.parentDocumentURI
- The parent document URI to consider.subURI
- The sub-URI that will added to the parent one in order to define a new unique one.type
- The document representative type.parentTypes
- A possible list of parent types ordered from their natural hierarchy.public static java.lang.String createChildDocumentAndGet(@Nonnull Document document, @Nonnull java.lang.String parentDocumentURI, @Nonnull java.lang.String subURI, @Nonnull java.lang.String type, @Nullable java.lang.String... parentTypes)
document
- A CloudView PushAPI Document
to carry `Transformation` directives.parentDocumentURI
- The parent document URI to consider.subURI
- The sub-URI that will added to the parent one in order to define a new unique one.type
- The document representative type.parentTypes
- A possible list of parent types ordered from their natural hierarchy.public static void createUnmanagedDocument(@Nonnull Document document, @Nonnull java.lang.String uri, @Nonnull java.lang.String type, @Nullable java.lang.String... parentTypes)
#createDocument(String, String, String...)
.document
- A CloudView PushAPI Document
to carry `Transformation` directives.uri
- The unique document identifier.type
- The document representative type.parentTypes
- A possible list of parent types ordered from their natural hierarchy.public static void deleteDocument(@Nonnull Document document, @Nonnull java.lang.String uri)
document
- A CloudView PushAPI Document
to carry `Transformation` directives.uri
- The unique identifier of the document to remove.public static void deleteDocument(@Nonnull Document document, @Nonnull java.lang.String uri, @Nonnull boolean deleteChildren)
document
- A CloudView PushAPI Document
to carry `Transformation` directives.uri
- The unique identifier of the document to remove.deleteChildren
- If the flag is true, all document's children will also be deletedpublic static void deleteDocumentChildren(@Nonnull Document document, @Nonnull java.lang.String parentURI)
document
- A CloudView PushAPI Document
to carry `Transformation` directives.parentURI
- The unique identifier of the parent documentpublic static void deleteDocumentChildren(@Nonnull Document document, @Nonnull java.lang.String parentURI, @Nullable java.lang.String path)
document
- A CloudView PushAPI Document
to carry `Transformation` directives.parentURI
- The unique identifier of the parent documentpath
- A string prefix of the children URIs to be deleted, or an empty/null string to delete all children.public static void deleteDocumentRootPath(@Nonnull Document document, @Nonnull java.lang.String rootPath)
rootPath
prefix will be deleted.document
- A CloudView PushAPI Document
to carry `Transformation` directives.rootPath
- An URI prefix used to select the documents to be deleted.public static void addArcFrom(@Nonnull Document document, @Nonnull java.lang.String arcType, @Nonnull java.lang.String fromDocURI)
document
- The current document.arcType
- The new arc type.fromDocURI
- The URI of the other document defining the arc tail.public static void addArcTo(@Nonnull Document document, @Nonnull java.lang.String arcType, @Nonnull java.lang.String toDocURI)
document
- The current document.arcType
- The new arc type.toDocURI
- The URI of the other document defining the arc head.public static void addArcFrom(@Nonnull Document document, @Nonnull java.lang.String arcType, @Nonnull java.lang.String rootDocumentURI, @Nonnull java.lang.String targetDocumentURI)
document
- The current document.arcType
- The new arc type.rootDocumentURI
- The URI of the root document.targetDocumentURI
- The URI of the target document.public static void addArcTo(@Nonnull Document document, @Nonnull java.lang.String arcType, @Nonnull java.lang.String rootDocumentURI, @Nonnull java.lang.String targetDocumentURI)
document
- The current document.arcType
- The new arc type.rootDocumentURI
- The URI of the root document.targetDocumentURI
- The URI of the target document.public static void removeAllPredecessorArcs(@Nonnull Document document)
document
- The current document.public static void removeAllPredecessorArcs(@Nonnull Document document, @Nonnull java.lang.String rootDocumentURI)
document
- The current document.rootDocumentURI
- The URI of the root document.public static void removeAllSuccessorArcs(@Nonnull Document document)
document
- The current document.public static void removeAllSuccessorArcs(@Nonnull Document document, @Nonnull java.lang.String rootDocumentURI)
document
- The current document.rootDocumentURI
- The URI of the root document.public static void removeArcFrom(@Nonnull Document document, @Nonnull java.lang.String arcType, @Nonnull java.lang.String fromDocURI)
document
- The current document.arcType
- The arc type to consider.fromDocURI
- The URI of the other document defining the arc tail.public static void removeArcFrom(@Nonnull Document document, @Nonnull java.lang.String arcType, @Nonnull java.lang.String rootDocumentURI, @Nonnull java.lang.String targetDocumentURI)
document
- The current document.arcType
- The arc type to consider.rootDocumentURI
- The URI of the root document.targetDocumentURI
- The URI of the target document.public static void removeArcTo(@Nonnull Document document, @Nonnull java.lang.String arcType, @Nonnull java.lang.String toDocURI)
document
- The current document.arcType
- The arc type to consider.toDocURI
- The URI of the other document defining the arc head.public static void removeArcTo(@Nonnull Document document, @Nonnull java.lang.String arcType, @Nonnull java.lang.String rootDocumentURI, @Nonnull java.lang.String targetDocumentURI)
document
- The current document.arcType
- The arc type to consider.rootDocumentURI
- The URI of the root document.targetDocumentURI
- The URI of the target document.public static java.lang.String getType(@Nonnull Document document)
document
- The current document.public static java.util.List<java.lang.String> getTypeInheritanceList(@Nonnull Document document)
document
- The current document.public static void setType(@Nonnull Document document, @Nonnull java.lang.String documentType, @Nullable java.lang.String... parentTypes)
document
- The current document.documentType
- The document representative type.parentTypes
- a possible list of parent types ordered from their natural hierarchy.public static void setManaged(@Nonnull Document document)
document
- The current document.Copyright © 2013 Dassault Systèmes, All Rights Reserved.