Class DocumentNode
- java.lang.Object
- 
- com.inductiveautomation.ignition.client.jsonedit.DocumentNode
 
- 
 public class DocumentNode extends java.lang.ObjectCreated by carlg on 5/15/2017.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.beans.PropertyChangeSupportchangeThis slightly modified property change support object also forwards each event upwards directly to the model, which is what triggers the model to know when to run the validation routine.
 - 
Constructor SummaryConstructors Constructor Description DocumentNode(DocumentNode copy)DocumentNode(NodeType type)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)voidaddPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)voidappendChild(DocumentNode newNode)Adds a new child to this node.java.util.Optional<DocumentNode>findChild(java.lang.Object key)java.util.Optional<DocumentNode>findNode(JsonPath path)java.util.Optional<JsonSchema>findSchema()Finds the schema object for this node, if anyintgetChildCount()java.util.Iterator<DocumentNode>getChildren()java.lang.ObjectgetDirtyKey()java.lang.StringgetDirtyKeyAsString()JsonPathgetDirtyPath()Returns the path of a key that has yet to be committed.java.lang.ObjectgetKey()intgetKeyAsIndex()java.lang.StringgetKeyAsString()DocumentModelgetModel()DocumentNodegetParent()JsonPathgetPath()QualityCodegetQuality()NodeTypegetType()java.util.Collection<ValidationResults.ValidationError>getValidationErrors()java.lang.ObjectgetValue()intindexOf(DocumentNode childNode)voidinsertChild(int index, DocumentNode newNode)Inserts a child an a specific location.booleanisArray()booleanisEquivalent(DocumentNode other)booleanisNull()booleanisObject()booleanisObjectOrArray()booleanisRoot()booleanisVisible()voidremoveChild(DocumentNode node)voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)voidremovePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)voidreorderBySchema(JsonPath path, JsonSchema schema)Re-order this node's children, if it is an object with child nodes, according to the schemavoidreplaceChildren(java.util.List<DocumentNode> newChildArray)voidreplaceChildren(java.util.Map<java.lang.String,DocumentNode> newChildMap)voidrepositionNode(DocumentNode child, int newIndex)voidsetChild(int index, DocumentNode newNode)Overwrites the child node at the given index with this node.voidsetDirtyKey(java.lang.Object newDirtyKey)voidsetKey(java.lang.Object newKey)voidsetQuality(QualityCode quality)voidsetType(NodeType type)voidsetType(NodeType type, boolean retainChildren)Sets the type, with an option to discard any children.voidsetValidationErrors(java.util.Collection<ValidationResults.ValidationError> validationErrors)voidsetValue(java.lang.Object value)voidsetValueDocument(DocumentElement element)voidsetValueJson(com.inductiveautomation.ignition.common.gson.JsonElement element)Sets the value, element is expected to be json null or primitive.voidsetVisible(boolean visible)com.inductiveautomation.ignition.common.gson.JsonElementtoJson()java.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
DocumentNodepublic DocumentNode(NodeType type) 
 - 
DocumentNodepublic DocumentNode(DocumentNode copy) 
 
- 
 - 
Method Detail- 
isEquivalentpublic boolean isEquivalent(DocumentNode other) 
 - 
getModelpublic DocumentModel getModel() 
 - 
findSchemapublic java.util.Optional<JsonSchema> findSchema() Finds the schema object for this node, if any
 - 
findChildpublic java.util.Optional<DocumentNode> findChild(java.lang.Object key) 
 - 
findNodepublic java.util.Optional<DocumentNode> findNode(JsonPath path) 
 - 
setTypepublic void setType(NodeType type) 
 - 
setTypepublic void setType(NodeType type, boolean retainChildren) Sets the type, with an option to discard any children.
 - 
getPathpublic JsonPath getPath() 
 - 
getDirtyPathpublic JsonPath getDirtyPath() Returns the path of a key that has yet to be committed. Useful only with value node types.
 - 
setVisiblepublic void setVisible(boolean visible) 
 - 
isVisiblepublic boolean isVisible() 
 - 
toJsonpublic com.inductiveautomation.ignition.common.gson.JsonElement toJson() 
 - 
isRootpublic boolean isRoot() 
 - 
getTypepublic NodeType getType() 
 - 
getKeypublic java.lang.Object getKey() 
 - 
getKeyAsStringpublic java.lang.String getKeyAsString() 
 - 
getKeyAsIndexpublic int getKeyAsIndex() 
 - 
setKeypublic void setKey(java.lang.Object newKey) 
 - 
getDirtyKeypublic java.lang.Object getDirtyKey() 
 - 
getDirtyKeyAsStringpublic java.lang.String getDirtyKeyAsString() 
 - 
setDirtyKeypublic void setDirtyKey(java.lang.Object newDirtyKey) 
 - 
getValuepublic java.lang.Object getValue() 
 - 
setValuepublic void setValue(java.lang.Object value) 
 - 
getQualitypublic QualityCode getQuality() 
 - 
setQualitypublic void setQuality(QualityCode quality) 
 - 
isNullpublic boolean isNull() 
 - 
isObjectOrArraypublic boolean isObjectOrArray() 
 - 
isObjectpublic boolean isObject() 
 - 
isArraypublic boolean isArray() 
 - 
getParentpublic DocumentNode getParent() 
 - 
getChildCountpublic int getChildCount() 
 - 
getChildrenpublic java.util.Iterator<DocumentNode> getChildren() 
 - 
appendChildpublic void appendChild(DocumentNode newNode) Adds a new child to this node. The node type must be Object or Array. Arrays will automatically set the key of the new node.
 - 
insertChildpublic void insertChild(int index, DocumentNode newNode)Inserts a child an a specific location. If this is an array, the index key will be set automatically. Will throw anIllegalArgumentExceptionif given a bogus index.
 - 
setChildpublic void setChild(int index, DocumentNode newNode)Overwrites the child node at the given index with this node.
 - 
indexOfpublic int indexOf(DocumentNode childNode) - Returns:
- the index of the given child, or -1 if the child is not present
 
 - 
repositionNodepublic void repositionNode(DocumentNode child, int newIndex) 
 - 
removeChildpublic void removeChild(DocumentNode node) 
 - 
replaceChildrenpublic void replaceChildren(java.util.Map<java.lang.String,DocumentNode> newChildMap) 
 - 
replaceChildrenpublic void replaceChildren(java.util.List<DocumentNode> newChildArray) 
 - 
reorderBySchemapublic void reorderBySchema(@Nonnull JsonPath path, @Nonnull JsonSchema schema)Re-order this node's children, if it is an object with child nodes, according to the schema- Parameters:
- path- Path to this node relative to the given schmea
 
 - 
setValueJsonpublic void setValueJson(@Nonnull com.inductiveautomation.ignition.common.gson.JsonElement element)Sets the value, element is expected to be json null or primitive.
 - 
setValueDocumentpublic void setValueDocument(DocumentElement element) 
 - 
getValidationErrorspublic java.util.Collection<ValidationResults.ValidationError> getValidationErrors() 
 - 
setValidationErrorspublic void setValidationErrors(java.util.Collection<ValidationResults.ValidationError> validationErrors) 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
addPropertyChangeListenerpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener) 
 - 
removePropertyChangeListenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener) 
 - 
addPropertyChangeListenerpublic void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
 - 
removePropertyChangeListenerpublic void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
 
- 
 
-