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(java.io.InputStream jsonIn)
Creates Manifest object from the provided input stream
|
Manifest(JsonObject newJsonObject)
Wrap a JsonObject in this class
|
Manifest(java.lang.String jsonString)
Creates Manifest object from the provided string
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addTopNode(java.lang.String id,
java.lang.String title)
Add a new child node to the top level.
|
boolean |
delete(java.lang.String id) |
java.lang.String |
getDescription()
Get the description for this manifest
|
ManifestNode |
getNode(java.lang.String key)
Get the requested node from the manifest.
|
java.lang.String |
getTitle()
Get the title for this manifest
|
java.util.List<ManifestNode> |
getTopNodes()
Get the requested node from the manifest.
|
java.lang.String |
getType()
Get the type of this manifest
|
java.lang.String |
getViewId()
Get the 'viewId' node for this manifest
|
boolean |
move(java.lang.String id,
java.lang.String destination) |
boolean |
moveAfter(java.lang.String id,
java.lang.String destination) |
boolean |
moveBefore(java.lang.String id,
java.lang.String destination) |
void |
setDescription(java.lang.String description)
Set the description for this manifest
|
void |
setTitle(java.lang.String title)
Set the title for this manifest
|
void |
setType(java.lang.String type)
Set the type of this manifest
|
void |
setViewId(java.lang.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(java.io.InputStream jsonIn)
throws java.io.IOException
jsonIn - : The input stream to readjava.io.IOException - if there was an error during creationpublic Manifest(java.lang.String jsonString)
throws java.io.IOException
jsonString - : The JSON in string formjava.io.IOException - if there was an error during creationpublic int size()
public ManifestNode getNode(java.lang.String key)
id - : The node key to retrievepublic boolean addTopNode(java.lang.String id,
java.lang.String title)
id - : The ID value to put in this node.title - : The title value to put in this node.public java.util.List<ManifestNode> getTopNodes()
id - : The node key to retrievepublic boolean move(java.lang.String id,
java.lang.String destination)
public boolean moveAfter(java.lang.String id,
java.lang.String destination)
public boolean moveBefore(java.lang.String id,
java.lang.String destination)
public boolean delete(java.lang.String id)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description - : The new descriptionpublic java.lang.String getTitle()
public void setTitle(java.lang.String title)
title - : The new titlepublic java.lang.String getType()
public void setType(java.lang.String type)
type - : The new typepublic java.lang.String getViewId()
public void setViewId(java.lang.String viewId)
viewId - : The new viewIdCopyright © 2009-2019. All Rights Reserved.