com.jxml.quick.ocm
Class OCMsinkSupport

java.lang.Object
  |
  +--com.jxml.quick.ocm.OCMsinkSupport
All Implemented Interfaces:
Item, OCMbase, OCMsink
Direct Known Subclasses:
OCMcontextSupport, OCMtranscribe, OCMvalidatorSupport, Preferences

public class OCMsinkSupport
extends Object
implements OCMsink, Item

Support class for OCMsink.

DTD:

<!ELEMENT sinkSupport (((contextSupport | transcribe | input) | sourceLink),(validatorSupport | validateLink)?)>

<!ATTLIST sinkSupport 
    docNamePrefix CDATA #IMPLIED
    expressDefaults CDATA "False"
    ID CDATA "False"
>


Inner Class Summary
 class OCMsinkSupport.SubSinkSupport
          A processing object spawned from an OCMsinkSupport object.
 
Inner classes inherited from class com.jxml.quick.ocm.OCMsink
OCMsink.SubSink
 
Inner classes inherited from class com.jxml.quick.ocm.OCMbase
OCMbase.SubBase
 
Field Summary
 boolean expressDefaults
          Set to true when defaults are to be expressed.
static long genNbr
           
 String prefix
          Doc Name Prefix.
 OCMsource source
          The source of the input document.
 OCMvalidator validator
          The validator is applied prior to processing.
 
Constructor Summary
OCMsinkSupport()
           
 
Method Summary
static OCMsinkSupport.SubSinkSupport createSink(QDoc sinkSchema, String sinkName)
          Returns an OCM sink.
static OCMsinkSupport.SubSinkSupport createSink(String sinkSchemaName, String sinkName, ClassLoader cl)
          Returns an OCM sink.
 void eval(Map properties, List args, ClassLoader cl)
          This method can be invoked by config.
sinkSchema - the schema for the sink file (typically classpath:///com/jxml/quick/util/util.qiml)
sinkSchemaClass - the schema class for the sink file (prefered to sinkSchema)
sinkIn - the (required) sink file or url
in - the (required) property naming the QDML document to be updated
out - the (optional) property naming the output file.
static void exec(Map properties, List args, ClassLoader cl)
           
 void setSource(OCMsource source)
          Sets the input source used by the sink.
 void setValidator(OCMvalidator validator)
          Sets the validator use by the sink.
 OCMbase.SubBase spawn(HashMap prior)
          Creates a processing structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

genNbr

public static long genNbr

prefix

public String prefix
Doc Name Prefix.

validator

public OCMvalidator validator
The validator is applied prior to processing. May be null.

source

public OCMsource source
The source of the input document.

expressDefaults

public boolean expressDefaults
Set to true when defaults are to be expressed.
Constructor Detail

OCMsinkSupport

public OCMsinkSupport()
Method Detail

spawn

public OCMbase.SubBase spawn(HashMap prior)
Description copied from interface: OCMbase
Creates a processing structure.
Specified by:
spawn in interface OCMbase
Following copied from interface: com.jxml.quick.ocm.OCMbase
Parameters:
prior - A table of already spawned objects, keyed by their base object.

setValidator

public void setValidator(OCMvalidator validator)
                  throws SAXException,
                         IOException
Description copied from interface: OCMsink
Sets the validator use by the sink.
Specified by:
setValidator in interface OCMsink

setSource

public void setSource(OCMsource source)
               throws SAXException,
                      IOException
Description copied from interface: OCMsink
Sets the input source used by the sink.
Specified by:
setSource in interface OCMsink

createSink

public static OCMsinkSupport.SubSinkSupport createSink(String sinkSchemaName,
                                                       String sinkName,
                                                       ClassLoader cl)
                                                throws SAXException,
                                                       IOException
Returns an OCM sink.

createSink

public static OCMsinkSupport.SubSinkSupport createSink(QDoc sinkSchema,
                                                       String sinkName)
                                                throws SAXException,
                                                       IOException
Returns an OCM sink.

eval

public void eval(Map properties,
                 List args,
                 ClassLoader cl)
          throws Exception
This method can be invoked by config.
sinkSchema - the schema for the sink file (typically classpath:///com/jxml/quick/util/util.qiml)
sinkSchemaClass - the schema class for the sink file (prefered to sinkSchema)
sinkIn - the (required) sink file or url
in - the (required) property naming the QDML document to be updated
out - the (optional) property naming the output file.
Specified by:
eval in interface Item

exec

public static void exec(Map properties,
                        List args,
                        ClassLoader cl)
                 throws Exception