public class ProcessModelXMLExport
extends java.lang.Object
| Constructor and Description |
|---|
ProcessModelXMLExport() |
| Modifier and Type | Method and Description |
|---|---|
org.w3c.dom.Document |
getDocumentDataElementList(java.util.Set<DataElement> dataElements)
Exports a set of data elements to a document.
|
org.w3c.dom.Document |
getDocumentForAdhocTemplateMapping(java.util.Map<java.util.UUID,java.util.UUID> mapping)
Generates and returns a
Document representing the given adhoc
template id mapping |
org.w3c.dom.Document |
getDocumentForBaseTemplateMapping(java.util.Map<java.util.UUID,java.util.UUID> mapping)
Generates and returns a
Document representing the given base
template id mapping |
org.w3c.dom.Document |
getDocumentForEBP(ExecutableBusinessProcess ebp) |
org.w3c.dom.Document |
getDocumentForEmbeddedTemplateMapping(java.util.Map<java.util.UUID,java.util.UUID> mapping)
Generates and returns a
Document representing the given embedded
template id mapping |
org.w3c.dom.Document |
getDocumentForExecutableInstanceAndStatus(ExecutableInstance instance,
InstanceStatus instanceStatus,
boolean storeStructure)
Writes the given instance including its status to the given file.
|
org.w3c.dom.Document |
getDocumentForInstance(Instance instance)
Creates a DOM document from the instance.
|
org.w3c.dom.Document |
getDocumentForInstanceLocks(java.util.Map<java.util.UUID,ProcessModelXMLHelperTools.LockDescription> locks)
Generates and returns a
Document for the given instance locks |
org.w3c.dom.Document |
getDocumentForParameter(ProcessModelParameter parameter,
boolean isInputParameter)
TODO set namespace, schema location, check schema?
|
org.w3c.dom.Document |
getDocumentForParameterSet(java.util.Collection<ProcessModelParameter> parameter,
boolean isInputParameter)
TODO set namespace, schema location, check schema?
|
org.w3c.dom.Document |
getDocumentForProcessTypes(java.util.Set<ProcessModelXMLHelperTools.SerialisableProcessType> items)
Generates and returns a
Document representing the given ProcessTypes |
org.w3c.dom.Document |
getDocumentForTemplate(Template template)
Creates a DOM document from the template.
|
org.w3c.dom.Document |
getDocumentForTemplateAndStatus(Template template,
TemplateStatus templateStatus)
Returns The corresponding document for a given template and a given template
status.
|
org.w3c.dom.Document |
getDocumentForTemplateInformations(java.util.Map<java.util.UUID,ProcessModelXMLHelperTools.TemplateInformation> items)
Generates and returns a
Document representing the given TemplateInformations. |
org.w3c.dom.Document |
getDocumentForTemplateLocks(java.util.Map<java.util.UUID,ProcessModelXMLHelperTools.LockDescription> locks)
Generates and returns a
Document for the given template locks |
java.io.InputStream |
getInputStreamForInstance(Instance instance)
Returns The corresponding stream for a given instance
|
java.io.InputStream |
getInputStreamForInstance(Instance instance,
boolean intend)
Returns The corresponding stream for a given instance
|
java.io.InputStream |
getInputStreamForTemplate(Template template)
Returns The corresponding stream for a given template
|
java.io.InputStream |
getInputStreamForTemplate(Template template,
boolean intend)
Returns The corresponding stream for a given template
|
java.io.InputStream |
getInputStreamForTemplateAndStatus(Template template,
TemplateStatus templateStatus)
Returns The corresponding stream for a given template and a given template
status.
|
java.io.InputStream |
getInputStreamForTemplateAndStatus(Template template,
TemplateStatus templateStatus,
boolean intend)
Returns The corresponding stream for a given template and a given template
status.
|
java.lang.String |
getXMLStringForInstance(Instance instance)
Returns the xml code of a given instance as string.
|
java.lang.String |
getXMLStringForInstance(Instance instance,
boolean intend)
Returns the xml code of a given instance as string.
|
java.lang.String |
getXMLStringForTemplate(Template template)
Returns the xml code of a given template as string.
|
java.lang.String |
getXMLStringForTemplate(Template template,
boolean intend)
Returns the xml code of a given template as string.
|
void |
writeAdhocTemplateMappingToFile(java.util.Map<java.util.UUID,java.util.UUID> mapping,
java.io.File file)
Writes the given adhoc template id mapping to the specified file.
|
void |
writeBaseTemplateMappingToFile(java.util.Map<java.util.UUID,java.util.UUID> mapping,
java.io.File file)
Writes the given base template id mapping to the specified file.
|
void |
writeEmbeddedTemplateMappingToFile(java.util.Map<java.util.UUID,java.util.UUID> mapping,
java.io.File file)
Writes the given embedded template id mapping to the specified file.
|
void |
writeExecutableInstanceAndStatusToFile(ExecutableInstance instance,
InstanceStatus instanceStatus,
java.io.File file)
Writes the given instance including its status to the given file.
|
void |
writeExecutableInstanceAndStatusToFile(ExecutableInstance instance,
InstanceStatus instanceStatus,
java.io.File file,
boolean intend)
Writes the given instance including its status to the given file.
|
void |
writeExecutableInstanceAndStatusToFile(ExecutableInstance instance,
InstanceStatus instanceStatus,
java.io.File file,
Template structure)
Writes the given instance including its status to the given file.
|
void |
writeExecutableInstanceAndStatusToFile(ExecutableInstance instance,
InstanceStatus instanceStatus,
java.io.File file,
Template structure,
boolean intend)
Writes the given instance including its status to the given file.
|
void |
writeInstanceAndStatusToFile(Instance instance,
InstanceStatus instanceStatus,
java.io.File file,
boolean storeStructure)
Writes the given instance including its status to the given file.
|
void |
writeInstanceAndStatusToFile(Instance instance,
InstanceStatus instanceStatus,
java.io.File file,
boolean storeStructure,
boolean intend)
Writes the given instance including its status to the given file.
|
void |
writeInstanceLocksToFile(java.util.Map<java.util.UUID,ProcessModelXMLHelperTools.LockDescription> locks,
java.io.File file)
Writes the given instance locks to the specified file.
|
void |
writeInstanceToFile(Instance instance,
java.io.File file)
Writes the given instance to the given file.
|
void |
writeInstanceToFile(Instance instance,
java.io.File file,
boolean intend)
Writes the given instance to the given file.
|
void |
writeProcessTypesToFile(java.util.Set<ProcessModelXMLHelperTools.SerialisableProcessType> items,
java.io.File file)
Writes the given adhoc template id mapping to the specified file.
|
void |
writeTemplateAndStatusToFile(Template template,
TemplateStatus templateStatus,
java.io.File file)
Writes the given template including its status to the given file.
|
void |
writeTemplateAndStatusToFile(Template template,
TemplateStatus templateStatus,
java.io.File file,
boolean intend)
Writes the given template including its status to the given file.
|
void |
writeTemplateInformationsToFile(java.util.Map<java.util.UUID,ProcessModelXMLHelperTools.TemplateInformation> items,
java.io.File file)
Writes the given template informations to the specified file.
|
void |
writeTemplateLocksToFile(java.util.Map<java.util.UUID,ProcessModelXMLHelperTools.LockDescription> locks,
java.io.File file)
Writes the given template locks to the specified file.
|
void |
writeTemplateToFile(Template template,
java.io.File file)
Writes the given template to the given file.
|
void |
writeTemplateToFile(Template template,
java.io.File file,
boolean intend)
Writes the given template to the given file.
|
public void writeTemplateToFile(Template template, java.io.File file) throws java.io.IOException, XMLFormatException
file - The target file,template - The source template,java.io.IOException - Thrown if writing the XML to the file fails, e.g. if
the provided file is read-only.XMLFormatException - Thrown if the validation of the document failspublic void writeTemplateToFile(Template template, java.io.File file, boolean intend) throws java.io.IOException, XMLFormatException
file - The target file,template - The source template,intend - Whether to intend child nodes and text content. Use with care! Text content may
contain whitespace and linebreaks afterwards!java.io.IOException - Thrown if writing the XML to the file fails, e.g. if
the provided file is read-only.XMLFormatException - Thrown if the validation of the document failspublic void writeTemplateAndStatusToFile(Template template, TemplateStatus templateStatus, java.io.File file) throws java.io.IOException, XMLFormatException
file - The target file,template - The source template,templateStatus - The status of the template.java.io.IOException - Thrown if writing the XML to the file fails, e.g. if
the provided file is read-only.XMLFormatException - Thrown if the validation of the document failspublic void writeTemplateAndStatusToFile(Template template, TemplateStatus templateStatus, java.io.File file, boolean intend) throws java.io.IOException, XMLFormatException
file - The target file,template - The source template,templateStatus - The status of the template.intend - Whether to intend child nodes and text content. Use with care! Text content may
contain whitespace and linebreaks afterwards!java.io.IOException - Thrown if writing the XML to the file fails, e.g. if
the provided file is read-only.XMLFormatException - Thrown if the validation of the document failspublic void writeInstanceToFile(Instance instance, java.io.File file) throws java.io.IOException, XMLFormatException
file - The target file,instance - The source instance,java.io.IOException - Thrown if writing the XML to the file fails, e.g. if
the provided file is read-only.XMLFormatException - Thrown if the validation of the document failspublic void writeInstanceToFile(Instance instance, java.io.File file, boolean intend) throws java.io.IOException, XMLFormatException
file - The target file,instance - The source instance,intend - Whether to intend child nodes and text content. Use with care! Text content may
contain whitespace and linebreaks afterwards!java.io.IOException - Thrown if writing the XML to the file fails, e.g. if
the provided file is read-only.XMLFormatException - Thrown if the validation of the document failspublic void writeInstanceAndStatusToFile(Instance instance, InstanceStatus instanceStatus, java.io.File file, boolean storeStructure) throws java.io.IOException, XMLFormatException
instance - The source instance,instanceStatus - The status object of the instancefile - The target file,storeStructure - If set to true, the structure is stored to the file,
else, only an ID reference will be stored.java.io.IOException - Thrown if writing the XML to the file fails, e.g. if
the provided file is read-only.XMLFormatException - Thrown if the validation of the document failspublic void writeInstanceAndStatusToFile(Instance instance, InstanceStatus instanceStatus, java.io.File file, boolean storeStructure, boolean intend) throws java.io.IOException, XMLFormatException
instance - The source instance,instanceStatus - The status object of the instancefile - The target file,storeStructure - If set to true, the structure is stored to the file,
else, only an ID reference will be stored.intend - Whether to intend child nodes and text content. Use with care! Text content may
contain whitespace and linebreaks afterwards!java.io.IOException - Thrown if writing the XML to the file fails, e.g. if
the provided file is read-only.XMLFormatException - Thrown if the validation of the document failspublic void writeExecutableInstanceAndStatusToFile(ExecutableInstance instance, InstanceStatus instanceStatus, java.io.File file) throws java.io.IOException, XMLFormatException
instance - The source instance,instanceStatus - The status object of the instancefile - The target file,java.io.IOException - Thrown if writing the XML to the file fails, e.g. if
the provided file is read-only.XMLFormatException - Thrown if the validation of the document failswriteExecutableInstanceAndStatusToFile(ExecutableInstance, InstanceStatus, File, Template)public void writeExecutableInstanceAndStatusToFile(ExecutableInstance instance, InstanceStatus instanceStatus, java.io.File file, boolean intend) throws java.io.IOException, XMLFormatException
instance - The source instance,instanceStatus - The status object of the instancefile - The target file,intend - Whether to intend child nodes and text content. Use with care! Text content may
contain whitespace and linebreaks afterwards!java.io.IOException - Thrown if writing the XML to the file fails, e.g. if
the provided file is read-only.XMLFormatException - Thrown if the validation of the document failswriteExecutableInstanceAndStatusToFile(ExecutableInstance, InstanceStatus, File, Template)public void writeExecutableInstanceAndStatusToFile(ExecutableInstance instance, InstanceStatus instanceStatus, java.io.File file, Template structure) throws java.io.IOException, XMLFormatException
instance - The source instance,instanceStatus - The status object of the instancefile - The target file,structure - If not null, the designated structure (template or
instance delta layer) of the instance, will be stored inline.java.io.IOException - Thrown if writing the XML to the file fails, e.g. if
the provided file is read-only.XMLFormatException - Thrown if the validation of the document failspublic void writeExecutableInstanceAndStatusToFile(ExecutableInstance instance, InstanceStatus instanceStatus, java.io.File file, Template structure, boolean intend) throws java.io.IOException, XMLFormatException
instance - The source instance,instanceStatus - The status object of the instancefile - The target file,structure - If not null, the designated structure (template or
instance delta layer) of the instance, will be stored inline.intend - Whether to intend child nodes and text content. Use with care! Text content may
contain whitespace and linebreaks afterwards!java.io.IOException - Thrown if writing the XML to the file fails, e.g. if
the provided file is read-only.XMLFormatException - Thrown if the validation of the document failspublic java.lang.String getXMLStringForTemplate(Template template) throws XMLFormatException, java.io.IOException
template - The template which should be transformed.XMLFormatException - Thrown if the validation of the document failsjava.io.IOException - Thrown if an unrecoverable error occurs during the
course of the transformationpublic java.lang.String getXMLStringForTemplate(Template template, boolean intend) throws XMLFormatException, java.io.IOException
template - The template which should be transformed.intend - Whether to intend child nodes and text content. Use with care! Text content may
contain whitespace and linebreaks afterwards!XMLFormatException - Thrown if the validation of the document failsjava.io.IOException - Thrown if an unrecoverable error occurs during the
course of the transformationpublic java.lang.String getXMLStringForInstance(Instance instance) throws XMLFormatException, java.io.IOException
instance - The instance which should be transformed.XMLFormatException - Thrown if the validation of the document failsjava.io.IOException - Thrown if an unrecoverable error occurs during the
course of the transformationpublic java.lang.String getXMLStringForInstance(Instance instance, boolean intend) throws XMLFormatException, java.io.IOException
instance - The instance which should be transformed.intend - Whether to intend child nodes and text content. Use with care! Text content may
contain whitespace and linebreaks afterwards!XMLFormatException - Thrown if the validation of the document failsjava.io.IOException - Thrown if an unrecoverable error occurs during the
course of the transformationpublic java.io.InputStream getInputStreamForTemplate(Template template) throws XMLFormatException, java.io.IOException
template - The source templateXMLFormatException - Thrown if the validation of the document failsjava.io.IOException - Thrown if an unrecoverable error occurs during the
course of the transformationpublic java.io.InputStream getInputStreamForTemplate(Template template, boolean intend) throws XMLFormatException, java.io.IOException
template - The source templateintend - Whether to intend child nodes and text content. Use with care! Text content may
contain whitespace and linebreaks afterwards!XMLFormatException - Thrown if the validation of the document failsjava.io.IOException - Thrown if an unrecoverable error occurs during the
course of the transformationpublic java.io.InputStream getInputStreamForTemplateAndStatus(Template template, TemplateStatus templateStatus) throws XMLFormatException, java.io.IOException
template - The source templatetemplateStatus - The template statusXMLFormatException - Thrown if the validation of the document failsjava.io.IOException - Thrown if an unrecoverable error occurs during the
course of the transformationpublic java.io.InputStream getInputStreamForTemplateAndStatus(Template template, TemplateStatus templateStatus, boolean intend) throws XMLFormatException, java.io.IOException
template - The source templatetemplateStatus - The template statusintend - Whether to intend child nodes and text content. Use with care! Text content may
contain whitespace and linebreaks afterwards!XMLFormatException - Thrown if the validation of the document failsjava.io.IOException - Thrown if an unrecoverable error occurs during the
course of the transformationpublic org.w3c.dom.Document getDocumentForTemplateAndStatus(Template template, TemplateStatus templateStatus) throws XMLFormatException
template - The source templatetemplateStatus - The template statusXMLFormatException - Thrown if the validation of the document failspublic java.io.InputStream getInputStreamForInstance(Instance instance) throws XMLFormatException, java.io.IOException
instance - The source instanceXMLFormatException - Thrown if the validation of the document failsjava.io.IOException - Thrown if an unrecoverable error occurs during the
course of the transformationpublic java.io.InputStream getInputStreamForInstance(Instance instance, boolean intend) throws XMLFormatException, java.io.IOException
instance - The source instanceintend - Whether to intend child nodes and text content. Use with care! Text content may
contain whitespace and linebreaks afterwards!XMLFormatException - Thrown if the validation of the document failsjava.io.IOException - Thrown if an unrecoverable error occurs during the
course of the transformationpublic org.w3c.dom.Document getDocumentForExecutableInstanceAndStatus(ExecutableInstance instance, InstanceStatus instanceStatus, boolean storeStructure)
instance - The source instance,instanceStatus - The status object of the instancestoreStructure - If set to true, the structure is stored to the file,
else, only an ID reference will be stored.public org.w3c.dom.Document getDocumentForTemplate(Template template) throws XMLFormatException
template - The source templateXMLFormatException - Thrown if the validation of the document failspublic org.w3c.dom.Document getDocumentForInstance(Instance instance) throws XMLFormatException
instance - The source instanceXMLFormatException - Thrown if the validation of the document failspublic org.w3c.dom.Document getDocumentForEBP(ExecutableBusinessProcess ebp) throws XMLFormatException
ebp - XMLFormatException - Thrown if the validation of the document failspublic org.w3c.dom.Document getDocumentForParameter(ProcessModelParameter parameter, boolean isInputParameter)
parameter - The source parameterisInputParameter - If true, an input parameter will be created, else
an output parameter.public org.w3c.dom.Document getDocumentForParameterSet(java.util.Collection<ProcessModelParameter> parameter, boolean isInputParameter)
parameter - The source Parameterset.isInputParameter - If true, an input parameter set will be created,
else an output parameter set.public org.w3c.dom.Document getDocumentDataElementList(java.util.Set<DataElement> dataElements)
dataElements - The data elements to be exported.public org.w3c.dom.Document getDocumentForTemplateLocks(java.util.Map<java.util.UUID,ProcessModelXMLHelperTools.LockDescription> locks) throws XMLFormatException
Document for the given template lockslocks - XMLFormatExceptionpublic void writeTemplateLocksToFile(java.util.Map<java.util.UUID,ProcessModelXMLHelperTools.LockDescription> locks, java.io.File file) throws java.io.IOException, XMLFormatException
locks - file - XMLFormatExceptionjava.io.IOExceptionpublic org.w3c.dom.Document getDocumentForInstanceLocks(java.util.Map<java.util.UUID,ProcessModelXMLHelperTools.LockDescription> locks) throws XMLFormatException
Document for the given instance lockslocks - XMLFormatExceptionpublic void writeInstanceLocksToFile(java.util.Map<java.util.UUID,ProcessModelXMLHelperTools.LockDescription> locks, java.io.File file) throws java.io.IOException, XMLFormatException
locks - file - XMLFormatExceptionjava.io.IOExceptionpublic org.w3c.dom.Document getDocumentForEmbeddedTemplateMapping(java.util.Map<java.util.UUID,java.util.UUID> mapping)
throws XMLFormatException
Document representing the given embedded
template id mappingmapping - - the embedded IDs mapping to their parent IDsXMLFormatExceptionpublic void writeEmbeddedTemplateMappingToFile(java.util.Map<java.util.UUID,java.util.UUID> mapping,
java.io.File file)
throws java.io.IOException,
XMLFormatException
mapping - - the embedded IDs mapping to their parent onesfile - XMLFormatExceptionjava.io.IOExceptionpublic org.w3c.dom.Document getDocumentForBaseTemplateMapping(java.util.Map<java.util.UUID,java.util.UUID> mapping)
throws XMLFormatException
Document representing the given base
template id mappingmapping - - the template IDs mapping to their base template IDsXMLFormatExceptionpublic void writeBaseTemplateMappingToFile(java.util.Map<java.util.UUID,java.util.UUID> mapping,
java.io.File file)
throws java.io.IOException,
XMLFormatException
mapping - - the template IDs mapping to their base template IDsfile - XMLFormatExceptionjava.io.IOExceptionpublic org.w3c.dom.Document getDocumentForAdhocTemplateMapping(java.util.Map<java.util.UUID,java.util.UUID> mapping)
throws XMLFormatException
Document representing the given adhoc
template id mappingmapping - - the adhoc template IDs mapping to their instance IDsXMLFormatExceptionpublic void writeAdhocTemplateMappingToFile(java.util.Map<java.util.UUID,java.util.UUID> mapping,
java.io.File file)
throws java.io.IOException,
XMLFormatException
mapping - - the adhoc template IDs mapping to their instance IDsfile - XMLFormatExceptionjava.io.IOExceptionpublic org.w3c.dom.Document getDocumentForProcessTypes(java.util.Set<ProcessModelXMLHelperTools.SerialisableProcessType> items) throws XMLFormatException
Document representing the given ProcessTypesitems - The process typesXMLFormatExceptionpublic void writeProcessTypesToFile(java.util.Set<ProcessModelXMLHelperTools.SerialisableProcessType> items, java.io.File file) throws java.io.IOException, XMLFormatException
items - The process types to be storedfile - XMLFormatExceptionjava.io.IOExceptionpublic org.w3c.dom.Document getDocumentForTemplateInformations(java.util.Map<java.util.UUID,ProcessModelXMLHelperTools.TemplateInformation> items) throws XMLFormatException
Document representing the given TemplateInformations.items - maps from ID of template to its informationXMLFormatExceptionpublic void writeTemplateInformationsToFile(java.util.Map<java.util.UUID,ProcessModelXMLHelperTools.TemplateInformation> items, java.io.File file) throws java.io.IOException, XMLFormatException
items - maps from if of template to its template information.file - XMLFormatExceptionjava.io.IOException