Package repast.simphony.integration
Interface OutputBuilder<X,Y>
- All Superinterfaces:
Queryable
- All Known Implementing Classes:
BeanBuilder
,JDOMBuilder
Interface representing a type that builds the "output" data read in from a Reader.
Implementations of this interface are assumed to be dealing with some sort of hierarchical data
and will write to the location they are currently set at. The location is set with the
goRoot()
, goUp()
, and createAndGoInto(String)
methods.
Initialize must be called before using an OutputBuilder
.- Author:
- Jerry Vos
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateAndGoInto
(String name) Enters into the sub-tree with the specified name, creating the tree (or any values in it) if needed.void
detach()
Detaches the current tree and goes up a level.void
Detaches the specified objects.Retrieves the object (or tree) that has been built with this outputter.void
goRoot()
Goes to the root in the hierarchy.void
goUp()
Goes up a level in the hierarchy.void
Initializes the writer for writing.writeValue
(String name, Object value) Writes the specifed value using the specified name.Methods inherited from interface repast.simphony.integration.Queryable
getRoot, getValue, selectNode, selectNode, selectNodes, selectNodes
-
Method Details
-
initialize
void initialize()Initializes the writer for writing. -
createAndGoInto
Enters into the sub-tree with the specified name, creating the tree (or any values in it) if needed.- Parameters:
name
- the name of the tree- Returns:
- a detachable object
- See Also:
-
goUp
void goUp()Goes up a level in the hierarchy. -
goRoot
void goRoot()Goes to the root in the hierarchy. -
writeValue
Writes the specifed value using the specified name. What this means is implementation dependent.- Parameters:
name
- the name to write the value undervalue
- the value to write- Returns:
- a detachable object
-
getWrittenObject
Y getWrittenObject()Retrieves the object (or tree) that has been built with this outputter. This corresponds to the root of the tree, not the current branch.- Returns:
- the object that is a result of the previous writes
-
detach
void detach()Detaches the current tree and goes up a level. -
detach
Detaches the specified objects. These should be return values from thewriteValue(String, Object)
orcreateAndGoInto(java.lang.String)
methods.- Parameters:
objsToDetach
- the objects to detach
-