org.axonframework.serializer.bson
Class DBObjectHierarchicalStreamReader

java.lang.Object
  extended by org.axonframework.serializer.bson.DBObjectHierarchicalStreamReader
All Implemented Interfaces:
com.thoughtworks.xstream.converters.ErrorReporter, com.thoughtworks.xstream.io.HierarchicalStreamReader

public class DBObjectHierarchicalStreamReader
extends Object
implements com.thoughtworks.xstream.io.HierarchicalStreamReader

HierarchicalStreamReader implementation that reads from a Mongo DBObject structure that has been created using the DBObjectHierarchicalStreamWriter.

Since:
2.0
Author:
Allard Buijze

Constructor Summary
DBObjectHierarchicalStreamReader(com.mongodb.DBObject root)
          Initialize the reader to read the structure of the given root DBObject.
 
Method Summary
 void appendErrors(com.thoughtworks.xstream.converters.ErrorWriter errorWriter)
           
 void close()
           
 String getAttribute(int index)
           
 String getAttribute(String name)
           
 int getAttributeCount()
           
 String getAttributeName(int index)
           
 Iterator getAttributeNames()
           
 String getNodeName()
           
 String getValue()
           
 boolean hasMoreChildren()
           
 void moveDown()
           
 void moveUp()
           
 com.thoughtworks.xstream.io.HierarchicalStreamReader underlyingReader()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBObjectHierarchicalStreamReader

public DBObjectHierarchicalStreamReader(com.mongodb.DBObject root)
Initialize the reader to read the structure of the given root DBObject.

Parameters:
root - the root object containing the serialized structure
Method Detail

hasMoreChildren

public boolean hasMoreChildren()
Specified by:
hasMoreChildren in interface com.thoughtworks.xstream.io.HierarchicalStreamReader

moveDown

public void moveDown()
Specified by:
moveDown in interface com.thoughtworks.xstream.io.HierarchicalStreamReader

moveUp

public void moveUp()
Specified by:
moveUp in interface com.thoughtworks.xstream.io.HierarchicalStreamReader

getNodeName

public String getNodeName()
Specified by:
getNodeName in interface com.thoughtworks.xstream.io.HierarchicalStreamReader

getValue

public String getValue()
Specified by:
getValue in interface com.thoughtworks.xstream.io.HierarchicalStreamReader

getAttribute

public String getAttribute(String name)
Specified by:
getAttribute in interface com.thoughtworks.xstream.io.HierarchicalStreamReader

getAttribute

public String getAttribute(int index)
Specified by:
getAttribute in interface com.thoughtworks.xstream.io.HierarchicalStreamReader

getAttributeCount

public int getAttributeCount()
Specified by:
getAttributeCount in interface com.thoughtworks.xstream.io.HierarchicalStreamReader

getAttributeName

public String getAttributeName(int index)
Specified by:
getAttributeName in interface com.thoughtworks.xstream.io.HierarchicalStreamReader

getAttributeNames

public Iterator getAttributeNames()
Specified by:
getAttributeNames in interface com.thoughtworks.xstream.io.HierarchicalStreamReader

appendErrors

public void appendErrors(com.thoughtworks.xstream.converters.ErrorWriter errorWriter)
Specified by:
appendErrors in interface com.thoughtworks.xstream.converters.ErrorReporter
Specified by:
appendErrors in interface com.thoughtworks.xstream.io.HierarchicalStreamReader

close

public void close()
Specified by:
close in interface com.thoughtworks.xstream.io.HierarchicalStreamReader

underlyingReader

public com.thoughtworks.xstream.io.HierarchicalStreamReader underlyingReader()
Specified by:
underlyingReader in interface com.thoughtworks.xstream.io.HierarchicalStreamReader


Copyright © 2010-2016. All Rights Reserved.