oracle.ifs.beans.parsers
Class SimpleXmlParser


java.lang.Object

  |

  +--oracle.ifs.beans.parsers.XmlParser

        |

        +--oracle.ifs.beans.parsers.SimpleXmlParser

All Implemented Interfaces:
Parser

public class SimpleXmlParser
extends XmlParser

This class is deprecated. Use oracle.ifs.beans.parsers.IfsXmlParser.

The SimpleXmlParser creates LibraryObjects by traversing the DOM tree.

The parser defines a simple mapping between XML tags and iFS objects.

The parser is the reverse of the SimpleXmlRenderer. Output from the SimpleXmlRenderer can be run through the SimpleXmlParser to re-create the relevant objects.


Field Summary
static java.lang.String IGNORE_UNSETTABLE_OPTION
          Deprecated. use oracle.ifs.beans.parsers.IfsXmlParser
 
Fields inherited from interface oracle.ifs.beans.parsers.Parser
CURRENT_NAME_OPTION, CURRENT_PATH_OPTION, DOCUMENT_CHARSET_OPTION, DOCUMENT_LANGUAGE_OPTION, UPDATE_OBJECT_OPTION, VALIDATE_DOCUMENT_OPTION
 
Constructor Summary
SimpleXmlParser(LibrarySession ls)
          Deprecated. use oracle.ifs.beans.parsers.IfsXmlParser
 
Method Summary
protected  LibraryObject traverseTree(oracle.xml.parser.v2.XMLDocument doc, ParserCallback callback, java.util.Hashtable options)
          Deprecated. use oracle.ifs.beans.parsers.IfsXmlParser
 
Methods inherited from class oracle.ifs.beans.parsers.XmlParser
parse, parse
 

Field Detail


IGNORE_UNSETTABLE_OPTION


public static final java.lang.String IGNORE_UNSETTABLE_OPTION
Deprecated. use oracle.ifs.beans.parsers.IfsXmlParser

If set to true in options table, parser will ignore all attributes in the XML document which are marked as "unsettable".
Constructor Detail

SimpleXmlParser


public SimpleXmlParser(LibrarySession ls)
Deprecated. use oracle.ifs.beans.parsers.IfsXmlParser

Constructs a SimpleXmlParser
Parameters:
ls - the LibrarySession
Method Detail

traverseTree


protected LibraryObject traverseTree(oracle.xml.parser.v2.XMLDocument doc,
                                     ParserCallback callback,
                                     java.util.Hashtable options)
                              throws IfsException
Deprecated. use oracle.ifs.beans.parsers.IfsXmlParser

Traverses the DOM tree and creates LibraryObjects. The creation of LOs is transactional. That is either all LOs will be created or none will. There is an exception to this rule. Creating certain LOs casues a database commit. When this occurs a transaction can no longer be aborted. What this means for traverseTree is once one of these objects is created then all the objects created before that object in the transaction will also be committed. Now, if later in the transaction creating an object fails the transaction can't be aborted. Forcing the transaction to be commited. Meaning all objects up to the failure will exist. The XML source may no longer be valid considering at least one object in the source already exists. LibraryObjects that cause commits currently are DirectoryUser and ClassObject. The javadoc should be consulted for up-to-date information about a particular LO.
Overrides:
traverseTree in class XmlParser
Parameters:
doc - the XMLDocument (DOM tree) to traverse
callback - the ParserCallback to call when creating objects
options - the Hashtable containing options for this parser
Returns:
The primary object created. If there is only one top level object then this is returned. If no object is "primary" then null is returned.
Throws:
IfsException - if the operation fails