Class DocumentModel


  • public class DocumentModel
    extends java.lang.Object
    Model that represents a json document, but held in memory as so to be editable by the JSON editor.
    • Constructor Detail

      • DocumentModel

        public DocumentModel​(java.lang.String json)
      • DocumentModel

        public DocumentModel​(com.inductiveautomation.ignition.common.gson.JsonElement rootElement)
      • DocumentModel

        public DocumentModel​(DocumentNode root)
    • Method Detail

      • getAsJsonTree

        public com.inductiveautomation.ignition.common.gson.JsonElement getAsJsonTree()
      • getSchema

        @Nullable
        public JsonSchema getSchema()
      • onNodeChanged

        protected void onNodeChanged​(java.beans.PropertyChangeEvent event)
        DocumentNodes feed ALL property change events up to the model
      • addPropertyChangeListener

        public void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)
      • removePropertyChangeListener

        public void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)
      • addPropertyChangeListener

        public void addPropertyChangeListener​(java.lang.String propertyName,
                                              java.beans.PropertyChangeListener listener)
      • removePropertyChangeListener

        public void removePropertyChangeListener​(java.lang.String propertyName,
                                                 java.beans.PropertyChangeListener listener)
      • dfs

        public void dfs​(java.util.function.Consumer<DocumentNode> visitor)
        Depth first tree traversal of the document.
      • fromGson

        public static DocumentNode fromGson​(com.inductiveautomation.ignition.common.gson.JsonElement element)
        Creates a DocumentNode hierarchy from a GSON json tree. All value nodes get the AUTO type.