public class Manifest extends JsonSimple
Represents a JSON manifest as used in other parts of the application. Provides methods to simplify common manipulations of the manifest.
| Constructor and Description |
|---|
Manifest(InputStream jsonIn)
Creates Manifest object from the provided input stream
|
Manifest(JsonObject newJsonObject)
Wrap a JsonObject in this class
|
Manifest(String jsonString)
Creates Manifest object from the provided string
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addTopNode(String id,
String title)
Add a new child node to the top level.
|
boolean |
delete(String id) |
String |
getDescription()
Get the description for this manifest
|
ManifestNode |
getNode(String key)
Get the requested node from the manifest.
|
String |
getTitle()
Get the title for this manifest
|
List<ManifestNode> |
getTopNodes()
Get the requested node from the manifest.
|
String |
getType()
Get the type of this manifest
|
String |
getViewId()
Get the 'viewId' node for this manifest
|
boolean |
move(String id,
String destination) |
boolean |
moveAfter(String id,
String destination) |
boolean |
moveBefore(String id,
String destination) |
void |
setDescription(String description)
Set the description for this manifest
|
void |
setTitle(String title)
Set the title for this manifest
|
void |
setType(String type)
Set the type of this manifest
|
void |
setViewId(String viewId)
Set the 'viewId' node for this manifest
|
int |
size()
Return the total number of nodes in this manifest.
|
fromJavaMap, getArray, getBoolean, getInteger, getJsonArray, getJsonObject, getJsonSimpleList, getJsonSimpleMap, getObject, getPath, getString, getStringList, getStringList, getStringList, search, setPropertySubstitution, toJavaList, toJavaMap, toString, toString, writeArray, writeObjectpublic Manifest(JsonObject newJsonObject)
newJsonObject - : The JsonObject to wrappublic Manifest(InputStream jsonIn) throws IOException
jsonIn - : The input stream to readIOException - if there was an error during creationpublic Manifest(String jsonString) throws IOException
jsonString - : The JSON in string formIOException - if there was an error during creationpublic int size()
public ManifestNode getNode(String key)
id - : The node key to retrievepublic boolean addTopNode(String id, String title)
id - : The ID value to put in this node.title - : The title value to put in this node.public List<ManifestNode> getTopNodes()
id - : The node key to retrievepublic boolean delete(String id)
public String getDescription()
public void setDescription(String description)
description - : The new descriptionpublic String getTitle()
public void setTitle(String title)
title - : The new titlepublic String getType()
public void setType(String type)
type - : The new typepublic String getViewId()
public void setViewId(String viewId)
viewId - : The new viewIdCopyright © 2009-2013. All Rights Reserved.