org.apache.tuscany.sdo.util.resource
Class DataObjectXMLStreamReader

java.lang.Object
  extended by org.apache.tuscany.sdo.util.resource.DataObjectXMLStreamReader

public class DataObjectXMLStreamReader
extends Object


Nested Class Summary
protected  class DataObjectXMLStreamReader.NameSpaceContext
           
protected static class DataObjectXMLStreamReader.NameValuePair
           
protected static class DataObjectXMLStreamReader.SimpleElementStreamReader
           
 
Field Summary
static String ELEMENT_TEXT
           
 
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
 
Constructor Summary
  DataObjectXMLStreamReader(DataObject dataObject, String rootElmentURI, String rootElementName)
           
  DataObjectXMLStreamReader(DataObject dataObject, String rootElmentURI, String rootElementName, TypeHelper typeHelper)
           
  DataObjectXMLStreamReader(DataObject dataObject, String rootElmentURI, String rootElementName, TypeHelper typeHelper, XSDHelper xsdHelper)
           
  DataObjectXMLStreamReader(Property rootElement, DataObject dataObject, TypeHelper typeHelper, XSDHelper xsdHelper)
           
protected DataObjectXMLStreamReader(javax.xml.namespace.QName elementQName, Map.Entry[] properties, Map.Entry[] attributes)
           
protected DataObjectXMLStreamReader(TypeHelper typeHelper, XSDHelper xsdHelper, Property rootElement, DataObject dataObject)
           
protected DataObjectXMLStreamReader(TypeHelper typeHelper, XSDHelper xsdHelper, Property rootElement, DataObject dataObject, DataObject serializeRoot)
           
  DataObjectXMLStreamReader(XMLDocument document, TypeHelper typeHelper)
           
 
Method Summary
 void close()
           
 int getAttributeCount()
           
 String getAttributeLocalName(int i)
           
 javax.xml.namespace.QName getAttributeName(int i)
           
 String getAttributeNamespace(int i)
           
 String getAttributePrefix(int i)
           
 String getAttributeType(int i)
           
 String getAttributeValue(int i)
           
 String getAttributeValue(String nsUri, String localName)
           
 String getCharacterEncodingScheme()
           
 DataObject getDataObject()
           
 String getElementText()
          todo implement the right contract for this
 String getEncoding()
           
 int getEventType()
           
 String getLocalName()
           
 javax.xml.stream.Location getLocation()
           
 javax.xml.namespace.QName getName()
           
 javax.xml.namespace.NamespaceContext getNamespaceContext()
           
 int getNamespaceCount()
           
 String getNamespacePrefix(int i)
           
 String getNamespaceURI()
           
 String getNamespaceURI(int i)
           
 String getNamespaceURI(String prefix)
           
 String getPIData()
           
 String getPITarget()
           
 String getPrefix()
           
 Object getProperty(String key)
           
 String getText()
           
 char[] getTextCharacters()
           
 int getTextCharacters(int i, char[] chars, int i1, int i2)
           
 int getTextLength()
           
 int getTextStart()
           
 String getVersion()
           
 boolean hasName()
           
 boolean hasNext()
           
 boolean hasText()
          check the validity of this implementation
 void init()
          we need to split out the calling to the populate namespaces seperately since this needs to be done *after* setting the parent namespace context.
 boolean isAttributeSpecified(int i)
           
 boolean isCharacters()
           
 boolean isEndElement()
           
 boolean isEndOfFragment()
          are we done ?
 boolean isStandalone()
           
 boolean isStartElement()
           
 boolean isWhiteSpace()
           
 int next()
           
 int nextTag()
          todo implement this
 void populateProperties()
           
 void require(int i, String string, String string1)
           
 boolean standaloneSet()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENT_TEXT

public static final String ELEMENT_TEXT
See Also:
Constant Field Values
Constructor Detail

DataObjectXMLStreamReader

public DataObjectXMLStreamReader(DataObject dataObject,
                                 String rootElmentURI,
                                 String rootElementName)

DataObjectXMLStreamReader

public DataObjectXMLStreamReader(DataObject dataObject,
                                 String rootElmentURI,
                                 String rootElementName,
                                 TypeHelper typeHelper)

DataObjectXMLStreamReader

public DataObjectXMLStreamReader(DataObject dataObject,
                                 String rootElmentURI,
                                 String rootElementName,
                                 TypeHelper typeHelper,
                                 XSDHelper xsdHelper)

DataObjectXMLStreamReader

protected DataObjectXMLStreamReader(TypeHelper typeHelper,
                                    XSDHelper xsdHelper,
                                    Property rootElement,
                                    DataObject dataObject)

DataObjectXMLStreamReader

protected DataObjectXMLStreamReader(TypeHelper typeHelper,
                                    XSDHelper xsdHelper,
                                    Property rootElement,
                                    DataObject dataObject,
                                    DataObject serializeRoot)

DataObjectXMLStreamReader

public DataObjectXMLStreamReader(Property rootElement,
                                 DataObject dataObject,
                                 TypeHelper typeHelper,
                                 XSDHelper xsdHelper)

DataObjectXMLStreamReader

public DataObjectXMLStreamReader(XMLDocument document,
                                 TypeHelper typeHelper)

DataObjectXMLStreamReader

protected DataObjectXMLStreamReader(javax.xml.namespace.QName elementQName,
                                    Map.Entry[] properties,
                                    Map.Entry[] attributes)
Method Detail

populateProperties

public void populateProperties()

getDataObject

public DataObject getDataObject()

init

public void init()
we need to split out the calling to the populate namespaces seperately since this needs to be done *after* setting the parent namespace context. We cannot assume it will happen at construction!


getProperty

public Object getProperty(String key)
                   throws IllegalArgumentException
Parameters:
key -
Returns:
Throws:
IllegalArgumentException

next

public int next()
         throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

require

public void require(int i,
                    String string,
                    String string1)
             throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

getElementText

public String getElementText()
                      throws javax.xml.stream.XMLStreamException
todo implement the right contract for this

Returns:
Throws:
javax.xml.stream.XMLStreamException

nextTag

public int nextTag()
            throws javax.xml.stream.XMLStreamException
todo implement this

Returns:
Throws:
javax.xml.stream.XMLStreamException

hasNext

public boolean hasNext()
                throws javax.xml.stream.XMLStreamException
Returns:
Throws:
javax.xml.stream.XMLStreamException

close

public void close()
           throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

getNamespaceURI

public String getNamespaceURI(String prefix)

isStartElement

public boolean isStartElement()

isEndElement

public boolean isEndElement()

isCharacters

public boolean isCharacters()

isWhiteSpace

public boolean isWhiteSpace()

getAttributeValue

public String getAttributeValue(String nsUri,
                                String localName)

getAttributeCount

public int getAttributeCount()

getAttributeName

public javax.xml.namespace.QName getAttributeName(int i)
Parameters:
i -
Returns:

getAttributeNamespace

public String getAttributeNamespace(int i)

getAttributeLocalName

public String getAttributeLocalName(int i)

getAttributePrefix

public String getAttributePrefix(int i)

getAttributeType

public String getAttributeType(int i)

getAttributeValue

public String getAttributeValue(int i)

isAttributeSpecified

public boolean isAttributeSpecified(int i)

getNamespaceCount

public int getNamespaceCount()

getNamespacePrefix

public String getNamespacePrefix(int i)
Parameters:
i -
Returns:

getNamespaceURI

public String getNamespaceURI(int i)

getNamespaceContext

public javax.xml.namespace.NamespaceContext getNamespaceContext()

getEventType

public int getEventType()

getText

public String getText()

getTextCharacters

public char[] getTextCharacters()

getTextCharacters

public int getTextCharacters(int i,
                             char[] chars,
                             int i1,
                             int i2)
                      throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

getTextStart

public int getTextStart()

getTextLength

public int getTextLength()

getEncoding

public String getEncoding()

hasText

public boolean hasText()
check the validity of this implementation

Returns:

getLocation

public javax.xml.stream.Location getLocation()
Returns:

getName

public javax.xml.namespace.QName getName()

getLocalName

public String getLocalName()

hasName

public boolean hasName()

getNamespaceURI

public String getNamespaceURI()

getPrefix

public String getPrefix()

getVersion

public String getVersion()

isStandalone

public boolean isStandalone()

standaloneSet

public boolean standaloneSet()

getCharacterEncodingScheme

public String getCharacterEncodingScheme()

getPITarget

public String getPITarget()

getPIData

public String getPIData()

isEndOfFragment

public boolean isEndOfFragment()
are we done ?

Returns:


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.