Class NESTWorkflowWriterImpl
- java.lang.Object
-
- de.uni_trier.wi2.procake.utils.composition.FactoryObjectImplementation
-
- de.uni_trier.wi2.procake.data.io.IOImpl
-
- de.uni_trier.wi2.procake.data.io.xml.xerces_writerImpl.XMLWriterImpl
-
- de.uni_trier.wi2.procake.data.io.xml.xerces_writerImpl.ObjectWriterImpl
-
- de.uni_trier.wi2.procake.data.io.xml.xerces_writerImpl.NESTGraphWriterImpl
-
- de.uni_trier.wi2.procake.data.io.xml.xerces_writerImpl.NESTSequentialWorkflowWriterImpl
-
- de.uni_trier.wi2.procake.data.io.xml.xerces_writerImpl.NESTWorkflowWriterImpl
-
- All Implemented Interfaces:
NESTGraphTags,NESTSequentialWorkflowTags,NESTWorkflowTags,ObjectTags,IO,Writer
public class NESTWorkflowWriterImpl extends NESTSequentialWorkflowWriterImpl implements NESTWorkflowTags
This class serializes aNESTWorkflowObjectto XML.- Author:
- Alexander Stromer
-
-
Field Summary
Fields Modifier and Type Field Description static StringWRITERNAMEConstantWRITERNAME="XercesSaxNESTWorkflowWriter"-
Fields inherited from class de.uni_trier.wi2.procake.data.io.xml.xerces_writerImpl.XMLWriterImpl
filename, outputStream
-
Fields inherited from interface de.uni_trier.wi2.procake.utils.io.IO
COMPONENT, COMPONENT_KEY, DEFAULT_ENCODING, LOG_CONTENTHANDLER_NOT_FOUND, LOG_FILE_NOT_FOUND, LOG_IO_EXCEPTION, LOG_READER_NOT_FOUND, LOG_SAX_EXCEPTION, LOG_UNKNOWN_PARAMETER, LOG_WRITER_NOT_FOUND, LOG_WRONG_PARAMATER_TYPE, RESOURCE_XML
-
Fields inherited from interface de.uni_trier.wi2.procake.data.io.xml.NESTGraphTags
ATT_CLASS, ATT_ID, ATT_POST, ATT_PRE, ATT_REF_ID, PREFIX_NEST, SCHEMA_LOCATION_NEST, TAG_EDGE, TAG_EDGES, TAG_NESTGRAPH, TAG_NODE, TAG_NODES, URI_NEST, VAL_EDGE, VAL_NODE
-
Fields inherited from interface de.uni_trier.wi2.procake.data.io.xml.NESTSequentialWorkflowTags
TAG_NESTSEQUENTIALWORKFLOW
-
Fields inherited from interface de.uni_trier.wi2.procake.data.io.xml.NESTWorkflowTags
TAG_NESTWORKFLOW
-
Fields inherited from interface de.uni_trier.wi2.procake.data.io.xml.ObjectTags
ATT_CLASS, ATT_ID, ATT_NAME, ATT_VALUE, PREFIX_CDOL, SCHEMA_LOCATION_CDOL, TAG_AGGREGATE, TAG_ATOMIC, TAG_ATOMICATTRIBUTE, TAG_ATTRIBUTE, TAG_ATTRIBUTEPATH, TAG_BYTEARRAY, TAG_BYTEARRAYCONTENT, TAG_COLLECTION, TAG_INTERVAL, TAG_INTERVAL_LOWER_BOUND, TAG_INTERVAL_UPPER_BOUND, TAG_OBJECT_ATTRIBUTE, TAG_PROPERTY, TAG_QUERY, TAG_VOID, TAG_VOID_ATTRIBUTE, URI_CDOL
-
Fields inherited from interface de.uni_trier.wi2.procake.utils.io.Writer
COMPONENT, COMPONENT_KEY, LOG_CANNOT_WRITE, LOG_NO_WRITER_FOUND, LOG_UNEXPECTED_IOEXCEPTION
-
-
Constructor Summary
Constructors Constructor Description NESTWorkflowWriterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IOcopy()overwritten copy-method from Object; use it to copy a complete operatorStringgetDescription()A description of the io component.StringgetName()Each io component must have a name that is used inIOFactory.newIO(String).booleanisHandlerFor(Class value)Checks if the io component is capable to perform the operation for objects of this class.voidstore(Object value, XMLSchemaBasedWriter writer)To embed xml writers into another one it must be possible to specify the parentXMLSchemaBasedWriteras well as a prefix that should be probably used.protected voidwriteNode(NESTNodeObject value, XMLSchemaBasedWriter writer)Writes the Node-object into the XMLWriter.-
Methods inherited from class de.uni_trier.wi2.procake.data.io.xml.xerces_writerImpl.NESTSequentialWorkflowWriterImpl
writeEdge, writeNESTSequentialWorkflow
-
Methods inherited from class de.uni_trier.wi2.procake.data.io.xml.xerces_writerImpl.NESTGraphWriterImpl
insertNamespace, writeSemanticDescription
-
Methods inherited from class de.uni_trier.wi2.procake.data.io.xml.xerces_writerImpl.ObjectWriterImpl
write, writeAggregateContent, writeId, writeProperties, writeVoid
-
Methods inherited from class de.uni_trier.wi2.procake.data.io.xml.xerces_writerImpl.XMLWriterImpl
correctPrefix, createXMLWriter, setFilename, setOutputStream, store, storeWithFamiliarWriter
-
Methods inherited from class de.uni_trier.wi2.procake.data.io.IOImpl
getFamily, getParameters, postInit, preInit, setFamily
-
Methods inherited from class de.uni_trier.wi2.procake.utils.composition.FactoryObjectImplementation
getParameter, initParametersBasedOn
-
-
-
-
Field Detail
-
WRITERNAME
public static final String WRITERNAME
ConstantWRITERNAME="XercesSaxNESTWorkflowWriter"- See Also:
- Constant Field Values
-
-
Method Detail
-
getDescription
public String getDescription()
A description of the io component. The description should contain the file format and the classes that can be managed.- Specified by:
getDescriptionin interfaceIO- Overrides:
getDescriptionin classNESTSequentialWorkflowWriterImpl- Returns:
- a description of the io component
-
getName
public String getName()
Each io component must have a name that is used inIOFactory.newIO(String). The name must be unique thus it is usefull to use a short description or to the class name (this.getClass().getName()).- Specified by:
getNamein interfaceIO- Overrides:
getNamein classNESTSequentialWorkflowWriterImpl- Returns:
- Returns the name of the io component.
-
isHandlerFor
public boolean isHandlerFor(Class value)
Checks if the io component is capable to perform the operation for objects of this class.A typical implementation looks like:
public boolean isHandlerFor(Class value) { if (DataObject.class.isAssignableFrom(value)) return true; return false; }- Specified by:
isHandlerForin interfaceIO- Overrides:
isHandlerForin classNESTSequentialWorkflowWriterImpl- Parameters:
value- The class that has to be checked.- Returns:
- Results
trueif the class can oeprate with the given class.
-
copy
public IO copy()
overwritten copy-method from Object; use it to copy a complete operator- Specified by:
copyin interfaceIO- Overrides:
copyin classNESTSequentialWorkflowWriterImpl- Returns:
-
store
public void store(Object value, XMLSchemaBasedWriter writer) throws CakeIOException
To embed xml writers into another one it must be possible to specify the parentXMLSchemaBasedWriteras well as a prefix that should be probably used. If a parent writer is specified, no header will be written.If the writer does not support XML writing, the writer should throw an
UnsupportedOperationException.public void store(Object value, String prefix, XMLWriter writer) throws CakeIOException { throw new UnsupportedOperationException(); }- Overrides:
storein classNESTSequentialWorkflowWriterImpl- Parameters:
value- aObjectobjectwriter- A parent writer that is used.- Throws:
CakeIOException- if any.
-
writeNode
protected void writeNode(NESTNodeObject value, XMLSchemaBasedWriter writer) throws XMLStreamException, CakeIOException, IOException, InvalidNativeValueException
Writes the Node-object into the XMLWriter. Writes the Node-object into the XMLWriter. Writes the Node-object into the XMLWriter.- Overrides:
writeNodein classNESTSequentialWorkflowWriterImpl- Parameters:
value- The Node-object to write.writer- The writer to write the output to.- Throws:
XMLStreamExceptionCakeIOExceptionInvalidNativeValueExceptionIOException
-
-