The Assimilation Project  based on Assimilation version 1.1.7.1474836767
cma.graphnodes.JSONMapNode Class Reference
Inheritance diagram for cma.graphnodes.JSONMapNode:
Collaboration diagram for cma.graphnodes.JSONMapNode:

Public Member Functions

def __init__ (self, json, jhash=None)
 
def __str__ (self)
 
def hash (self)
 
def map (self)
 
def keys (self)
 
def get (self, key, alternative=None)
 
def deepget (self, key, alternative=None)
 
def __getitem__ (self, key)
 
def __iter__ (self)
 
def __contains__ (self, key)
 
def __len__ (self)
 
- Public Member Functions inherited from cma.graphnodes.GraphNode
def __init__ (self, domain, time_create_ms=None, time_create_iso8601=None)
 
def __meta_labels__ (cls)
 
def post_db_init (self)
 
def update_attributes (self, other)
 
def __str__ (self)
 
def get (self, attrstring, valueifnotfound=None)
 
def JSON (self, includemap=None, excludemap=None)
 

Static Public Member Functions

def strhash (string)
 
def __meta_keyattrs__ ()
 
- Static Public Member Functions inherited from cma.graphnodes.GraphNode
def factory (kwargs)
 
def clean_graphnodes ()
 
def __meta_keyattrs__ ()
 
def initclasstypeobj (store, nodetype)
 

Data Fields

 json
 
 jhash
 
- Data Fields inherited from cma.graphnodes.GraphNode
 domain
 
 nodetype
 
 time_create_iso8601
 
 time_create_ms
 

Additional Inherited Members

- Static Public Attributes inherited from cma.graphnodes.GraphNode
 REESC = re.compile(r'\\')
 
 REQUOTE = re.compile(r'"')
 
dictionary classmap = {}
 

Detailed Description

A node representing a map object encoded as a JSON string
This has everything to do with performance in Neo4j.
They don't support maps, and they do a poor (*very* slow) job of supporting large strings.
The only way I know of to support our JSON-based maps in Neo4j is as large strings.
These used to be stored in the Drone nodes themselves, but that meant that every time
a Drone was transferred to the python code, it transferred *all* of its attributes,
which means transferring lots and lots of very slow and rarely needed string data.

Although these are transmitted in UDP packets, they are compressed, and JSON compresses very
well, and in some cases extremely well. I've actually seen 3M of (unusually verbose)
JSON discovery data compress down to less than 40K of binary.
XML blobs are typically more compressible than the average JSON blob.

Definition at line 486 of file graphnodes.py.

Constructor & Destructor Documentation

def cma.graphnodes.JSONMapNode.__init__ (   self,
  json,
  jhash = None 
)

Definition at line 501 of file graphnodes.py.

References cma.graphnodes.JSONMapNode._map.

Member Function Documentation

def cma.graphnodes.JSONMapNode.__contains__ (   self,
  key 
)

Definition at line 548 of file graphnodes.py.

References cma.graphnodes.JSONMapNode.map().

Here is the call graph for this function:

def cma.graphnodes.JSONMapNode.__getitem__ (   self,
  key 
)

Definition at line 540 of file graphnodes.py.

References cma.graphnodes.JSONMapNode.map().

Here is the call graph for this function:

def cma.graphnodes.JSONMapNode.__iter__ (   self)
def cma.graphnodes.JSONMapNode.__len__ (   self)

Definition at line 551 of file graphnodes.py.

References cma.graphnodes.JSONMapNode.map().

Here is the call graph for this function:

def cma.graphnodes.JSONMapNode.__meta_keyattrs__ ( )
static

Definition at line 555 of file graphnodes.py.

def cma.graphnodes.JSONMapNode.__str__ (   self)
def cma.graphnodes.JSONMapNode.deepget (   self,
  key,
  alternative = None 
)
Return value if object contains the given *structured* key - 'alternative' if not.

Definition at line 536 of file graphnodes.py.

References cma.graphnodes.JSONMapNode.map().

Referenced by cma.systemnode.SystemNode.get(), and cma.graphnodes.JSONMapNode.get().

Here is the call graph for this function:

Here is the caller graph for this function:

def cma.graphnodes.JSONMapNode.get (   self,
  key,
  alternative = None 
)
Return value if object contains the given *structured* key - 'alternative' if not.

Definition at line 532 of file graphnodes.py.

References cma.graphnodes.JSONMapNode.deepget(), and cma.graphnodes.JSONMapNode.map().

Referenced by cma.systemnode.SystemNode.__delitem__().

Here is the call graph for this function:

Here is the caller graph for this function:

def cma.graphnodes.JSONMapNode.hash (   self)

Definition at line 520 of file graphnodes.py.

References cma.graphnodes.JSONMapNode.jhash.

def cma.graphnodes.JSONMapNode.keys (   self)

Definition at line 528 of file graphnodes.py.

References cma.graphnodes.JSONMapNode.map().

Referenced by cma.graphnodes.JSONMapNode.__iter__(), and cma.systemnode.SystemNode.__len__().

Here is the call graph for this function:

Here is the caller graph for this function:

def cma.graphnodes.JSONMapNode.strhash (   string)
static

Definition at line 512 of file graphnodes.py.

Field Documentation

cma.graphnodes.JSONMapNode.jhash

Definition at line 509 of file graphnodes.py.

Referenced by cma.graphnodes.JSONMapNode.hash().

cma.graphnodes.JSONMapNode.json

Definition at line 504 of file graphnodes.py.

Referenced by cma.graphnodes.JSONMapNode.__str__().


The documentation for this class was generated from the following file: