public class ManifestNode extends JsonSimple
Represents a node in a JSON manifest. This object wraps the JSON interface (but does not extend it) with supplemental data to aid navigation.
| Constructor and Description |
|---|
ManifestNode()
Create a new empty node
|
ManifestNode(JsonObject newJsonObject)
Wrap a JsonObject in this class
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addChild(String id,
String title)
Add a new child node to this node.
|
List<ManifestNode> |
getChildren()
Return a list of children for this node.
|
boolean |
getHidden()
Get the hidden flag for this node.
|
String |
getId()
Get the ID for this node.
|
String |
getKey()
Get the key of this node.
|
String |
getParentKey()
Get the key of the parent node to this node.
|
String |
getTitle()
Get the title for this node.
|
boolean |
hasChildren()
Check if this node has any children.
|
void |
setHidden(boolean hidden)
Set the hidden flag for this node.
|
void |
setId(String id)
Set the ID for this node.
|
void |
setKey(String newKey)
Set the key of this node.
|
void |
setParentKey(String newParent)
Set the key of the parent node to this node.
|
void |
setTitle(String title)
Set the title for this node.
|
fromJavaMap, getArray, getBoolean, getInteger, getJsonArray, getJsonObject, getJsonSimpleList, getJsonSimpleMap, getObject, getPath, getString, getStringList, getStringList, getStringList, search, setPropertySubstitution, toJavaList, toJavaMap, toString, toString, writeArray, writeObjectpublic ManifestNode()
public ManifestNode(JsonObject newJsonObject)
newJsonObject - : The JsonObject to wrappublic String getKey()
public void setKey(String newKey)
newKey - : The new keypublic String getParentKey()
public void setParentKey(String newParent)
newParent - : The parent node key, null if this is a top level nodepublic boolean addChild(String id, String title)
id - : The ID value to put in this node.title - : The title value to put in this node.public boolean hasChildren()
public List<ManifestNode> getChildren()
public boolean getHidden()
public void setHidden(boolean hidden)
hidden - : The new flagpublic String getId()
public void setId(String id)
id - : The new IDpublic String getTitle()
public void setTitle(String title)
title - : The new titleCopyright © 2009-2013. All Rights Reserved.