|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.dse.base.Externalizer
com.ibm.dse.base.FormatExternalizer
This class manages the externalization of formatted objects using the tags specified in the settings.tags.formats path and the formats definition file specified in DSE.INI (in the settings.files.format path).
Field Summary |
---|
Fields inherited from class com.ibm.dse.base.Externalizer |
---|
numberOfObjects, tagClassTable, tagInputStream, TYPE_CONTEXT, TYPE_DATA, TYPE_FORMAT, TYPE_OPERATION, TYPE_PROCESSOR, TYPE_SERVICE, TYPE_SETTINGS, TYPE_TYPE, TYPE_UNKNOWN, TYPE_VIEW |
Constructor Summary | |
---|---|
FormatExternalizer()
This is the default constructor used to create a FormatExternalizer object. |
|
FormatExternalizer(java.lang.String option,
java.io.BufferedInputStream aIniStream)
This constructor initializes an Externalizer object. |
|
FormatExternalizer(java.lang.String option,
java.lang.String pathAndFile)
This constructor initializes an Externalizer object. |
Method Summary | |
---|---|
static void |
clearCache()
This method empties the cache. |
protected java.lang.Object |
convertRealTagToObject(Tag aTag)
Converts a tag to an object and initializes the object's attributes. |
java.lang.Object |
convertTagToObject(Tag aTag)
Converts a Tag to an Object using the tagClassTable and initializes the Object's attributes. |
protected Externalizer |
createNewExternalizer()
Returns a new externalizer for the generic format file. |
void |
end()
Release resources from this externalizer. |
static Hashtable |
getCache()
Returns the Format element cache. |
static Cacheable |
getFromCache(java.lang.String key)
Removes the format element with id=key from the cache and returns it. |
static boolean |
isCacheEnabled()
Returns true if format element caching is enabled. |
boolean |
isDecorator(Tag aTag)
Returns true if the tag is a decorator. |
static void |
linkReferences(Tag grandParentTag,
Tag parentTag,
int parentRefTagIndex)
Alters the tag structure of the tagInputStream for DSEFMTS by linking all references to their real tags. |
protected static void |
linkReferences(Tag grandParentTag,
Tag parentTag,
int parentRefTagIndex,
TagInputStream aTagInputStream)
This method alters the tag structure of the tagInputStream for DSEFMTS by linking all references to their real tags. |
static void |
linkRefFmt(Tag parentTag,
Tag grandParentTag,
int parentRefTagIndex)
Deprecated. Replaced by linkRefFmt(Tag, Tag, int, TagInputStream) . |
static void |
linkRefFmt(Tag parentTag,
Tag grandParentTag,
int parentRefTagIndex,
TagInputStream aTagInputStream)
Replaces parentTag (refFmt tag) with its corresponding real tag. |
FormatElement |
linkToDecorators(FormatElement aFormat,
Tag aTag)
Makes the decorator FormatElement point to the format FormatElement if the decorator tag follows the format tag. |
void |
makeTagClassTable()
Creates the tagClassTable using the values in DSE.INI file (path: settings.tags.formats). |
static Tag |
overrideTagAttributes(Tag childTag,
Vector subTags)
Overrides a given tag with the attributes specified as param subtags in the given list of subtags. |
static void |
putIntoCache(Cacheable format)
Places the format element into the cache. |
void |
reset()
Sets a new format externalizer to FormatElement. |
void |
reset(java.util.Enumeration listTagId)
Resets the definition of tags in which tag id appears in listTagId. |
void |
reset(java.lang.String tagId)
Resets the definition of the tag with id tagId. |
protected void |
reset(java.lang.String tagId,
TagInputStream aTagInputStream)
Resets the definition of the format entity with id equals to tagId. |
static void |
setCacheEnabled(boolean newValue)
Enables or disables the format element caching. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FormatExternalizer()
public FormatExternalizer(java.lang.String option, java.io.BufferedInputStream aIniStream) throws java.io.IOException
option
- java.lang.String - Must be Memory or FileaIniStream
- java.io.BufferedInputStream - Containing the input datapublic FormatExternalizer(java.lang.String option, java.lang.String pathAndFile) throws java.io.IOException
option
- java.lang.String - Must be Memory or FilepathAndFile
- java.lang.String - Specifying the name and path of the formats definition fileMethod Detail |
public static void clearCache()
protected java.lang.Object convertRealTagToObject(Tag aTag) throws java.io.IOException
aTag
- Tag
java.io.IOException
public java.lang.Object convertTagToObject(Tag aTag) throws java.io.IOException
convertTagToObject
in class Externalizer
aTag
- Tag
java.io.IOException
protected Externalizer createNewExternalizer() throws java.io.IOException, DSEObjectNotFoundException
java.io.IOException
DSEObjectNotFoundException
public void end()
end
in class Externalizer
public static Hashtable getCache()
public static Cacheable getFromCache(java.lang.String key) throws java.io.IOException
key
- java.lang.String
java.io.IOException
public static boolean isCacheEnabled()
public boolean isDecorator(Tag aTag)
aTag
- Tag
public static void linkReferences(Tag grandParentTag, Tag parentTag, int parentRefTagIndex) throws java.io.IOException, DSEObjectNotFoundException
grandParentTag
- com.ibm.dse.base.Tag - The tag that has the parentTag as one of its subtagsparentTag
- com.ibm.dse.base.Tag - The tag that is currently being checked for referencesparentRefTagIndex
- int - The index of the parentTag in the subtags Vector of grandParentTag
java.io.IOException
DSEObjectNotFoundException
protected static void linkReferences(Tag grandParentTag, Tag parentTag, int parentRefTagIndex, TagInputStream aTagInputStream) throws java.io.IOException, DSEObjectNotFoundException
grandParentTag
- com.ibm.dse.base.Tag - The tag that has the parentTag as one of its subtagsparentTag
- com.ibm.dse.base.Tag - The tag that is currently being checked for referencesparentRefTagIndex
- int - The index of the parentTag in the subtags vector of grandParentTagaTagInputStream
- - The input stream in which references are searched
java.io.IOException
DSEObjectNotFoundException
public static void linkRefFmt(Tag parentTag, Tag grandParentTag, int parentRefTagIndex) throws java.io.IOException, DSEObjectNotFoundException
linkRefFmt(Tag, Tag, int, TagInputStream)
.
java.io.IOException
DSEObjectNotFoundException
public static void linkRefFmt(Tag parentTag, Tag grandParentTag, int parentRefTagIndex, TagInputStream aTagInputStream) throws java.io.IOException, DSEObjectNotFoundException
java.io.IOException
DSEObjectNotFoundException
public FormatElement linkToDecorators(FormatElement aFormat, Tag aTag) throws java.io.IOException
aFormat
- FormatElementaTag
- Tag
java.io.IOException
public void makeTagClassTable()
makeTagClassTable
in class Externalizer
public static Tag overrideTagAttributes(Tag childTag, Vector subTags)
childTag
- com.ibm.dse.base.TagsubTags
- com.ibm.dse.base.Vector
public static void putIntoCache(Cacheable format) throws java.io.IOException
format
- com.ibm.dse.base.Cacheable
java.io.IOException
public void reset() throws java.io.IOException, DSEObjectNotFoundException
java.io.IOException
DSEObjectNotFoundException
public void reset(java.lang.String tagId) throws java.io.IOException, DSEObjectNotFoundException
tagId
- java.lang.String - The id of the tag to reset
java.io.IOException
DSEObjectNotFoundException
protected void reset(java.lang.String tagId, TagInputStream aTagInputStream) throws java.io.IOException
tagId
- java.lang.StringaTagInputStream
- com.ibm.dse.base.TagInputStream
java.io.IOException
public void reset(java.util.Enumeration listTagId) throws java.io.IOException, DSEObjectNotFoundException
listTagId
- java.util.Enumeration
java.io.IOException
DSEObjectNotFoundException
public static void setCacheEnabled(boolean newValue)
newValue
- boolean - True to enable object caching
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |