|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.ims.xms.XMSShredder
Shreds an XML document, while implementing an XMSDocumentHandler
Fields inherited from interface com.ibm.ims.xms.XMSDocumentHandler |
TYPE_FIELD, TYPE_SEGMENT, TYPE_UNKNOWN |
Constructor Summary | |
XMSShredder(XMSGrammarPool xmsGrammarPool,
DLIDatabaseView dbView,
java.lang.String pcbAlias,
boolean validate)
Creates a XMSShredder object capable of shredding a valid XMS XML Document. |
Method Summary | |
void |
endDocument()
The end of the document. |
void |
endField(java.lang.String fieldName)
The end of a field. |
void |
endSegment(java.lang.String segmentName)
The end of a segment. |
void |
fieldValue(java.lang.String text)
Part or all of a field value. |
boolean |
fillTopSegment(DLISegment topSegment)
Begins XML parse filling the topSegment. |
int |
getElementType(java.lang.String elementName)
Queries for the type this element maps to. |
DLISegment |
getSegment()
Returns the next DLISegment produced by the XML Parse. |
static void |
main(java.lang.String[] args)
This method is used for internal testing only |
boolean |
moreSegments()
Returns true if there are more segments to be parsed and returned. |
void |
reset()
Resets any accumulated State. |
void |
setInputSource(java.io.Reader reader)
Sets the input source to parse. |
void |
setInputSource(org.apache.xerces.xni.parser.XMLInputSource inputSource)
Sets the input source to parse. |
void |
sideSegment(java.lang.String segmentName,
java.lang.String fieldName,
java.lang.String fieldValue)
Indicates a side Segment has been found inside the current field. |
void |
startDocument(java.lang.String psbName,
java.lang.String pcbName)
The start of the document. |
boolean |
startField(java.lang.String fieldName)
The start of a field. |
void |
startSegment(java.lang.String segmentName)
The start of a segment. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XMSShredder(XMSGrammarPool xmsGrammarPool, DLIDatabaseView dbView, java.lang.String pcbAlias, boolean validate) throws java.io.IOException
Method Detail |
public boolean fillTopSegment(DLISegment topSegment) throws java.io.IOException, DLIException
fillTopSegment
in interface DLISegmentStream
public boolean moreSegments() throws java.io.IOException
moreSegments
in interface DLISegmentStream
public DLISegment getSegment() throws java.io.IOException, DLIException
getSegment
in interface DLISegmentStream
NoSuchElementException
- no more segments to get.public void setInputSource(org.apache.xerces.xni.parser.XMLInputSource inputSource) throws org.apache.xerces.xni.parser.XMLConfigurationException, java.io.IOException
inputSource
- The document's input source.org.apache.xerces.xni.parser.XMLConfigurationException
- Thrown if there is a
configuration error when initializing the
parser.java.io.IOException
- Thrown on I/O error.#parse(boolean)
public void setInputSource(java.io.Reader reader) throws org.apache.xerces.xni.parser.XMLConfigurationException, java.io.IOException
inputSource
- The document's input source.org.apache.xerces.xni.parser.XMLConfigurationException
- Thrown if there is a
configuration error when initializing the
parser.java.io.IOException
- Thrown on I/O error.#parse(boolean)
public void startDocument(java.lang.String psbName, java.lang.String pcbName) throws org.apache.xerces.xni.XNIException
startDocument
in interface XMSDocumentHandler
psbName
- The name of the PSB this instance data relates to.pcbName
- The name of the PCB this instance data relates to.XNIException
- Thrown by handler to signal an error.public int getElementType(java.lang.String elementName) throws org.apache.xerces.xni.XNIException
getElementType
in interface XMSDocumentHandler
elementName
- The name of the element encountered in the parse.XNIException
- Thrown by handler to signal an error.public void startSegment(java.lang.String segmentName) throws org.apache.xerces.xni.XNIException
startSegment
in interface XMSDocumentHandler
segmentName
- The name of the segment.XNIException
- Thrown by handler to signal an error.public boolean startField(java.lang.String fieldName) throws org.apache.xerces.xni.XNIException
startField
in interface XMSDocumentHandler
fieldName
- The name of the field.XNIException
- Thrown by handler to signal an error.public void fieldValue(java.lang.String text) throws org.apache.xerces.xni.XNIException
fieldValue
in interface XMSDocumentHandler
text
- The content.XNIException
- Thrown by handler to signal an error.public void sideSegment(java.lang.String segmentName, java.lang.String fieldName, java.lang.String fieldValue) throws org.apache.xerces.xni.XNIException
sideSegment
in interface XMSDocumentHandler
segmentName
- The SideSegment name.fieldName
- The Name of the single field in the Side Segment.fieldValue
- The Value of the field.XNIException
- Thrown by handler to signal an error.public void endField(java.lang.String fieldName) throws org.apache.xerces.xni.XNIException
endField
in interface XMSDocumentHandler
endField
- The name of the field.XNIException
- Thrown by handler to signal an error.public void endSegment(java.lang.String segmentName) throws org.apache.xerces.xni.XNIException
endSegment
in interface XMSDocumentHandler
segmentName
- The name of the segment.XNIException
- Thrown by handler to signal an error.public void endDocument() throws org.apache.xerces.xni.XNIException
endDocument
in interface XMSDocumentHandler
XNIException
- Thrown by handler to signal an error.public void reset()
reset
in interface XMSDocumentHandler
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |