public class JsonSchemaNode extends Object implements ISchemaNode
JsonSchemaNode class.
| Modifier and Type | Class and Description |
|---|---|
class |
JsonSchemaNode.ArrayItemsNode |
class |
JsonSchemaNode.PropertiesNode |
class |
JsonSchemaNode.RequiredNode |
class |
JsonSchemaNode.TypeNode |
| Constructor and Description |
|---|
JsonSchemaNode(String name,
org.codehaus.jettison.json.JSONObject object,
JsonSchemaNode parent)
Constructor for JsonSchemaNode.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addArrayItem(JsonSchemaNode item)
addArrayItem.
|
void |
addChildNode(JsonSchemaNode node)
addChildNode.
|
static boolean |
compare(JsonSchemaNode node1,
JsonSchemaNode node2)
compare.
|
Collection<JsonSchemaNode> |
getChildren()
getChildren.
|
String |
getFormattedStringValue()
getFormattedStringValue.
|
String |
getName()
Getter for the field
name. |
JsonSchemaNode |
getParent()
Getter for the field
parent. |
Collection<JsonSchemaNode> |
getProperties()
Getter for the field
properties. |
String |
getType()
Getter for the field
type. |
boolean |
isRequired()
isRequired.
|
void |
removeProperty(JsonSchemaNode property)
removeProperty.
|
void |
setName(String name)
Setter for the field
name. |
void |
setProperty(JsonSchemaNode property)
setProperty.
|
void |
setRequired(boolean required)
Setter for the field
required. |
void |
setType(String type)
Setter for the field
type. |
String |
toString()
toString.
|
void |
update(String name,
String type,
boolean required)
update.
|
public JsonSchemaNode(String name, org.codehaus.jettison.json.JSONObject object, JsonSchemaNode parent)
Constructor for JsonSchemaNode.
name - a String object.object - a JSONObject object.parent - a JsonSchemaNode object.public JsonSchemaNode getParent()
Getter for the field parent.
JsonSchemaNode object.public void setName(String name)
Setter for the field name.
name - a String object.public void setType(String type)
Setter for the field type.
type - a String object.public Collection<JsonSchemaNode> getChildren()
getChildren.
getChildren in interface ISchemaNodeCollection object.public Collection<JsonSchemaNode> getProperties()
Getter for the field properties.
Collection object.public boolean isRequired()
isRequired.
public void setRequired(boolean required)
Setter for the field required.
required - a boolean.public void setProperty(JsonSchemaNode property)
setProperty.
property - a JsonSchemaNode object.public void addArrayItem(JsonSchemaNode item)
addArrayItem.
item - a JsonSchemaNode object.public void removeProperty(JsonSchemaNode property)
removeProperty.
property - a JsonSchemaNode object.public String getFormattedStringValue() throws org.codehaus.jettison.json.JSONException, IOException
getFormattedStringValue.
String object.org.codehaus.jettison.json.JSONException - if any.IOException - if any.public void addChildNode(JsonSchemaNode node)
addChildNode.
node - a JsonSchemaNode object.public String toString()
toString.
public static boolean compare(JsonSchemaNode node1, JsonSchemaNode node2)
compare.
node1 - a JsonSchemaNode object.node2 - a JsonSchemaNode object.Copyright © 2015 Mulesoft. All rights reserved.