com.ibm.ims.xms
Interface XMSDocumentHandler

All Known Implementing Classes:
XMSShredder

public interface XMSDocumentHandler

The XMS document handler interface defines callback methods to report segment and field information obtained in XMS documents.

Author:
Christopher Holtz, IBM

Field Summary
static int TYPE_FIELD
           
static int TYPE_SEGMENT
           
static int TYPE_UNKNOWN
           
 
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.
 int getElementType(java.lang.String elementName)
          Queries for the type this element maps to.
 void reset()
          Resets any accumulated State.
 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.
 

Field Detail

TYPE_UNKNOWN

public static final int TYPE_UNKNOWN

TYPE_SEGMENT

public static final int TYPE_SEGMENT

TYPE_FIELD

public static final int TYPE_FIELD
Method Detail

startDocument

public void startDocument(java.lang.String psbName,
                          java.lang.String pcbName)
                   throws org.apache.xerces.xni.XNIException
The start of the document.
Parameters:
psbName - The name of the PSB this instance data relates to.
pcbName - The name of the PCB this instance data relates to.
Throws:
XNIException - Thrown by handler to signal an error.

getElementType

public int getElementType(java.lang.String elementName)
                   throws org.apache.xerces.xni.XNIException
Queries for the type this element maps to.
Parameters:
elementName - The name of the element encountered in the parse.
Throws:
XNIException - Thrown by handler to signal an error.

startSegment

public void startSegment(java.lang.String segmentName)
                  throws org.apache.xerces.xni.XNIException
The start of a segment.
Parameters:
segmentName - The name of the segment.
Throws:
XNIException - Thrown by handler to signal an error.

startField

public boolean startField(java.lang.String fieldName)
                   throws org.apache.xerces.xni.XNIException
The start of a field.
Parameters:
fieldName - The name of the field.
Returns:
boolean If the field value should be returned intact (true) or parsed individually (false)
Throws:
XNIException - Thrown by handler to signal an error.

fieldValue

public void fieldValue(java.lang.String text)
                throws org.apache.xerces.xni.XNIException
Part or all of a field value.
Parameters:
text - The content.
Throws:
XNIException - Thrown by handler to signal an error.

sideSegment

public void sideSegment(java.lang.String segmentName,
                        java.lang.String fieldName,
                        java.lang.String fieldValue)
                 throws org.apache.xerces.xni.XNIException
Indicates a side Segment has been found inside the current field.
Parameters:
segmentName - The SideSegment name.
fieldName - The Name of the single field in the Side Segment.
fieldValue - The Value of the field.
Throws:
XNIException - Thrown by handler to signal an error.

endField

public void endField(java.lang.String fieldName)
              throws org.apache.xerces.xni.XNIException
The end of a field.
Parameters:
fieldName - The name of the field.
Throws:
XNIException - Thrown by handler to signal an error.

endSegment

public void endSegment(java.lang.String segmentName)
                throws org.apache.xerces.xni.XNIException
The end of a segment.
Parameters:
segmentName - The name of the segment.
Throws:
XNIException - Thrown by handler to signal an error.

endDocument

public void endDocument()
                 throws org.apache.xerces.xni.XNIException
The end of the document.
Throws:
XNIException - Thrown by handler to signal an error.

reset

public void reset()
Resets any accumulated State.


(C) International Business Machines Corporation 2004. All rights reserved.