Object#
- class geodesic.entanglement.object.Object(**obj)[source]#
Object represents a node in a graph in Entanglement.
Objects are classified by their class (keyword: object_class), domain, category, type, and name. These values uniquely identify an object. Name and class must be specified, but the rest can remain empty if desired. These properties help to categorize nodes that are similar in name, but represent different things.
Object also has a metaclass, so calling the Object constructer may return a different type based on the specified object_class (or class if created using a dictionary.).
Attributes
alias
(str) - a short name/description for this object - doesn't need to be unique
category
(str) - the category of this object
description
(str) - a text description of this object
domain
(str) - the domain of this object
full_name
Full name for an object.
geometry
(str, dict, bytes,
BaseGeometry
) - a geometry for this object.graph
If this object belongs to a graph, will return that parent graph.
item
(dict) - an arbitrary dictionary of info about this object.
name
(str) - the name of this object, unique to the project
object_class
(str) - the class of this object (e.g. Observable, Entity, Dataset...).
project
the project/subgraph this object belongs to
type
(str) - the type of this object
uid
Get the object's UID, if set, None otherwise.
xid
(str) - An external reference id to another graph or system that references this object.
Methods
clear
()connect_with
(predicate, object[, overwrite])Adds a connection from this Object to another using the specified Predicate.
connections
([version_datetime])Deprecated in v1.0.0
copy
()create
()Create a new Object in Entanglement.
delete
([hard, show_prompt])Deletes this object from Entanglement.
from_stac
(item[, object_class])Derive a new Object from a STAC item.
fromkeys
([value])Create a new dictionary with keys from iterable and values set to value.
get
(key[, default])Return the value for key if key is in the dictionary, else default.
get_connections
([version_datetime])Returns nearest neighbor connections to this object.
items
()keys
()load
([uid])Load an object given a UID.
pop
(k[,d])If the key is not found, return the default if given; otherwise, raise a KeyError.
popitem
()Remove and return a (key, value) pair as a 2-tuple.
save
()Updates an existing Object in Entanglement.
setdefault
(key[, default])Insert key with a value of default if key is not in the dictionary.
update
(*mapping, **kwargs)values
()