|
|||||||||
| Home >> All >> com >> aendvari >> common >> [ model overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.aendvari.common.model
Class ModelUtil

java.lang.Objectcom.aendvari.common.model.ModelUtil
- public class ModelUtil
- extends java.lang.Object
Provides various utility methods for the model classes.
| Constructor Summary | |
ModelUtil()
|
|
| Method Summary | |
static void |
clearNodes(ModelNode baseNode)
Sets the values of the supplied node and all of its children to an empty string. |
protected static void |
examineNode(ModelNode modelNode,
java.io.Writer output,
java.lang.String indent)
Outputs a single ModelNode, then recursively examines children. |
static void |
modelToOsm(ModelNode sourceNode,
com.aendvari.common.osm.OsmNode destinationNode,
java.lang.String destinationExpression,
boolean createNodes)
Copies data from the ModelNode into the specified location of the supplied OSM. |
static void |
osmToModel(com.aendvari.common.osm.OsmNode sourceNode,
java.lang.String sourceExpression,
ModelNode destinationNode,
boolean createNodes)
Copies data from the specified location in the supplied OSM to the destination ModelNode. |
static void |
removeAllChildren(ModelNode modelNode)
Removes all children of the supplied node. |
static void |
removeAllChildren(ModelNode modelNode,
java.lang.String selectExpression)
Removes all children of the selected node. |
static void |
removeNamedChildren(ModelNode modelNode,
java.lang.String childName)
Removes the children having the specified name from the supplied node. |
protected static void |
updateNode(ModelTree destinationTree,
ModelNode sourceNode,
ModelNode destinationParent,
boolean createNodes)
Updates the value of the supplied node. |
static void |
updateNodes(ModelNode sourceNode,
java.lang.String sourceExpression,
ModelNode destinationNode,
java.lang.String destinationExpression,
boolean createNodes)
Updates the children of the specified ModelNode using the values stored within other ModelNodes. |
static java.lang.String |
writeNode(ModelNode modelNode)
Writes the supplied ModelNode and its children to a string. |
static void |
writeNode(ModelNode modelNode,
java.io.Writer output)
Writes the supplied ModelNode and its children to output. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
ModelUtil
public ModelUtil()
| Method Detail |
updateNodes
public static void updateNodes(ModelNode sourceNode, java.lang.String sourceExpression, ModelNode destinationNode, java.lang.String destinationExpression, boolean createNodes)
- Updates the children of the specified ModelNode using the
values stored within other ModelNodes.
updateNode
protected static void updateNode(ModelTree destinationTree, ModelNode sourceNode, ModelNode destinationParent, boolean createNodes)
- Updates the value of the supplied node. Each child node is then recursively
updated.
clearNodes
public static void clearNodes(ModelNode baseNode)
- Sets the values of the supplied node and all of its children to an
empty string. Each child is then recursively visited and cleared.
removeNamedChildren
public static void removeNamedChildren(ModelNode modelNode, java.lang.String childName)
- Removes the children having the specified name from the supplied node.
removeAllChildren
public static void removeAllChildren(ModelNode modelNode)
- Removes all children of the supplied node.
removeAllChildren
public static void removeAllChildren(ModelNode modelNode, java.lang.String selectExpression)
- Removes all children of the selected node.
osmToModel
public static void osmToModel(com.aendvari.common.osm.OsmNode sourceNode, java.lang.String sourceExpression, ModelNode destinationNode, boolean createNodes)
modelToOsm
public static void modelToOsm(ModelNode sourceNode, com.aendvari.common.osm.OsmNode destinationNode, java.lang.String destinationExpression, boolean createNodes)
writeNode
public static java.lang.String writeNode(ModelNode modelNode)
- Writes the supplied ModelNode and its children to a string.
writeNode
public static void writeNode(ModelNode modelNode, java.io.Writer output) throws java.io.IOException
- Writes the supplied ModelNode and its children to output.
examineNode
protected static void examineNode(ModelNode modelNode, java.io.Writer output, java.lang.String indent) throws java.io.IOException
- Outputs a single ModelNode, then recursively examines children.
|
|||||||||
| Home >> All >> com >> aendvari >> common >> [ model overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.aendvari.common.model.ModelUtil