Class DataJsonNode


  • public class DataJsonNode
    extends java.lang.Object
    • Constructor Detail

      • DataJsonNode

        public DataJsonNode​(com.fasterxml.jackson.databind.node.ObjectNode jsonNode)
    • Method Detail

      • removeAttribute

        public void removeAttribute​(java.lang.String name)
      • getDataClassName

        public java.lang.String getDataClassName()
      • match

        public boolean match​(java.lang.String dataClassNameFullQualified)
      • renameAttribute

        public void renameAttribute​(java.lang.String previousAttributeName,
                                    java.lang.String newAttributeName)
      • renameClass

        public void renameClass​(java.lang.Class<? extends FactoryBase<?,​?>> newDataClass)
      • getChild

        public DataJsonNode getChild​(java.lang.String attributeName)
      • getChild

        public DataJsonNode getChild​(java.lang.String attributeName,
                                     int index)
      • getAttributeValue

        public com.fasterxml.jackson.databind.JsonNode getAttributeValue​(java.lang.String attribute)
      • setAttributeValue

        public void setAttributeValue​(java.lang.String attribute,
                                      com.fasterxml.jackson.databind.JsonNode jsonNode)
      • getAttributeValue

        public <V> V getAttributeValue​(java.lang.String attributeName,
                                       java.lang.Class<V> valueClass,
                                       SimpleObjectMapper simpleObjectMapper)
      • getArrayAttributeValue

        public <V> V getArrayAttributeValue​(java.lang.String attributeName,
                                            java.lang.Class<V> valueClass,
                                            SimpleObjectMapper simpleObjectMapper,
                                            int index)
      • getAttributeIdValue

        public java.lang.String getAttributeIdValue​(java.lang.String attributeName)
      • isData

        public boolean isData()
      • collectChildrenFromRoot

        public java.util.List<DataJsonNode> collectChildrenFromRoot()
        get children including himself
        Returns:
        children
      • getId

        public java.lang.String getId()
      • asData

        public <D> D asData​(java.lang.Class<D> valueClass,
                            SimpleObjectMapper simpleObjectMapper)
      • getAttributes

        public java.util.List<java.lang.String> getAttributes()
      • collectChildrenMapFromRoot

        public java.util.Map<java.lang.String,​DataJsonNode> collectChildrenMapFromRoot()
      • fixIdsDeepFromRoot

        public void fixIdsDeepFromRoot​(DataStorageMetadataDictionary dataStorageMetadataDictionary)
        fix objects in removed attributes. References are serialized using JsonIdentityInfo That means first occurrence is the object and following are just the ids If the first occurrence is a removed attribute Jackson can't read the reference.
        Parameters:
        dataStorageMetadataDictionary - dataStorageMetadataDictionary
      • getJsonNode

        public com.fasterxml.jackson.databind.JsonNode getJsonNode()