Class ModelWriter
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.AbstractXMLWriter
de.uni_trier.wi2.procake.data.io.xml.xerces_writerImpl.ModelWriter
- All Implemented Interfaces:
ModelTags
,IO
,ProCAKEWriter
ModelWriter class.
- Author:
- kmaximi
-
Field Summary
Fields inherited from class de.uni_trier.wi2.procake.data.io.xml.xerces_writerImpl.AbstractXMLWriter
filename, outputStream
Fields inherited from interface de.uni_trier.wi2.procake.utils.io.IO
DEFAULT_ENCODING, LOG_FILE_NOT_FOUND, LOG_IO_EXCEPTION, LOG_READER_NOT_FOUND, LOG_SAX_EXCEPTION, LOG_UNKNOWN_PARAMETER, LOG_WRONG_PARAMATER_TYPE, RESOURCE_XML
Fields inherited from interface de.uni_trier.wi2.procake.data.io.xml.ModelTags
ATT_ABSTRACT, ATT_CLASS, ATT_DEFAULT, ATT_DESCENDING, ATT_FULL_VALUE, ATT_INHERITED, ATT_LOWERBOUND, ATT_MAXCARDINALITY, ATT_MAXSIZE, ATT_MIMETYPE, ATT_MINCARDINALITY, ATT_NAME, ATT_ONTOLOGY_NAME, ATT_ROOT_NODE_URI, ATT_SEMANTICDESCRIPTIONCLASS, ATT_SUPERCLASS, ATT_TYPE, ATT_UPPERBOUND, ATT_VALUE, PREFIX_CDM, SCHEMA_LOCATION_CDM, TAG_AGGREGATECLASS, TAG_ATTRIBUTE, TAG_BOOLEANCLASS, TAG_BYTEARRAYCLASS, TAG_DATECLASS, TAG_DOUBLECLASS, TAG_EDGE, TAG_ELEMENTCLASS, TAG_INSTANCEENUMERATIONPREDICATE, TAG_INSTANCEINTERVALPREDICATE, TAG_INSTANCEONTOLOGYORDERPREDICATE, TAG_INSTANCETAXONOMYORDERPREDICATE, TAG_INSTANCETOTALORDERPREDICATE, TAG_INTEGERCLASS, TAG_INTERVALCLASS, TAG_LISTCLASS, TAG_MODEL, TAG_NESTANDENDNODECLASS, TAG_NESTANDSTARTNODECLASS, TAG_NESTCONSTRAINTEDGECLASS, TAG_NESTCONTROLFLOWEDGECLASS, TAG_NESTDATAFLOWEDGECLASS, TAG_NESTDATANODECLASS, TAG_NESTEDGE, TAG_NESTGRAPHCLASS, TAG_NESTLOOPENDNODECLASS, TAG_NESTLOOPSTARTNODECLASS, TAG_NESTNODE, TAG_NESTORENDNODECLASS, TAG_NESTORSTARTNODECLASS, TAG_NESTPARTOFEDGECLASS, TAG_NESTSEQUENTIALWORKFLOWCLASS, TAG_NESTSUBWORKFLOWNODECLASS, TAG_NESTTASKNODECLASS, TAG_NESTWORKFLOWCLASS, TAG_NESTWORKFLOWNODECLASS, TAG_NESTXORENDNODECLASS, TAG_NESTXORSTARTNODECLASS, TAG_NODE, TAG_ONTOLOGYREF, TAG_PROPERTY, TAG_RELATION, TAG_SETCLASS, TAG_STRINGCLASS, TAG_TIMECLASS, TAG_TIMESTAMPCLASS, TAG_UNIONCLASS, TAG_URICLASS, TAG_VALUE, TAG_VOIDCLASS, URI_CDM
Fields inherited from interface de.uni_trier.wi2.procake.utils.io.ProCAKEWriter
LOG_CANNOT_WRITE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
overwritten copy-method from Object; use it to copy a complete operatorgetName()
Each io component must have a name that is used inIOFactory.newIO(String)
.void
Adds the namespace-imports of this handler to the given xmlWriter.boolean
isHandlerFor
(Class value) Checks if the io component is capable to perform the operation for objects of this class.void
store
(Object value, GenericXMLSchemaBasedWriter writer) To embed xml writers into another one it must be possible to specify the parentGenericXMLSchemaBasedWriter
as well as a prefix that should be probably used.Methods inherited from class de.uni_trier.wi2.procake.data.io.xml.xerces_writerImpl.AbstractXMLWriter
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 Details
-
WRITER_NAME
- See Also:
-
-
Constructor Details
-
ModelWriter
public ModelWriter()
-
-
Method Details
-
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()
). -
isHandlerFor
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:
isHandlerFor
in interfaceIO
- Parameters:
value
- The class that has to be checked.- Returns:
- Results
true
if the class can oeprate with the given class.
-
copy
overwritten copy-method from Object; use it to copy a complete operator -
insertNamespace
Adds the namespace-imports of this handler to the given xmlWriter.- Specified by:
insertNamespace
in classAbstractXMLWriter
- Parameters:
writer
- aGenericXMLSchemaBasedWriter
object
-
store
Description copied from class:AbstractXMLWriter
To embed xml writers into another one it must be possible to specify the parentGenericXMLSchemaBasedWriter
as 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(); }
- Specified by:
store
in classAbstractXMLWriter
- Parameters:
value
- aObject
objectwriter
- A parent writer that is used.- Throws:
CAKEIOException
- if any.
-