Package com.ibm.di.parser
Class SPMLv2Parser
- java.lang.Object
-
- com.ibm.di.parser.ParserImpl
-
- com.ibm.di.parser.xml.XMLParser2
-
- com.ibm.di.parser.SPMLv2Parser
-
- All Implemented Interfaces:
ParserInterface,VersionInfoInterface
public class SPMLv2Parser extends XMLParser2
A TDI Parser class for reading and writing Entries in SPMLv2 DSMLv2 Profile format.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTR_NAME_ATTR_DESCRIPTIONSName of the SPML attributeDescription attribute.static java.lang.StringATTR_NAME_CONTAINERIDName of the SPML containerID attribute.static java.lang.StringATTR_NAME_CONTAINERID_TARGETIDName of the SPML containerID.targetID attribute.static java.lang.StringATTR_NAME_ERROR_CODEName of the SPML errorCode attribute.static java.lang.StringATTR_NAME_ERROR_MESSAGESName of the SPML errorMessages attribute.static java.lang.StringATTR_NAME_FILTERName of the SPML filter attribute.static java.lang.StringATTR_NAME_PSO_TARGETIDName of the SPML pso.targetID attribute.static java.lang.StringATTR_NAME_PSOIDName of the SPML psoID attribute.static java.lang.StringATTR_NAME_REQUESTIDName of the SPML requestID attribute.static java.lang.StringATTR_NAME_RESULT_ENTRIESName of the SPML resultEntries attribute.static java.lang.StringATTR_NAME_SEARCH_SCOPEName of the SPML scope attribute.static java.lang.StringATTR_NAME_SPML_OP_TYPEName of the SPML operation type attribute.static java.lang.StringATTR_NAME_SPML_OPERATIONName of the SPML operation attribute.static java.lang.StringATTR_NAME_STATUSName of the SPML status attribute.static java.lang.StringATTR_NAME_SUBSTRINGS_ANYName of the SPML filter.substrings.any attribute.static java.lang.StringATTR_NAME_SUBSTRINGS_FINALName of the SPML filter.substrings.final attribute.static java.lang.StringATTR_NAME_SUBSTRINGS_INITIALName of the SPML filter.substrings.initial attribute.static java.lang.StringATTR_NAME_SUBSTRINGS_NAMEName of the SPML filter.substrings.name attribute.static java.lang.StringATTR_NAME_TARGETIDName of the SPML targetID attribute.static java.lang.StringOP_TYPE_REQUESTRequesttype of the operation.static java.lang.StringOP_TYPE_RESPONSEResponsetype of the operation.static java.lang.StringOPERATION_ADDAddoperation.static java.lang.StringOPERATION_DELETEDeleteoperation.static java.lang.StringOPERATION_LOOKUPLookupoperation.static java.lang.StringOPERATION_MODIFYModifyoperation.static java.lang.StringOPERATION_SEARCHSearchoperation.static java.lang.StringPARAMETER_BINARY_ATTRIBUTESbinaryAttributesconfig parameter name.static java.lang.StringXML_ATTR_DNATTRName of the XML attribute holding the dnAttributes value.static java.lang.StringXML_ATTR_NAMEName of the XML attribute holding the name of the filter item.static java.lang.StringXML_ATTR_RULEName of the XML attribute holding the matchingRule value.static java.lang.StringXML_TAG_ANDName of the XML tag containing the and filter items.static java.lang.StringXML_TAG_ANYName of the XML tag containing the any filter items.static java.lang.StringXML_TAG_APPROXMATCHName of the XML tag containing the approxMatch filter items.static java.lang.StringXML_TAG_EQUALITYMATCHName of the XML tag containing the equalityMatch filter items.static java.lang.StringXML_TAG_EXTMATCHName of the XML tag containing the extensibleMatch filter items.static java.lang.StringXML_TAG_FINALName of the XML tag containing the final filter item.static java.lang.StringXML_TAG_GREATERName of the XML tag containing the greaterOrEqual filter items.static java.lang.StringXML_TAG_INITIALName of the XML tag containing the initial filter items.static java.lang.StringXML_TAG_LESSName of the XML tag containing the lessOrEqual filter items.static java.lang.StringXML_TAG_NOTName of the XML tag containing the not filter items.static java.lang.StringXML_TAG_ORName of the XML tag containing the or filter items.static java.lang.StringXML_TAG_PRESENTName of the XML tag containing the present filter items.static java.lang.StringXML_TAG_SUBSTRINGSName of the XML tag containing the substrings filter item.static java.lang.StringXML_TAG_VALUEName of the XML attribute holding the value of the filter item.-
Fields inherited from class com.ibm.di.parser.xml.XMLParser2
attrsDeclaration, charEncoding, coalescing, currentEntryAsXML, currentEntryAsXMLString, DEFAULT_ENCODING, DUMMY_ROOT_NAME, entryTag, firstWriteStart, indentOutput, nsMap, nsTracker, skipXMLOnReading, skipXMLOnWriting, standaloneRoot, valueTag, wrapUnwrapEntry, xmlVersion, xPath, xPathStr, xsdPath
-
Fields inherited from class com.ibm.di.parser.ParserImpl
_debug, myConfiguration
-
-
Constructor Summary
Constructors Constructor Description SPMLv2Parser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseParser()Closes the parservoidflush()Flushes the parser's outputstream or writerjava.lang.StringgetVersion()Version information.protected voidinitInput()Initializes the Input.protected voidinitOutput()Initializes the Output.voidinitParser()Initializes the ParserEntryreadEntry()Reads a request or response from a batch messagevoidwriteEntry(Entry aEntry)Writes down a request or response to a batch message-
Methods inherited from class com.ibm.di.parser.xml.XMLParser2
getCurrentEntryAsXMLStream, getCurrentEntryAsXMLString, getCurrentEntryPath, getLogger, getSchemaLocationFromXML, querySchema
-
Methods inherited from class com.ibm.di.parser.ParserImpl
debug, debugMode, getClassInstance, getContext, getDebug, getInputStream, getOutputStream, getParam, getParser, getReader, getWriter, isDeltaSupported, logmsg, registerScriptBeans, setConfiguration, setContext, setDebug, setInputStream, setInputStream, setInputStream, setOutputStream, setOutputStream, setParam, setParser
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.di.parser.ParserInterface
getContext, getDebug, getParam, getParser, getReader, getWriter, isDeltaSupported, registerScriptBeans, setConfiguration, setContext, setDebug, setInputStream, setInputStream, setInputStream, setOutputStream, setOutputStream, setParam, setParser
-
-
-
-
Field Detail
-
PARAMETER_BINARY_ATTRIBUTES
public static final java.lang.String PARAMETER_BINARY_ATTRIBUTES
binaryAttributesconfig parameter name.- See Also:
- Constant Field Values
-
ATTR_NAME_SPML_OP_TYPE
public static final java.lang.String ATTR_NAME_SPML_OP_TYPE
Name of the SPML operation type attribute.- See Also:
- Constant Field Values
-
OP_TYPE_REQUEST
public static final java.lang.String OP_TYPE_REQUEST
Requesttype of the operation.- See Also:
- Constant Field Values
-
OP_TYPE_RESPONSE
public static final java.lang.String OP_TYPE_RESPONSE
Responsetype of the operation.- See Also:
- Constant Field Values
-
ATTR_NAME_SPML_OPERATION
public static final java.lang.String ATTR_NAME_SPML_OPERATION
Name of the SPML operation attribute.- See Also:
- Constant Field Values
-
OPERATION_ADD
public static final java.lang.String OPERATION_ADD
Addoperation.- See Also:
- Constant Field Values
-
OPERATION_SEARCH
public static final java.lang.String OPERATION_SEARCH
Searchoperation.- See Also:
- Constant Field Values
-
OPERATION_MODIFY
public static final java.lang.String OPERATION_MODIFY
Modifyoperation.- See Also:
- Constant Field Values
-
OPERATION_DELETE
public static final java.lang.String OPERATION_DELETE
Deleteoperation.- See Also:
- Constant Field Values
-
OPERATION_LOOKUP
public static final java.lang.String OPERATION_LOOKUP
Lookupoperation.- See Also:
- Constant Field Values
-
ATTR_NAME_CONTAINERID
public static final java.lang.String ATTR_NAME_CONTAINERID
Name of the SPML containerID attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_CONTAINERID_TARGETID
public static final java.lang.String ATTR_NAME_CONTAINERID_TARGETID
Name of the SPML containerID.targetID attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_SEARCH_SCOPE
public static final java.lang.String ATTR_NAME_SEARCH_SCOPE
Name of the SPML scope attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_REQUESTID
public static final java.lang.String ATTR_NAME_REQUESTID
Name of the SPML requestID attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_TARGETID
public static final java.lang.String ATTR_NAME_TARGETID
Name of the SPML targetID attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_RESULT_ENTRIES
public static final java.lang.String ATTR_NAME_RESULT_ENTRIES
Name of the SPML resultEntries attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_PSOID
public static final java.lang.String ATTR_NAME_PSOID
Name of the SPML psoID attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_PSO_TARGETID
public static final java.lang.String ATTR_NAME_PSO_TARGETID
Name of the SPML pso.targetID attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_STATUS
public static final java.lang.String ATTR_NAME_STATUS
Name of the SPML status attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_ERROR_MESSAGES
public static final java.lang.String ATTR_NAME_ERROR_MESSAGES
Name of the SPML errorMessages attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_ERROR_CODE
public static final java.lang.String ATTR_NAME_ERROR_CODE
Name of the SPML errorCode attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_ATTR_DESCRIPTIONS
public static final java.lang.String ATTR_NAME_ATTR_DESCRIPTIONS
Name of the SPML attributeDescription attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_SUBSTRINGS_NAME
public static final java.lang.String ATTR_NAME_SUBSTRINGS_NAME
Name of the SPML filter.substrings.name attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_SUBSTRINGS_INITIAL
public static final java.lang.String ATTR_NAME_SUBSTRINGS_INITIAL
Name of the SPML filter.substrings.initial attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_SUBSTRINGS_ANY
public static final java.lang.String ATTR_NAME_SUBSTRINGS_ANY
Name of the SPML filter.substrings.any attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_SUBSTRINGS_FINAL
public static final java.lang.String ATTR_NAME_SUBSTRINGS_FINAL
Name of the SPML filter.substrings.final attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_FILTER
public static final java.lang.String ATTR_NAME_FILTER
Name of the SPML filter attribute.Note: this is a hierarchical attribute.
- See Also:
- Constant Field Values
-
XML_ATTR_NAME
public static final java.lang.String XML_ATTR_NAME
Name of the XML attribute holding the name of the filter item.- See Also:
- Constant Field Values
-
XML_ATTR_DNATTR
public static final java.lang.String XML_ATTR_DNATTR
Name of the XML attribute holding the dnAttributes value.- See Also:
- Constant Field Values
-
XML_ATTR_RULE
public static final java.lang.String XML_ATTR_RULE
Name of the XML attribute holding the matchingRule value.- See Also:
- Constant Field Values
-
XML_TAG_VALUE
public static final java.lang.String XML_TAG_VALUE
Name of the XML attribute holding the value of the filter item.- See Also:
- Constant Field Values
-
XML_TAG_SUBSTRINGS
public static final java.lang.String XML_TAG_SUBSTRINGS
Name of the XML tag containing the substrings filter item.- See Also:
- Constant Field Values
-
XML_TAG_FINAL
public static final java.lang.String XML_TAG_FINAL
Name of the XML tag containing the final filter item.- See Also:
- Constant Field Values
-
XML_TAG_INITIAL
public static final java.lang.String XML_TAG_INITIAL
Name of the XML tag containing the initial filter items.- See Also:
- Constant Field Values
-
XML_TAG_ANY
public static final java.lang.String XML_TAG_ANY
Name of the XML tag containing the any filter items.- See Also:
- Constant Field Values
-
XML_TAG_EQUALITYMATCH
public static final java.lang.String XML_TAG_EQUALITYMATCH
Name of the XML tag containing the equalityMatch filter items.- See Also:
- Constant Field Values
-
XML_TAG_PRESENT
public static final java.lang.String XML_TAG_PRESENT
Name of the XML tag containing the present filter items.- See Also:
- Constant Field Values
-
XML_TAG_GREATER
public static final java.lang.String XML_TAG_GREATER
Name of the XML tag containing the greaterOrEqual filter items.- See Also:
- Constant Field Values
-
XML_TAG_LESS
public static final java.lang.String XML_TAG_LESS
Name of the XML tag containing the lessOrEqual filter items.- See Also:
- Constant Field Values
-
XML_TAG_EXTMATCH
public static final java.lang.String XML_TAG_EXTMATCH
Name of the XML tag containing the extensibleMatch filter items.- See Also:
- Constant Field Values
-
XML_TAG_APPROXMATCH
public static final java.lang.String XML_TAG_APPROXMATCH
Name of the XML tag containing the approxMatch filter items.- See Also:
- Constant Field Values
-
XML_TAG_AND
public static final java.lang.String XML_TAG_AND
Name of the XML tag containing the and filter items.- See Also:
- Constant Field Values
-
XML_TAG_OR
public static final java.lang.String XML_TAG_OR
Name of the XML tag containing the or filter items.- See Also:
- Constant Field Values
-
XML_TAG_NOT
public static final java.lang.String XML_TAG_NOT
Name of the XML tag containing the not filter items.- See Also:
- Constant Field Values
-
-
Method Detail
-
initParser
public void initParser() throws java.lang.ExceptionInitializes the Parser- Specified by:
initParserin interfaceParserInterface- Overrides:
initParserin classXMLParser2- Throws:
java.lang.Exception- if the initialization fails
-
initInput
protected void initInput() throws java.lang.ExceptionInitializes the Input. Note: this parser relies on a Reader object to read the XML document.- Overrides:
initInputin classXMLParser2- Throws:
java.lang.Exception- - in case of a read error occurs.- See Also:
ParserImpl.setInputStream(java.io.Reader)
-
initOutput
protected void initOutput() throws java.lang.ExceptionInitializes the Output.- Overrides:
initOutputin classXMLParser2- Throws:
java.lang.Exception- - in case of write error occurs.
-
readEntry
public Entry readEntry() throws java.lang.Exception
Reads a request or response from a batch message- Specified by:
readEntryin interfaceParserInterface- Overrides:
readEntryin classXMLParser2- Returns:
- the SPML message as Entry.
- Throws:
java.lang.Exception- if the SPML could not be parsed correctly or any other error occurs.
-
writeEntry
public void writeEntry(Entry aEntry) throws java.lang.Exception
Writes down a request or response to a batch message- Specified by:
writeEntryin interfaceParserInterface- Overrides:
writeEntryin classXMLParser2- Parameters:
aEntry- TDI Entry that presents the request/response that is to be written to a batch message- Throws:
java.lang.Exception- if some attributes are missing.
-
getVersion
public java.lang.String getVersion()
Version information.- Specified by:
getVersionin interfaceVersionInfoInterface- Overrides:
getVersionin classXMLParser2- Returns:
- version information
-
closeParser
public void closeParser() throws java.lang.ExceptionCloses the parser- Specified by:
closeParserin interfaceParserInterface- Overrides:
closeParserin classXMLParser2- Throws:
java.lang.Exception- if an error occurs.
-
flush
public void flush()
Flushes the parser's outputstream or writer- Specified by:
flushin interfaceParserInterface- Overrides:
flushin classParserImpl
-
-