org.obe.xpdl.serializer.dom4j
Class Dom4JXPDLSerializer

java.lang.Object
  extended byorg.obe.xpdl.serializer.dom4j.Dom4JXPDLSerializer
All Implemented Interfaces:
DOM4JNames, OBENames, W3CNames, XPDLNames, XPDLSerializer

public class Dom4JXPDLSerializer
extends java.lang.Object
implements XPDLSerializer, DOM4JNames

Implementation of the XPDLSerializer interface which uses the DOM4J library to serialize a package to an XPDL document.

Author:
Anthony Eden, Adrian Price

Field Summary
 
Fields inherited from interface org.obe.xpdl.XPDLNames
ACCESS_LEVEL, ACTIVITIES, ACTIVITY, ACTIVITY_SET, ACTIVITY_SETS, ACTUAL_PARAMETER, ACTUAL_PARAMETERS, AND_KIND, APPLICATION, APPLICATION_KIND, APPLICATIONS, ARRAY_KIND, ARRAY_TYPE, ASYNCHR_KIND, AUTHOR, AUTOMATIC, AUTOMATIC_KIND, BASIC_TYPE, BEGIN, BLOCK_NAME, BLOCKACTIVITY, BLOCKID, BOOLEAN_KIND, CODEPAGE, CONDITION, CONDITION_KIND, CONFORMANCE_CLASS, COST, COST_UNIT, COUNTRYKEY, CREATED, DATA_FIELD, DATA_FIELDS, DATA_TYPE, DATETIME_KIND, DEADLINE, DEADLINE_CONDITION, DECLARED_TYPE, DEFAULTEXCEPTION_KIND, DESCRIPTION, DOCUMENTATION, DURATION, DURATION_UNIT, END, ENUMERATION_KIND, ENUMERATION_TYPE, ENUMERATION_VALUE, EXCEPTION_KIND, EXCEPTION_NAME, EXECUTION, EXPIRATION, EXTENDED_ATTRIBUTE, EXTENDED_ATTRIBUTES, EXTERNAL_PACKAGE, EXTERNAL_PACKAGES, EXTERNAL_REFERENCE, EXTERNAL_REFERENCE_KIND, FINISH_MODE, FLOAT_KIND, FORMAL_PARAMETER, FORMAL_PARAMETERS, FROM, FULL_BLOCKED_KIND, GRAMMAR, GRAPH_CONFORMANCE, HREF, HUMAN_KIND, ICON, ID, IMPLEMENTATION, IN_KIND, INDEX, INITIAL_VALUE, INOUT_KIND, INSTANTIATION_TYPE, INTEGER_KIND, IS_ARRAY, JOIN, LENGTH, LIMIT, LIST_KIND, LIST_TYPE, LOCATION, LOOP_BLOCKED_KIND, LOWER_INDEX, MANUAL, MANUAL_KIND, MEMBER, MODE, MULTIPLE_KIND, NAME, NAMESPACE, NO, NON_BLOCKED_KIND, ONCE_KIND, ORGANIZATIONAL_UNIT_KIND, OTHERWISE_KIND, OUT_KIND, PACKAGE, PACKAGE_HEADER, PARTICIPANT, PARTICIPANT_TYPE, PARTICIPANTS, PERFORMER, PERFORMER_KIND, PLAIN_TYPE, PRIORITY, PRIORITY_UNIT, PRIVATE_KIND, PROCEDURE_KIND, PROCESS_HEADER, PUBLIC_KIND, PUBLICATION_STATUS, RECORD_TYPE, REDEFINABLE_HEADER, REFERENCE_KIND, RELEASED_KIND, RESOURCE_KIND, RESOURCE_SET_KIND, RESPONSIBLE, RESPONSIBLES, ROLE_KIND, ROUTE, SCHEMA_KIND, SCHEMA_TYPE, SCRIPT, SIMULATION_INFORMATION, SPLIT, START_MODE, STRING_KIND, SUBFLOW, SYNCHR_KIND, SYSTEM_KIND, TIME_ESTIMATION, TO, TOOL, TRANSITION, TRANSITION_REFERENCE, TRANSITION_REFERENCES, TRANSITION_RESTRICTION, TRANSITION_RESTRICTIONS, TRANSITIONS, TYPE, TYPE_DECLARATION, TYPE_DECLARATIONS, UNDER_REVISION_KIND, UNDER_TEST_KIND, UNION_KIND, UNION_TYPE, UPPER_INDEX, VALID_FROM, VALID_TO, VALUE, VENDOR, VERSION, WAITING_TIME, WORKFLOW_PROCESS, WORKFLOW_PROCESSES, WORKING_TIME, XOR_KIND, XPDL_NS_PREFIX, XPDL_NS_URI, XPDL_SCHEMA_LOCATION, XPDL_VERSION, XPRESSION, XREF
 
Fields inherited from interface org.obe.xpdl.OBENames
ASSIGNMENT_STRATEGY, BOUNDS, CALENDAR, COUNT, EVENT, EXPAND_GROUPS, FOR_EACH, HEIGHT, IN, INTERVAL, LOOP, META_DATA, NORMAL_KIND, OBE, OBE_APIDOC_URL, OBE_ASSIGNMENT_STRATEGY, OBE_AUTHOR, OBE_BOUNDS, OBE_CALENDAR, OBE_COMPLETION_STRATEGY, OBE_EVENT, OBE_FORK, OBE_LOOP, OBE_META_DATA, OBE_NAME, OBE_NS_PREFIX, OBE_NS_URI, OBE_SCRIPT, OBE_TARGET, OBE_TIMER, OBE_TOOL_MODE, OBE_URL, OBE_VERSION, OVERDUE_KIND, PARALLEL_KIND, PREDICATE, RECOVERABLE, SEQUENTIAL_KIND, TIMER, UNDEFINED_KIND, UNTIL, WARNING_KIND, WHILE, WIDTH, X, Y
 
Fields inherited from interface org.obe.util.W3CNames
SOAP_NS_PREFIX, SOAP_NS_URI, SOAPBIND_NS_PREFIX, SOAPBIND_NS_URI, SOAPENC_NS_PREFIX, SOAPENC_NS_URI, UDDI_NS_PREFIX, UDDI_NS_URI, WSDL_NS_PREFIX, WSDL_NS_URI, WSI_NS_PREFIX, WSI_NS_URI, XML_NS_PREFIX, XML_NS_URI, XMLNS_NS_PREFIX, XMLNS_NS_URI, XSD_NS_PREFIX, XSD_NS_URI, XSD_SCHEMA, XSI_NO_NS_SCHEMA_LOCATION, XSI_NS_PREFIX, XSI_SCHEMA_LOCATION, XSI_URI, XSL_NS_PREFIX, XSL_URI
 
Fields inherited from interface org.obe.xpdl.parser.dom4j.DOM4JNames
ACTUAL_PARAMETERS_QNAME, ASSIGNMENT_STRATEGY_QNAME, BLOCKACTIVITY_QNAME, BOUNDS_QNAME, CONDITION_QNAME, DESCRIPTION_QNAME, EVENT_QNAME, EXTENDED_ATTRIBUTES_QNAME, EXTERNAL_REFERENCE_QNAME, FOREACH_QNAME, FORMAL_PARAMETERS_QNAME, IN_QNAME, LOOP_QNAME, META_DATA_QNAME, OBE_NS, TIMER_QNAME, UNTIL_QNAME, WHILE_QNAME, XPDL_NS, XSD_NS, XSI_NS, XSI_SCHEMA_LOCATION_QNAME
 
Constructor Summary
Dom4JXPDLSerializer()
           
 
Method Summary
protected  org.dom4j.Element getExtendedAttributes(org.dom4j.Element parent)
           
 void serialize(XPDLPackage pkg, java.io.OutputStream out)
          Serialize the package to the given output stream.
 void serialize(XPDLPackage pkg, java.io.Writer out)
          Serialize the package to the given output stream.
protected  void writeActivities(Activity[] activities, org.dom4j.Element parent)
           
protected  void writeActivity(Activity activity, org.dom4j.Element parent)
           
protected  void writeActivitySet(ActivitySet activitySet, org.dom4j.Element parent)
           
protected  void writeActivitySets(ActivitySet[] activitySets, org.dom4j.Element parent)
           
protected  void writeActualParameters(ActualParameter[] actualParameters, org.dom4j.Element parent)
           
protected  void writeApplications(Application[] applications, org.dom4j.Element parent)
           
protected  void writeAssignmentStrategy(AssignmentStrategyDef strategy, org.dom4j.Element parent)
           
protected  void writeBounds(java.awt.Rectangle bounds, org.dom4j.Element parent)
           
protected  void writeCondition(Condition condition, org.dom4j.Element parent)
           
protected  void writeConformanceClass(ConformanceClass cc, org.dom4j.Element parent)
           
protected  void writeDataFields(DataField[] dataFields, org.dom4j.Element parent)
           
protected  void writeDataType(DataType dataType, org.dom4j.Element parent)
           
protected  void writeDeadline(Deadline deadline, org.dom4j.Element parent)
           
protected  void writeDeadlines(Deadline[] deadlines, org.dom4j.Element parent)
           
protected  org.dom4j.Element writeEvent(Event event, org.dom4j.Element parent)
           
protected  void writeExecutionType(ExecutionType execType, org.dom4j.Element parent)
           
protected  void writeExtendedAttribute(java.lang.String name, java.lang.Object value, org.dom4j.Element parent)
           
protected  void writeExtendedAttributes(ExtendedAttributes extAttrs, org.dom4j.Element parent)
           
protected  void writeExternalPackages(ExternalPackage[] externalPackages, org.dom4j.Element parent)
           
protected  void writeExternalReference(ExternalReference externalReference, org.dom4j.Element parent)
           
protected  void writeFormalParameters(FormalParameter[] formalParameters, org.dom4j.Element parent)
           
protected  void writeJoin(Join join, org.dom4j.Element parent)
           
protected  void writeLoop(Loop loop, org.dom4j.Element parent)
           
protected  void writeMetaData(java.lang.Object metadata, org.dom4j.Element parent)
           
protected  void writePackageHeader(PackageHeader header, org.dom4j.Element parent)
           
protected  void writeParticipants(Participant[] participants, org.dom4j.Element parent)
           
protected  void writeProcessHeader(ProcessHeader header, org.dom4j.Element parent)
           
protected  void writeRedefinableHeader(RedefinableHeader header, org.dom4j.Element parent)
           
protected  void writeResponsibles(java.lang.String[] responsibles, org.dom4j.Element parent)
           
protected  void writeSchemaType(SchemaType schemaType, org.dom4j.Element parent)
           
protected  void writeScript(Script script, org.dom4j.Element parent)
           
protected  void writeSimulationInformation(SimulationInformation simulationInfo, org.dom4j.Element parent)
           
protected  void writeSplit(Split split, org.dom4j.Element parent)
           
protected  void writeTimeEstimation(TimeEstimation timeEstimation, org.dom4j.Element parent)
           
protected  org.dom4j.Element writeTimer(Timer timer, org.dom4j.Element parent)
           
protected  void writeTransition(Transition transition, org.dom4j.Element parent)
           
protected  void writeTransitionReferences(java.lang.String[] transitionReferences, org.dom4j.Element parent)
           
protected  void writeTransitionRestriction(TransitionRestriction transitionRestriction, org.dom4j.Element parent)
           
protected  void writeTransitionRestrictions(TransitionRestriction[] transitionRestrictions, org.dom4j.Element parent)
           
protected  void writeTransitions(Transition[] transitions, org.dom4j.Element parent)
           
protected  void writeTrigger(Trigger trigger, org.dom4j.Element parent)
           
protected  void writeType(Type type, org.dom4j.Element parent)
           
protected  void writeTypeDeclarations(TypeDeclaration[] typeDeclarations, org.dom4j.Element parent)
           
protected  void writeWorkflowProcess(WorkflowProcess wp, org.dom4j.Element parent)
           
protected  void writeWorkflowProcesses(WorkflowProcess[] workflowProcesses, org.dom4j.Element parent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dom4JXPDLSerializer

public Dom4JXPDLSerializer()
Method Detail

serialize

public void serialize(XPDLPackage pkg,
                      java.io.OutputStream out)
               throws java.io.IOException,
                      XPDLSerializerException
Description copied from interface: XPDLSerializer
Serialize the package to the given output stream.

Specified by:
serialize in interface XPDLSerializer
Parameters:
pkg - The Package
out - The OutputStream
Throws:
XPDLSerializerException - Any serializer Exception
java.io.IOException - Any I/O exception

serialize

public void serialize(XPDLPackage pkg,
                      java.io.Writer out)
               throws java.io.IOException,
                      XPDLSerializerException
Serialize the package to the given output stream.

Specified by:
serialize in interface XPDLSerializer
Parameters:
pkg - The Package
out - The OutputStream
Throws:
java.io.IOException - Any I/O exception
XPDLSerializerException - Any serializer Exception

writePackageHeader

protected void writePackageHeader(PackageHeader header,
                                  org.dom4j.Element parent)
                           throws XPDLSerializerException
Throws:
XPDLSerializerException

writeRedefinableHeader

protected void writeRedefinableHeader(RedefinableHeader header,
                                      org.dom4j.Element parent)

writeConformanceClass

protected void writeConformanceClass(ConformanceClass cc,
                                     org.dom4j.Element parent)

writeScript

protected void writeScript(Script script,
                           org.dom4j.Element parent)

writeExternalPackages

protected void writeExternalPackages(ExternalPackage[] externalPackages,
                                     org.dom4j.Element parent)
                              throws XPDLSerializerException
Throws:
XPDLSerializerException

writeTypeDeclarations

protected void writeTypeDeclarations(TypeDeclaration[] typeDeclarations,
                                     org.dom4j.Element parent)
                              throws XPDLSerializerException
Throws:
XPDLSerializerException

writeParticipants

protected void writeParticipants(Participant[] participants,
                                 org.dom4j.Element parent)
                          throws XPDLSerializerException
Throws:
XPDLSerializerException

writeApplications

protected void writeApplications(Application[] applications,
                                 org.dom4j.Element parent)
                          throws XPDLSerializerException
Throws:
XPDLSerializerException

writeDataFields

protected void writeDataFields(DataField[] dataFields,
                               org.dom4j.Element parent)
                        throws XPDLSerializerException
Throws:
XPDLSerializerException

writeDataType

protected void writeDataType(DataType dataType,
                             org.dom4j.Element parent)
                      throws XPDLSerializerException
Throws:
XPDLSerializerException

writeResponsibles

protected void writeResponsibles(java.lang.String[] responsibles,
                                 org.dom4j.Element parent)

writeType

protected void writeType(Type type,
                         org.dom4j.Element parent)
                  throws XPDLSerializerException
Throws:
XPDLSerializerException

writeSchemaType

protected void writeSchemaType(SchemaType schemaType,
                               org.dom4j.Element parent)
                        throws XPDLSerializerException
Throws:
XPDLSerializerException

writeWorkflowProcesses

protected void writeWorkflowProcesses(WorkflowProcess[] workflowProcesses,
                                      org.dom4j.Element parent)
                               throws XPDLSerializerException
Throws:
XPDLSerializerException

writeWorkflowProcess

protected void writeWorkflowProcess(WorkflowProcess wp,
                                    org.dom4j.Element parent)
                             throws XPDLSerializerException
Throws:
XPDLSerializerException

writeActivitySets

protected void writeActivitySets(ActivitySet[] activitySets,
                                 org.dom4j.Element parent)
                          throws XPDLSerializerException
Throws:
XPDLSerializerException

writeActivitySet

protected void writeActivitySet(ActivitySet activitySet,
                                org.dom4j.Element parent)
                         throws XPDLSerializerException
Throws:
XPDLSerializerException

writeActivities

protected void writeActivities(Activity[] activities,
                               org.dom4j.Element parent)
                        throws XPDLSerializerException
Throws:
XPDLSerializerException

writeActivity

protected void writeActivity(Activity activity,
                             org.dom4j.Element parent)
                      throws XPDLSerializerException
Throws:
XPDLSerializerException

writeBounds

protected void writeBounds(java.awt.Rectangle bounds,
                           org.dom4j.Element parent)

writeAssignmentStrategy

protected void writeAssignmentStrategy(AssignmentStrategyDef strategy,
                                       org.dom4j.Element parent)

writeMetaData

protected void writeMetaData(java.lang.Object metadata,
                             org.dom4j.Element parent)

writeLoop

protected void writeLoop(Loop loop,
                         org.dom4j.Element parent)

writeTransitions

protected void writeTransitions(Transition[] transitions,
                                org.dom4j.Element parent)
                         throws XPDLSerializerException
Throws:
XPDLSerializerException

writeTransition

protected void writeTransition(Transition transition,
                               org.dom4j.Element parent)
                        throws XPDLSerializerException
Throws:
XPDLSerializerException

writeTrigger

protected void writeTrigger(Trigger trigger,
                            org.dom4j.Element parent)
                     throws XPDLSerializerException
Throws:
XPDLSerializerException

writeEvent

protected org.dom4j.Element writeEvent(Event event,
                                       org.dom4j.Element parent)

writeTimer

protected org.dom4j.Element writeTimer(Timer timer,
                                       org.dom4j.Element parent)

writeExecutionType

protected void writeExecutionType(ExecutionType execType,
                                  org.dom4j.Element parent)
                           throws XPDLSerializerException
Throws:
XPDLSerializerException

writeTransitionRestrictions

protected void writeTransitionRestrictions(TransitionRestriction[] transitionRestrictions,
                                           org.dom4j.Element parent)

writeTransitionRestriction

protected void writeTransitionRestriction(TransitionRestriction transitionRestriction,
                                          org.dom4j.Element parent)

writeJoin

protected void writeJoin(Join join,
                         org.dom4j.Element parent)

writeSplit

protected void writeSplit(Split split,
                          org.dom4j.Element parent)

writeTransitionReferences

protected void writeTransitionReferences(java.lang.String[] transitionReferences,
                                         org.dom4j.Element parent)

writeProcessHeader

protected void writeProcessHeader(ProcessHeader header,
                                  org.dom4j.Element parent)

writeDeadlines

protected void writeDeadlines(Deadline[] deadlines,
                              org.dom4j.Element parent)

writeDeadline

protected void writeDeadline(Deadline deadline,
                             org.dom4j.Element parent)

writeTimeEstimation

protected void writeTimeEstimation(TimeEstimation timeEstimation,
                                   org.dom4j.Element parent)

writeSimulationInformation

protected void writeSimulationInformation(SimulationInformation simulationInfo,
                                          org.dom4j.Element parent)

writeCondition

protected void writeCondition(Condition condition,
                              org.dom4j.Element parent)

writeExtendedAttributes

protected void writeExtendedAttributes(ExtendedAttributes extAttrs,
                                       org.dom4j.Element parent)
                                throws XPDLSerializerException
Throws:
XPDLSerializerException

writeFormalParameters

protected void writeFormalParameters(FormalParameter[] formalParameters,
                                     org.dom4j.Element parent)
                              throws XPDLSerializerException
Throws:
XPDLSerializerException

writeActualParameters

protected void writeActualParameters(ActualParameter[] actualParameters,
                                     org.dom4j.Element parent)
                              throws XPDLSerializerException
Throws:
XPDLSerializerException

writeExternalReference

protected void writeExternalReference(ExternalReference externalReference,
                                      org.dom4j.Element parent)
                               throws XPDLSerializerException
Throws:
XPDLSerializerException

getExtendedAttributes

protected org.dom4j.Element getExtendedAttributes(org.dom4j.Element parent)

writeExtendedAttribute

protected void writeExtendedAttribute(java.lang.String name,
                                      java.lang.Object value,
                                      org.dom4j.Element parent)


SourceForge.net Logo OBE-1.0 Copyright (C) 2002-2006 Adrian Price. All Rights Reserved.