|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ozoneDB.core.xml.XML2ObjectContentHandler
This class handles the XML and transform it into an Object.
Field Summary | |
protected XML2ObjectContentHandler |
CH
CH (ContentHandler) is for handling a special part of the XML in a special ContentHandler. |
static boolean |
debug
|
protected XML2ObjectDelegate |
delegate
|
protected org.xml.sax.Locator |
locator
|
protected static java.util.Hashtable |
objCache
Cache for the ref-elements. |
protected java.util.Stack |
stack
All objs, members, values etc are saved in this stack. |
Fields inherited from interface org.ozoneDB.core.xml.Consts |
ATTR_ID, ATTR_NAME, ATTR_PROXY_TYPE, ATTR_REF, ATTR_TYPE, ATTR_XLINK_HREF_LOCAL, ATTR_XLINK_HREF_RAW, ATTR_XLINK_NAMESPACE, ATTR_XLINK_TYPE_LOCAL, ATTR_XLINK_TYPE_RAW, ATTR_XLINK_TYPE_VALUE, REMOTE_ID, TAG_MEMBER, TAG_OBJ, TAG_SUPERCLASS, TAG_VALUE, TAG_VALUEARRAY, TAG_VALUEOBJ |
Constructor Summary | |
XML2ObjectContentHandler()
|
|
XML2ObjectContentHandler(XML2ObjectDelegate delegate)
|
Method Summary | |
protected java.lang.Object |
castValue(java.lang.String type,
java.lang.String valueString)
The method castValues casts the valueString into the real type. |
void |
characters(char[] ch,
int start,
int end)
The method characters handles the text-elements. |
void |
endDocument()
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName)
The method endElement handles all endElements. |
void |
endPrefixMapping(java.lang.String prefix)
|
protected void |
handleMemberEndElement()
The method handleMemberEndElement gets the finished MemberElement and the value from the stack and put it in the object. |
protected void |
handleMemberStartElement(org.xml.sax.Attributes atts)
The method handleMemberStartElement creates a MemberElement and put it the stack. |
protected void |
handleObjEndElement()
The method handleObjEndElement gets the finished Object from the stack. |
protected void |
handleObjStartElement(org.xml.sax.Attributes atts)
The method handleObjStartElement creates a new object and put it in the stack. |
protected void |
handleOzoneProxyMember(org.xml.sax.Attributes atts)
This methode handles an OzoneProxy member. |
protected void |
handleSuperclassEndElement()
The method handleSuperclassEndElement pop the superclass in the stack. |
protected void |
handleSuperclassStartElement(org.xml.sax.Attributes atts)
The method handleSuperclassStartElement creates a SuperclassElement and put into the stack. |
protected void |
handleValueArrayEndElement()
The method handleValueArrayEndElement joins the values to an array. |
protected void |
handleValueArrayStartElement(org.xml.sax.Attributes atts)
The method handleValueArrayStartElement creates a ValueArrayElement and put it in the stack. |
protected void |
handleValueEndElement()
The method handleValueEndElement gets the ValueElement from the stack. |
protected void |
handleValueObjEndElement()
|
protected void |
handleValueObjStartElement(org.xml.sax.Attributes atts)
The method handleValueObjStartElement creates a ValueObjElement and put it in the stack. |
void |
handleValues(char[] ch,
int start,
int end)
The method handleValues gets the ValueElement from the stack. |
protected void |
handleValueStartElement(org.xml.sax.Attributes atts)
The method handleValueStartElement creates a ValueElement and put it the stack. |
void |
ignorableWhitespace(char[] ch,
int start,
int end)
|
protected void |
memberEndElement()
The method memberEndElement refers to handleMemberEndElement. |
protected void |
memberStartElement(org.xml.sax.Attributes atts)
The method memberStartElement refers to handleMemberStartElement. |
protected void |
objEndElement()
The method objEndElement refers to handleObjEndElement. |
protected void |
objStartElement(org.xml.sax.Attributes atts)
The method objStartElement refers to handleObjStartElement. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
The method setDocumentLocator sets the locator. |
protected void |
showStack(java.util.Stack s)
|
void |
skippedEntity(java.lang.String name)
|
void |
startDocument()
Start Document parsing. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes atts)
The method startElement handels all startElements. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
|
protected void |
superclassEndElement()
The method superclassEndElement refers to handleSuperclassEndElement. |
protected void |
superclassStartElement(org.xml.sax.Attributes atts)
The method superclassStartElement refers to handleSuperclassStartElement. |
protected void |
valueArrayEndElement()
The method valueArrayEndElement refers to handleValueArrayEndElement. |
protected void |
valueArrayStartElement(org.xml.sax.Attributes atts)
The method valueArrayStartElement refers to handleValueArrayStartElement. |
protected void |
valueEndElement()
The method valueEndElement refers to handleValueEndElement. |
protected void |
valueObjEndElement()
The method valueObjEndElement refers to handleValueObjEndElement. |
protected void |
valueObjStartElement(org.xml.sax.Attributes atts)
The method valueObjStartElement refers to handleValueObjStartElement. |
protected void |
values(char[] ch,
int start,
int end)
The method values refers to handleValues. |
protected void |
valueStartElement(org.xml.sax.Attributes atts)
The method valueStartElement refers to handleValueStartElement. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean debug
protected org.xml.sax.Locator locator
protected static java.util.Hashtable objCache
protected java.util.Stack stack
protected XML2ObjectContentHandler CH
protected XML2ObjectDelegate delegate
Constructor Detail |
public XML2ObjectContentHandler()
public XML2ObjectContentHandler(XML2ObjectDelegate delegate)
Method Detail |
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
locator
- public void startDocument()
startDocument
in interface org.xml.sax.ContentHandler
public void endDocument()
endDocument
in interface org.xml.sax.ContentHandler
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String rawName, org.xml.sax.Attributes atts)
startElement
in interface org.xml.sax.ContentHandler
namespaceURI
- localName
- rawName
- (the tagname)atts
- (the attributes of the tag)public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String rawName)
endElement
in interface org.xml.sax.ContentHandler
namespaceURI
- localName
- rawName
- (the tagname)public void characters(char[] ch, int start, int end)
characters
in interface org.xml.sax.ContentHandler
ch
- (char-array)start
- (start of the array)end
- (end of the array)public void processingInstruction(java.lang.String target, java.lang.String data)
processingInstruction
in interface org.xml.sax.ContentHandler
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
startPrefixMapping
in interface org.xml.sax.ContentHandler
public void endPrefixMapping(java.lang.String prefix)
endPrefixMapping
in interface org.xml.sax.ContentHandler
public void ignorableWhitespace(char[] ch, int start, int end)
ignorableWhitespace
in interface org.xml.sax.ContentHandler
public void skippedEntity(java.lang.String name)
skippedEntity
in interface org.xml.sax.ContentHandler
protected void objStartElement(org.xml.sax.Attributes atts)
atts
- (the attributes)protected void memberStartElement(org.xml.sax.Attributes atts)
atts
- (the attributes)protected void valueStartElement(org.xml.sax.Attributes atts)
atts
- (the attributes)protected void valueObjStartElement(org.xml.sax.Attributes atts)
atts
- (the attributes)protected void valueArrayStartElement(org.xml.sax.Attributes atts)
atts
- (the attributes)protected void superclassStartElement(org.xml.sax.Attributes atts)
atts
- (the attributes)protected void values(char[] ch, int start, int end)
ch
- (char-array)start
- (start of the array)end
- (end of the array)protected void objEndElement()
protected void memberEndElement()
protected void valueEndElement()
protected void valueObjEndElement()
protected void valueArrayEndElement()
protected void superclassEndElement()
protected void handleObjStartElement(org.xml.sax.Attributes atts)
atts
- (the attributes)protected void handleObjEndElement()
protected void handleOzoneProxyMember(org.xml.sax.Attributes atts)
atts
- protected void handleMemberStartElement(org.xml.sax.Attributes atts)
atts
- (the attributes)protected void handleMemberEndElement()
protected void handleValueStartElement(org.xml.sax.Attributes atts)
atts
- (the attributes)public void handleValues(char[] ch, int start, int end)
ch
- (char-array)start
- (start of the array)end
- (end of the array)protected void handleValueEndElement()
protected java.lang.Object castValue(java.lang.String type, java.lang.String valueString)
type
- (the type)valueString
- (start of the array)protected void handleValueObjStartElement(org.xml.sax.Attributes atts)
atts
- (the attributes)protected void handleValueObjEndElement()
protected void handleValueArrayStartElement(org.xml.sax.Attributes atts)
atts
- (the attributes)protected void handleValueArrayEndElement()
protected void handleSuperclassStartElement(org.xml.sax.Attributes atts)
atts
- (the attributes)protected void handleSuperclassEndElement()
protected void showStack(java.util.Stack s)
|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |