|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.Externalizer | +--com.ibm.dse.automaton.ProcessorExternalizer
The ProcessExternalizer class reads processors. The generic SGML file must be specified in DSE.INI in the path settings.files.processor. The tags must be in settings.tags.processors.
Fields inherited from class com.ibm.dse.base.Externalizer |
tagClassTable,
tagInputStream,
TYPE_CONTEXT,
TYPE_DATA,
TYPE_FORMAT,
TYPE_OPERATION,
TYPE_PROCESSOR,
TYPE_SERVICE,
TYPE_SETTINGS,
TYPE_TYPE,
TYPE_UNKNOWN,
TYPE_VIEW |
Constructor Summary | |
ProcessorExternalizer()
This is the default constructor used to create a ProcessorExternalizer object. |
|
ProcessorExternalizer(java.lang.String option,
java.io.BufferedInputStream aIniStream)
This constructor creates a new instance of the ProcessorExternalizer class, Option can be Memory or File.Memory means that all tags are stored in memory. |
|
ProcessorExternalizer(java.lang.String option,
java.lang.String pathAndFile)
This constructor initializes a Processor object. |
Method Summary | |
static void |
addType(Tag aTag)
This method creates a Type object and initializes it with the information stored in the Tag. |
static void |
clearCache()
This method empties the cache |
java.lang.Object |
convertTagToObject(Tag aTag)
Converts a tag to an object and initializes the object's attributes. |
protected ProcessorExternalizer |
createNewExternalizer()
Returns a new externalizer for the generic processor file. |
protected TagInputStream |
createSelfDefinedProcTagInputStream(java.lang.String aFileProcName,
java.lang.String aPathFile)
Returns a new self-defined TagInputStream for the specified file. |
void |
end()
Releases resources from this Externalizer |
static Hashtable |
getCache()
This method returns the Processor element cache. |
static java.util.Date |
getDateCreationFileByFileName(java.lang.String aProcFileName)
Returns the date the self-defined processor file aProcFileName was created or modified. |
static java.util.Date |
getDateCreationFileByProcessorName(java.lang.String aProcessorName)
Returns the date the file containing the self-defined processor aProcessorName was created or modified. |
static java.lang.Object |
getFromCache(java.lang.String key)
This method will remove a processor element with id=key from the cache and return it. |
static java.util.Enumeration |
getProcessorFileList()
Returns the list of the self-defined processor file. |
TagInputStream |
getSelfDefinedProcTagInputStream(java.lang.String aProcFileName)
Returns the TagInputStream to which the specified aProcFileName key is mapped. |
java.util.Hashtable |
getSelfDefinedProcTagInputStreams()
Returns the Hashtable containing the self-defined processors file names as keys and the corresponding TagInputStreams as values. |
TagOutputStream |
getSelfDefinedProcTagOutputStream(java.lang.String aProcFileName)
Returns the tagOutputStream of a self-defined processor. |
java.lang.Object[] |
getSgmlSelfDefinedProcFileName(java.lang.String aProcessorId)
Returns the self-defined processor file name corresponding to the aProcessorId parameter. |
boolean |
isCacheable()
This method finds out if THIS particular object can be cached. |
static boolean |
isCacheEnabled()
Returns true if processor element caching is possible. |
static void |
linkAttributeRefs(Tag parentTag,
TagInputStream theTagInputStream)
Deprecated. Replaced by linkAttributeRefs(Tag, TagInputStream, TagInputStream) . |
static void |
linkAttributeRefs(Tag parentTag,
TagInputStream theTagInputStream,
TagInputStream genericTagInputStream)
If parentTag has an attribute named 'context','refFlow','operationName' or 'operationContext' then add to parentTag a subtag that is the referenced tag. |
static void |
linkContext(Tag parentTag,
TagInputStream theTagInputStream)
Deprecated. Replaced by linkContext(Tag, TagInputStream, TagInputStream) . |
static void |
linkContext(Tag parentTag,
TagInputStream theTagInputStream,
TagInputStream genericTagInputStream)
This method will add to parentTag (context tag), a subtag that is the parent context. |
static void |
linkRefData(Tag parentTag,
Tag grandParentTag,
TagInputStream theTagInputStream,
int parentRefTagIndex)
Deprecated. Replaced by linkRefData(Tag, Tag, TagInputStream, int, TagInputStream) . |
static void |
linkRefData(Tag parentTag,
Tag grandParentTag,
TagInputStream theTagInputStream,
int parentRefTagIndex,
TagInputStream genericTagInputStream)
This method replaces parentTag ("refData" tag) with its corresponding real tag. |
static void |
linkReferences(Tag grandParentTag,
Tag parentTag,
int parentRefTagIndex,
TagInputStream theTagInputStream)
This method alters the tag structure of the tagInputStream for processor files (either DSEPROCESSOR, or a self defined file) by linking all references to their real tags. |
protected static void |
linkReferences(Tag grandParentTag,
Tag parentTag,
int parentRefTagIndex,
TagInputStream theTagInputStream,
TagInputStream genericTagInputStream)
This method alters the tag structure of the tagInputStream for processor files (either DSEPROCESSOR, or a self defined file) by linking all references to their real tags. |
static void |
linkRefFmt(Tag parentTag,
Tag grandParentTag,
TagInputStream theTagInputStream,
int parentRefTagIndex)
Deprecated. Replaced by linkRefFmt(Tag, Tag, TagInputStream, int, TagInputStream) . |
static void |
linkRefFmt(Tag parentTag,
Tag grandParentTag,
TagInputStream theTagInputStream,
int parentRefTagIndex,
TagInputStream genericTagInputStream)
This method replaces parentTag ("refFmt" tag) with its corresponding real tag. |
static void |
linkRefFormat(Tag parentTag,
TagInputStream theTagInputStream)
Deprecated. Replaced by linkRefFormat(Tag, TagInputStream, TagInputStream) . |
static void |
linkRefFormat(Tag parentTag,
TagInputStream theTagInputStream,
TagInputStream genericTagInputStream)
This method will add the real corresponding format tag as a subtag to parentTag ("refFormat" tag). |
static void |
linkRefKColl(Tag parentTag,
TagInputStream theTagInputStream)
Deprecated. Replaced by linkRefKColl(Tag, TagInputStream, TagInputStream) . |
static void |
linkRefKColl(Tag parentTag,
TagInputStream theTagInputStream,
TagInputStream genericTagInputStream)
This method will add the real corresponding tag as a subtag to parentTag ("refKColl" tag). |
static void |
linkRefOpSteps(Tag parentTag,
TagInputStream theTagInputStream)
Deprecated. Replaced by linkRefOpSteps(Tag, TagInputStream, TagInputStream) . |
static void |
linkRefOpSteps(Tag parentTag,
TagInputStream theTagInputStream,
TagInputStream genericTagInputStream)
This method will add the real corresponding tag as a subtag to parentTag ("refOpSteps" tag). |
static void |
linkRefService(Tag parentTag,
TagInputStream theTagInputStream)
Deprecated. Replaced by linkRefService(Tag, TagInputStream, TagInputStream) . |
static void |
linkRefService(Tag parentTag,
TagInputStream theTagInputStream,
TagInputStream genericTagInputStream)
This method will add the real corresponding tag as a subtag to parentTag ("refService" tag). |
static void |
linkSpecifiedContext(Tag parentTag,
TagInputStream theTagInputStream,
java.lang.String tagId)
Deprecated. Replaced by linkSpecifiedContext(Tag, TagInputStream, String, TagInputStream) . |
static void |
linkSpecifiedContext(Tag parentTag,
TagInputStream theTagInputStream,
java.lang.String tagId,
TagInputStream genericTagInputStream)
Adds as subtag of the parentTag a context tag called tagId. |
static void |
linkSpecifiedFlow(Tag parentTag,
TagInputStream theTagInputStream,
java.lang.String flowId)
Deprecated. Replaced by linkSpecifiedFlow(Tag, TagInputStream, String, TagInputStream) . |
static void |
linkSpecifiedFlow(Tag parentTag,
TagInputStream theTagInputStream,
java.lang.String flowId,
TagInputStream genericTagInputStream)
Finds a flow tag called flowId and adds all its sub tags to the sub tags of the parentTag. |
static void |
linkSpecifiedFormat(Tag parentTag,
TagInputStream theTagInputStream,
java.lang.String tagId)
Deprecated. Replaced by linkSpecifiedFormat(Tag, TagInputStream, String, TagInputStream) . |
static void |
linkSpecifiedFormat(Tag parentTag,
TagInputStream theTagInputStream,
java.lang.String tagId,
TagInputStream genericTagInputStream)
Adds as subtag of the parentTag a format tag called tagId. |
static void |
linkSpecifiedOperation(Tag parentTag,
TagInputStream theTagInputStream,
java.lang.String tagId)
Deprecated. Replaced by linkSpecifiedOperation(Tag, TagInputStream, String, TagInputStream) . |
static void |
linkSpecifiedOperation(Tag parentTag,
TagInputStream theTagInputStream,
java.lang.String tagId,
TagInputStream genericTagInputStream)
Adds as subtag of the parentTag a operation tag called tagId. |
void |
makeTagClassTable()
Makes the tagClassTable with the values in DSE.INI The path is: settings.tags.processors. |
static void |
putIntoCache(Processor processor)
This method will place the processor element |
java.lang.Object |
readObject(java.lang.String aProcessorId)
When an application wants to internalize an instance of an processor (generic or self-defined), it calls this method. |
java.lang.Object |
readObjectNonCache(java.lang.String aProcessorId)
Returns a new processor instance created from the information stored in the configuration files associated with a given processor id. |
Tag |
readTag(int index,
java.lang.String aProcFileName)
Returns the Tag with a given index to the tagInputStream corresponding to a self-defined processor file. |
void |
reset()
Resets all the generic processors. |
void |
reset(java.util.Enumeration listTagId)
Resets the definition of processors which id appears in listTagId. |
void |
reset(java.lang.String tagId)
Resets the definition of the processor named tagId. |
protected void |
reset(java.lang.String aProcessorId,
TagInputStream aTagInputStream,
Hashtable selfDefinedTagInputStreams)
Resets the definition of the processor named tagId. |
static void |
resetProcessorFileNamed(java.lang.String aProcFileName)
Resets all the self-defined processors contained in the file aProcFileName and then removes the TagInputStream corresponding to the self-defined processor file aProcFileName from the Hashtable. |
static void |
resetProcessorNamed(java.lang.String aProcessorName)
Resets the self-defined processor aProcessorName. |
static void |
setCacheEnabled(boolean newValue)
This method enables or disables the processor element caching. |
void |
setSelfDefinedProcTagInputStream(java.lang.String aFileProcName)
Creates and sets a TagInputStream corresponding to the aFileProcName file. |
void |
setSelfDefinedProcTagInputStream(java.lang.String aFileProcName,
java.lang.String aPathFile)
Creates and sets a TagInputStream corresponding to the aFileProcName file. |
void |
setSelfDefinedProcTagInputStream(java.lang.String aKey,
TagInputStream aTagInputStream)
Sets aTagInputStream in the hashtable with the key aKey. |
java.util.Vector |
tagList(java.lang.String aProcFileName)
Returns the tags in the stream corresponding to the self-defined processor file aProcFileName. |
Tag |
tagWithId(java.lang.String aString,
java.lang.String aProcFileName)
Returns the Tag with the ID in the stream corresponding to the self-defined processor file aProcFileName. |
Methods inherited from class com.ibm.dse.base.Externalizer |
getClasses,
getTagClassTable,
getTagInputStream,
getTagOutputStream,
isRunTime,
readObject,
readTag,
setRunTime,
setTagClassTable,
setTagInputStream,
tagList,
tagWithId |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ProcessorExternalizer()
public ProcessorExternalizer(java.lang.String option, java.io.BufferedInputStream aIniStream) throws java.io.IOException
option
- java.lang.StringaIniStream
- java.io.BufferedInputStreampublic ProcessorExternalizer(java.lang.String option, java.lang.String pathAndFile) throws java.io.IOException
option
- java.lang.StringpathAndFile
- java.lang.String specifying the name and path of the formats definition fileMethod Detail |
public static void addType(Tag aTag) throws java.io.IOException
aTag
- com.ibm.dse.base.Tagpublic static void clearCache()
public java.lang.Object convertTagToObject(Tag aTag) throws java.io.IOException
aTag
- Tagprotected ProcessorExternalizer createNewExternalizer() throws java.io.IOException, DSEObjectNotFoundException
protected TagInputStream createSelfDefinedProcTagInputStream(java.lang.String aFileProcName, java.lang.String aPathFile) throws java.io.IOException
aFileProcName
- java.lang.String The name of the file.aPathFile
- java.lang.String The path of the file.public void end()
public static Hashtable getCache()
public static java.util.Date getDateCreationFileByFileName(java.lang.String aProcFileName)
aProcFileName
- java.lang.String the self-defined processor file name.public static java.util.Date getDateCreationFileByProcessorName(java.lang.String aProcessorName)
aProcessorName
- java.lang.String the self-defined processor name (id).public static java.lang.Object getFromCache(java.lang.String key) throws java.io.IOException
key
- java.lang.Stringpublic static java.util.Enumeration getProcessorFileList()
public TagInputStream getSelfDefinedProcTagInputStream(java.lang.String aProcFileName)
aProcFileName
- java.lang.Stringpublic java.util.Hashtable getSelfDefinedProcTagInputStreams()
public TagOutputStream getSelfDefinedProcTagOutputStream(java.lang.String aProcFileName) throws java.io.IOException
aProcFileName
- Stringpublic java.lang.Object[] getSgmlSelfDefinedProcFileName(java.lang.String aProcessorId)
aProcessorId
- java.lang.Stringpublic boolean isCacheable()
public static boolean isCacheEnabled()
public static void linkAttributeRefs(Tag parentTag, TagInputStream theTagInputStream) throws java.io.IOException
linkAttributeRefs(Tag, TagInputStream, TagInputStream)
.
public static void linkAttributeRefs(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkContext(Tag parentTag, TagInputStream theTagInputStream) throws java.io.IOException
linkContext(Tag, TagInputStream, TagInputStream)
.
public static void linkContext(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkRefData(Tag parentTag, Tag grandParentTag, TagInputStream theTagInputStream, int parentRefTagIndex) throws java.io.IOException
linkRefData(Tag, Tag, TagInputStream, int, TagInputStream)
.
public static void linkRefData(Tag parentTag, Tag grandParentTag, TagInputStream theTagInputStream, int parentRefTagIndex, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkReferences(Tag grandParentTag, Tag parentTag, int parentRefTagIndex, TagInputStream theTagInputStream) throws java.io.IOException, DSEObjectNotFoundException
grandParentTag
- com.ibm.dse.base.TagparentTag
- com.ibm.dse.base.TagparentRefTagIndex
- inttheTagInputStream
- com.ibm.dse.base.TagInputStreamprotected static void linkReferences(Tag grandParentTag, Tag parentTag, int parentRefTagIndex, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException, DSEObjectNotFoundException
grandParentTag
- com.ibm.dse.base.TagparentTag
- com.ibm.dse.base.TagparentRefTagIndex
- inttheTagInputStream
- com.ibm.dse.base.TagInputStreampublic static void linkRefFmt(Tag parentTag, Tag grandParentTag, TagInputStream theTagInputStream, int parentRefTagIndex) throws java.io.IOException
linkRefFmt(Tag, Tag, TagInputStream, int, TagInputStream)
.
public static void linkRefFmt(Tag parentTag, Tag grandParentTag, TagInputStream theTagInputStream, int parentRefTagIndex, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkRefFormat(Tag parentTag, TagInputStream theTagInputStream) throws java.io.IOException
linkRefFormat(Tag, TagInputStream, TagInputStream)
.
public static void linkRefFormat(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkRefKColl(Tag parentTag, TagInputStream theTagInputStream) throws java.io.IOException
linkRefKColl(Tag, TagInputStream, TagInputStream)
.
public static void linkRefKColl(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkRefOpSteps(Tag parentTag, TagInputStream theTagInputStream) throws java.io.IOException
linkRefOpSteps(Tag, TagInputStream, TagInputStream)
.
public static void linkRefOpSteps(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkRefService(Tag parentTag, TagInputStream theTagInputStream) throws java.io.IOException
linkRefService(Tag, TagInputStream, TagInputStream)
.
public static void linkRefService(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkSpecifiedContext(Tag parentTag, TagInputStream theTagInputStream, java.lang.String tagId) throws java.io.IOException
linkSpecifiedContext(Tag, TagInputStream, String, TagInputStream)
.
public static void linkSpecifiedContext(Tag parentTag, TagInputStream theTagInputStream, java.lang.String tagId, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkSpecifiedFlow(Tag parentTag, TagInputStream theTagInputStream, java.lang.String flowId) throws java.io.IOException
linkSpecifiedFlow(Tag, TagInputStream, String, TagInputStream)
.
public static void linkSpecifiedFlow(Tag parentTag, TagInputStream theTagInputStream, java.lang.String flowId, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkSpecifiedFormat(Tag parentTag, TagInputStream theTagInputStream, java.lang.String tagId) throws java.io.IOException
linkSpecifiedFormat(Tag, TagInputStream, String, TagInputStream)
.
public static void linkSpecifiedFormat(Tag parentTag, TagInputStream theTagInputStream, java.lang.String tagId, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkSpecifiedOperation(Tag parentTag, TagInputStream theTagInputStream, java.lang.String tagId) throws java.io.IOException
linkSpecifiedOperation(Tag, TagInputStream, String, TagInputStream)
.
public static void linkSpecifiedOperation(Tag parentTag, TagInputStream theTagInputStream, java.lang.String tagId, TagInputStream genericTagInputStream) throws java.io.IOException
public void makeTagClassTable()
public static void putIntoCache(Processor processor) throws java.io.IOException
processor
- com.ibm.dse.automaton.Processorpublic java.lang.Object readObject(java.lang.String aProcessorId) throws java.io.IOException
If you know the class to be internalized and it implements Externalizable, an alternative way to get the instance is to use:
new MyClass(aString)If cache is enabled and the given processor exists in it, this instance is returned; if not, the framework creates a new one from the configuration files.
aProcessorId
- java.lang.Stringpublic java.lang.Object readObjectNonCache(java.lang.String aProcessorId) throws java.io.IOException
aProcessorId
- java.lang.Stringpublic Tag readTag(int index, java.lang.String aProcFileName) throws java.io.IOException
index
- intaProcFileName
- java.lang.String the self-defined processor file name where the tag must be searchedpublic void reset() throws java.io.IOException, DSEObjectNotFoundException
public void reset(java.lang.String tagId) throws java.io.IOException, DSEObjectNotFoundException
tagId
- java.lang.String The id of the processor to reset.protected void reset(java.lang.String aProcessorId, TagInputStream aTagInputStream, Hashtable selfDefinedTagInputStreams) throws java.io.IOException
aProcessorId
- java.lang.String The id of the processor to reset.aTagInputStream
- com.ibm.dse.base.TagInputStream The temporal generic TagInputStream.selfDefinedTagInputStreams
- com.ibm.dse.base.Hashtable The temporal self-defined TagInputStreams.public void reset(java.util.Enumeration listTagId) throws java.io.IOException, DSEObjectNotFoundException
listTagId
- java.util.Enumerationpublic static void resetProcessorFileNamed(java.lang.String aProcFileName)
aProcFileName
- java.lang.String the name of the self-defined processor filepublic static void resetProcessorNamed(java.lang.String aProcessorName)
aProcessorName
- java.lang.String the name of the processor to resetpublic static void setCacheEnabled(boolean newValue)
newValue
- booleanpublic void setSelfDefinedProcTagInputStream(java.lang.String aFileProcName) throws java.io.IOException
aFileProcName
- java.lang.Stringpublic void setSelfDefinedProcTagInputStream(java.lang.String aKey, TagInputStream aTagInputStream) throws java.io.IOException
aKey
- java.lang.StringaTagInputStream
- aTagInputStreampublic void setSelfDefinedProcTagInputStream(java.lang.String aFileProcName, java.lang.String aPathFile) throws java.io.IOException
aFileProcName
- java.lang.StringaPathFile
- java.lang.Stringpublic java.util.Vector tagList(java.lang.String aProcFileName)
aProcFileName
- java.lang.Stringpublic Tag tagWithId(java.lang.String aString, java.lang.String aProcFileName) throws java.io.IOException
aString
- java.lang.String the id of the Tag to searchaProcFileName
- java.lang.String the self-defined processor file name where the tag must be searched
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |