|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.TagInputStream
public class TagInputStream
This class is a Stream able to deal with individual tags and groups of them. It has a Vector with the tags and a table with a pairs-name index to locate them in the Vectors table more quickly.
Field Summary | |
---|---|
protected boolean |
_isSimpleTag
|
protected char[] |
_tagCharArray
|
protected int |
_tagLength
|
protected java.io.BufferedReader |
bufferedReader
|
protected static int |
DEFAULT_TAG_SIZE
|
protected static int |
DEFAULT_TAG_SIZE_INCREMENT
|
static java.lang.String |
FILE_ATTRIBUTE
|
static java.lang.String |
IMPORT
|
protected static java.util.Map |
importInputStreamMap
|
java.io.InputStream |
inputStream
InputStream for reading tag definition |
protected int |
lineNumber
|
protected static IRefDataHandler |
refDataHandler
|
java.lang.String |
sgmlFile
Configuration file for Tag |
Hashtable |
tagIndexes
The positions of the tags in the file |
Constructor Summary | |
---|---|
TagInputStream()
This constructor creates a TagInputStream object. |
|
TagInputStream(java.io.BufferedInputStream aIniStream,
java.lang.String kindOfFile)
This constructor creates a TagInputStream object to read from aIniStream. |
|
TagInputStream(java.io.BufferedInputStream aIniStream,
java.lang.String kindOfFile,
boolean isSelfDefined)
This constructor creates a TagInputStream object to read from aIniStream. |
|
TagInputStream(java.lang.String fileName,
java.lang.String kindOfFile)
This constructor creates a TagInputStream object to read from the specified file. |
|
TagInputStream(java.net.URL aURL,
java.lang.String kindOfFile)
This constructor creates a TagInputStream object to read from the specified file. |
|
TagInputStream(java.util.zip.ZipInputStream zip,
java.lang.String fileName,
java.lang.String kindOfFile)
This constructor creates a TagInputStream object to read from the specified zip file. |
Method Summary | |
---|---|
void |
close()
Closes the stream thereby releasing the file. |
void |
createComposedTag(Tag aTag,
java.lang.String fileTitle,
ProgressIndicator pi,
boolean isXmlFile)
Adds the subtags to aTag to create a composed tag. |
void |
createComposedTag(Tag aTag,
java.lang.String fileTitle,
ProgressIndicator pi,
boolean isXmlFile,
Tag.TagStringReader aReader)
Adds the subtags to aTag to create a composed tag. |
Tag |
first()
Returns the first tag in the stream. |
java.util.Date |
getDateCreationFile()
Returns the date the XML file corresponding to this TagInputStream was created or last modified. |
Externalizer |
getExternalizer()
Returns the Externalizer of this stream. |
java.lang.String |
getFromPath()
Use the from path to keep the import path, this is used to check whether there is circle in the path |
java.io.InputStream |
getInputStream()
Returns the inputStream. |
java.lang.String |
getKindOfFile()
Gets the kind of file to read |
static IRefDataHandler |
getRefDataHandler()
Get the refDataHandler. |
java.lang.String |
getSgmlFile()
Returns the name of the XML file that this stream reads. |
java.lang.String |
getSgmlFileTitle(java.lang.String aSgmlFile)
Returns the title (name) of the XML file (without its path) |
Tag |
getTag(int anInt)
Returns a Tag in a position. |
protected java.lang.String |
getTagAttributeValue(Tag tag,
java.lang.String attributeName)
Get the tag attribute value from the tag object |
Hashtable |
getTagIndexes()
Returns the positions of the tags in the file (option file) or the tags themselves (option memory). |
Vector |
getTags()
Returns the tags. |
protected java.lang.Object[] |
getTagString(int aPosition)
Reads a tag in the file starting in the position aPosition. |
protected void |
getTagString(int aPosition,
boolean isXmlFile)
Reads a tag in the file starting in the position aPosition |
void |
initialize(java.io.BufferedInputStream aIniStream,
java.lang.String kindOfFile)
Initializes the stream. |
void |
initialize(java.io.BufferedInputStream aIniStream,
java.lang.String kindOfFile,
boolean isSelfDefined)
Initializes the stream. |
void |
initialize(java.lang.String fileName,
java.lang.String kindOfFile)
Initializes the stream that reads the specified file. |
void |
initialize(java.net.URL aURL,
java.lang.String kindOfFile)
Initializes the stream reading from the URL. |
void |
initialize(java.util.zip.ZipInputStream zip,
java.lang.String fileName,
java.lang.String kindOfFile)
Initializes the stream that reads the specified zip file. |
protected void |
initializeSystem(java.lang.String fileName,
java.lang.String kindOfFile)
Initializes the stream that reads the specified file. |
boolean |
isDecorator(Tag aTag)
Returns true if aTag is a decorator. |
boolean |
isSimpleTag(Tag aTag)
Returns true if aTag is a simple tag. |
Tag |
last()
Returns the last tag. |
protected void |
loadFile()
This is the implementation of TagInputStream. |
protected int |
loadImportFile(int tagIndex,
Tag nextTag)
|
int |
read()
Reads a character from the bufferedReader and returns it as an int. |
java.lang.Object |
readObject(int index)
Returns the tag (cast to an Object) at the given index. |
Tag |
readTag(int index)
Returns the Tag at the specified index. |
void |
removeTagWithId(java.lang.String tagId)
Removes the tag with id tagId from this TagInputStream. |
void |
reset(java.lang.String tagId,
Tag newTagState)
Sets the attributes of the tag with the id tagId with the attributes of the tag passed by parameter. |
protected void |
setDate(java.lang.String fileName)
Sets the date the XML file corresponding to this TagInputStream was created. |
protected void |
setDate(java.net.URLConnection url)
Sets the date the URL corresponding to this TagInputStream was created. |
protected void |
setDate(java.util.zip.ZipEntry entry)
Sets the date the zip file corresponding to this TagInputStream was created. |
void |
setExternalizer(Externalizer aExternalizer)
Sets the externalizer. |
void |
setFromPath(java.lang.String fromPath)
Set the import path |
void |
setKindOfFile(java.lang.String aKindOfFile)
Sets the kind of file to read. |
static void |
setRefDataHandler(IRefDataHandler dataHandler)
Set the refDataHandler. |
void |
setSgmlFile(java.lang.String aFileName)
Sets the SGML file. |
void |
setTagIndexes(Hashtable aHashtable)
Sets the indexes of the tags in the file (option file). |
void |
setTags(Vector aVector)
Sets the tags. |
void |
skip(long aLong)
This method skips aLong amount of characters in the stream |
Tag |
tagWithId(java.lang.String aString)
Returns the tag with the specified ID. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String IMPORT
public static final java.lang.String FILE_ATTRIBUTE
public java.io.InputStream inputStream
public java.lang.String sgmlFile
public Hashtable tagIndexes
protected int lineNumber
protected static final int DEFAULT_TAG_SIZE
protected static final int DEFAULT_TAG_SIZE_INCREMENT
protected java.io.BufferedReader bufferedReader
protected char[] _tagCharArray
protected int _tagLength
protected boolean _isSimpleTag
protected static final java.util.Map importInputStreamMap
protected static IRefDataHandler refDataHandler
Constructor Detail |
---|
public TagInputStream()
public TagInputStream(java.io.BufferedInputStream aIniStream, java.lang.String kindOfFile, boolean isSelfDefined) throws java.io.IOException
java.io.IOException
public TagInputStream(java.io.BufferedInputStream aIniStream, java.lang.String kindOfFile) throws java.io.IOException
java.io.IOException
public TagInputStream(java.lang.String fileName, java.lang.String kindOfFile) throws java.io.IOException
fileName
- java.lang.StringkindOfFile
- java.lang.String
java.io.IOException
public TagInputStream(java.net.URL aURL, java.lang.String kindOfFile) throws java.io.IOException
aURL
- java.net.URLkindOfFile
- java.lang.String
java.io.IOException
public TagInputStream(java.util.zip.ZipInputStream zip, java.lang.String fileName, java.lang.String kindOfFile) throws java.io.IOException
zip
- ZipInputStreamfileName
- java.lang.StringkindOfFile
- java.lang.String
java.io.IOException
Method Detail |
---|
public static void setRefDataHandler(IRefDataHandler dataHandler)
public static IRefDataHandler getRefDataHandler()
public void close() throws java.io.IOException
java.io.IOException
public java.lang.String getFromPath()
public void setFromPath(java.lang.String fromPath)
fromPath
- the import pathpublic void createComposedTag(Tag aTag, java.lang.String fileTitle, ProgressIndicator pi, boolean isXmlFile) throws java.io.IOException
java.io.IOException.
java.io.IOException
public void createComposedTag(Tag aTag, java.lang.String fileTitle, ProgressIndicator pi, boolean isXmlFile, Tag.TagStringReader aReader) throws java.io.IOException
java.io.IOException.
java.io.IOException
public Tag first() throws java.io.IOException
java.io.IOException
public java.util.Date getDateCreationFile()
public Externalizer getExternalizer()
public java.io.InputStream getInputStream()
public java.lang.String getKindOfFile()
public java.lang.String getSgmlFile()
public java.lang.String getSgmlFileTitle(java.lang.String aSgmlFile)
aSgmlFile
- java.lang.String
public Tag getTag(int anInt) throws java.io.IOException
anInt
- int
java.io.IOException
public Hashtable getTagIndexes()
public Vector getTags()
protected java.lang.Object[] getTagString(int aPosition) throws java.io.IOException
java.io.IOException.
java.io.IOException
protected void getTagString(int aPosition, boolean isXmlFile) throws java.io.IOException
java.io.IOException.
java.io.IOException
public void initialize(java.io.BufferedInputStream aIniStream, java.lang.String kindOfFile) throws java.io.IOException
aIniStream
- BufferedInputStreamkindOfFile
- java.lang.String
java.io.IOException.
java.io.IOException
public void initialize(java.io.BufferedInputStream aIniStream, java.lang.String kindOfFile, boolean isSelfDefined) throws java.io.IOException
aIniStream
- BufferedInputStreamkindOfFile
- java.lang.StringisSelfDefined
- boolean
java.io.IOException.
java.io.IOException
public void initialize(java.lang.String fileName, java.lang.String kindOfFile) throws java.io.IOException
fileName
- java.lang.StringkindOfFile
- java.lang.String
java.io.IOException.
java.io.IOException
protected void initializeSystem(java.lang.String fileName, java.lang.String kindOfFile) throws java.io.IOException, InputStreamNotFoundException
fileName
- java.lang.StringkindOfFile
- java.lang.String
InputStreamNotFoundException
java.io.IOException.
java.io.IOException
public void initialize(java.net.URL aURL, java.lang.String kindOfFile) throws java.io.IOException
aURL
- java.net.URLkindOfFile
- java.lang.String
java.io.IOException.
java.io.IOException
public void initialize(java.util.zip.ZipInputStream zip, java.lang.String fileName, java.lang.String kindOfFile) throws java.io.IOException
zip
- java.util.zip.ZipInputStreamfileName
- java.lang.StringkindOfFile
- java.lang.String
java.io.IOException.
java.io.IOException
public boolean isDecorator(Tag aTag)
aTag
- com.ibm.btt.base.Tag
public boolean isSimpleTag(Tag aTag) throws java.io.IOException
java.io.IOException.
java.io.IOException
public Tag last() throws java.io.IOException
java.io.IOException
protected void loadFile() throws java.io.IOException
java.io.IOException.
java.io.IOException
protected int loadImportFile(int tagIndex, Tag nextTag) throws java.io.IOException, InputStreamNotFoundException
java.io.IOException
InputStreamNotFoundException
protected java.lang.String getTagAttributeValue(Tag tag, java.lang.String attributeName)
tag
- the tag objectattributeName
- the attribute name
public int read() throws java.io.IOException
java.io.IOException.
java.io.IOException
public java.lang.Object readObject(int index) throws java.io.IOException
index
- int
java.io.IOException
public Tag readTag(int index)
index
- int
public void removeTagWithId(java.lang.String tagId) throws java.io.IOException
tagId
- java.lang.String
java.io.IOException
public void reset(java.lang.String tagId, Tag newTagState)
tagId
- java.lang.String - The id of the tag to changenewTagState
- com.ibm.btt.base.Tag - The new value for the tag with id tagIdprotected void setDate(java.lang.String fileName)
protected void setDate(java.net.URLConnection url)
url
- java.net.URLConnectionprotected void setDate(java.util.zip.ZipEntry entry)
entry
- ZipEntrypublic void setExternalizer(Externalizer aExternalizer)
aExternalizer
- Externalizerpublic void setKindOfFile(java.lang.String aKindOfFile)
aKindOfFile
- java.lang.Stringpublic void setSgmlFile(java.lang.String aFileName)
aFileName
- java.lang.Stringpublic void setTagIndexes(Hashtable aHashtable)
public void setTags(Vector aVector)
aVector
- Vectorpublic void skip(long aLong) throws java.io.IOException
java.io.IOException
public Tag tagWithId(java.lang.String aString) throws java.io.IOException
aString
- java.lang.String
java.io.IOException.
java.io.IOException
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |