|
|||||||||
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.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).
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 | |
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 |
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()
This method returns the Format element cache. |
static java.lang.Object |
getFromCache(java.lang.String key)
This method will remove a format element with id=key from the cache and return it. |
static boolean |
isCacheEnabled()
Returns true if format element caching is possible. |
boolean |
isDecorator(Tag aTag)
Returns true if the tag is a decorator. |
static void |
linkReferences(Tag grandParentTag,
Tag parentTag,
int parentRefTagIndex)
This method 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)
This method 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(FormatElement format)
This method will place the format element 'format' into the cache. |
void |
reset()
Sets a new format externalizer to FormatElement. |
void |
reset(java.util.Enumeration listTagId)
Resets the definition of tags 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)
This method enables or disables the format element caching. |
Methods inherited from class com.ibm.dse.base.Externalizer |
getClasses,
getTagClassTable,
getTagInputStream,
getTagOutputStream,
isRunTime,
readObject,
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 FormatExternalizer()
public FormatExternalizer(java.lang.String option, java.io.BufferedInputStream aIniStream) throws java.io.IOException
option
- java.lang.StringaIniStream
- java.io.BufferedInputStream containing the input datapublic FormatExternalizer(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 clearCache()
public java.lang.Object convertTagToObject(Tag aTag) throws java.io.IOException
aTag
- Tagprotected Externalizer createNewExternalizer() throws java.io.IOException, DSEObjectNotFoundException
public void end()
public static Hashtable getCache()
public static java.lang.Object getFromCache(java.lang.String key) throws java.io.IOException
key
- java.lang.Stringpublic static boolean isCacheEnabled()
public boolean isDecorator(Tag aTag)
aTag
- Tagpublic static void linkReferences(Tag grandParentTag, Tag parentTag, int parentRefTagIndex) throws java.io.IOException, DSEObjectNotFoundException
grandParentTag
- com.ibm.dse.base.TagparentTag
- com.ibm.dse.base.TagparentRefTagIndex
- intprotected static void linkReferences(Tag grandParentTag, Tag parentTag, int parentRefTagIndex, TagInputStream aTagInputStream) throws java.io.IOException, DSEObjectNotFoundException
grandParentTag
- com.ibm.dse.base.TagparentTag
- com.ibm.dse.base.TagparentRefTagIndex
- intpublic static void linkRefFmt(Tag parentTag, Tag grandParentTag, int parentRefTagIndex) throws java.io.IOException, DSEObjectNotFoundException
linkRefFmt(Tag, Tag, int, TagInputStream)
.
public static void linkRefFmt(Tag parentTag, Tag grandParentTag, int parentRefTagIndex, TagInputStream aTagInputStream) throws java.io.IOException, DSEObjectNotFoundException
public FormatElement linkToDecorators(FormatElement aFormat, Tag aTag) throws java.io.IOException
aFormat
- FormatElementaTag
- Tagpublic void makeTagClassTable()
public static Tag overrideTagAttributes(Tag childTag, Vector subTags)
childTag
- com.ibm.dse.base.TagsubTags
- com.ibm.dse.base.Vectorpublic static void putIntoCache(FormatElement format) throws java.io.IOException
key
- java.lang.Stringvalue
- java.lang.Objectpublic 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 tag to reset.protected void reset(java.lang.String tagId, TagInputStream aTagInputStream) throws java.io.IOException
tagId
- java.lang.StringaTagInputStream
- com.ibm.dse.base.TagInputStreampublic void reset(java.util.Enumeration listTagId) throws java.io.IOException, DSEObjectNotFoundException
listTagId
- java.util.Enumerationpublic static void setCacheEnabled(boolean newValue)
newValue
- boolean
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |