ModeShape Distribution 3.2.0.Final

org.modeshape.web.jcr.rest.client.json
Class JsonNode

java.lang.Object
  extended by org.codehaus.jettison.json.JSONObject
      extended by org.modeshape.web.jcr.rest.client.json.JsonNode
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FileNode, FolderNode, NodeTypeNode, RepositoryNode, ServerNode, WorkspaceNode

public abstract class JsonNode
extends org.codehaus.jettison.json.JSONObject

The JsonNode class defines the API for interacting with JSON objects. Every JsonNode knows how to create their URL and create their JCR content.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.codehaus.jettison.json.JSONObject
NULL
 
Constructor Summary
protected JsonNode(String id)
           
 
Method Summary
 byte[] getContent()
           
 String getId()
           
abstract  URL getUrl()
           
 String toString()
           
 
Methods inherited from class org.codehaus.jettison.json.JSONObject
accumulate, append, doubleToString, get, getBoolean, getDouble, getInt, getJSONArray, getJSONObject, getLong, getString, has, isNull, keys, length, names, numberToString, opt, optBoolean, optBoolean, optDouble, optDouble, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putOpt, quote, remove, toJSONArray, toString, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsonNode

protected JsonNode(String id)
Parameters:
id - the node identifier (never null)
Method Detail

getContent

public byte[] getContent()
                  throws Exception
Returns:
the content that gets published
Throws:
Exception - if there is a problem obtaining the node content

getId

public String getId()
Returns:
a unique identifier for this node

getUrl

public abstract URL getUrl()
                    throws Exception
Returns:
an HTTP URL representing this node
Throws:
Exception - if there is a problem constructing the URL

toString

public String toString()
Overrides:
toString in class org.codehaus.jettison.json.JSONObject

ModeShape Distribution 3.2.0.Final

Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.