1 Chapter
2 Cosmos Hierarchy
3 Nodes
3.1 ObjectNode
3.1.1 Object Names
3.2 Entity Node
3.3 DataAccess
3.4 Modifications
2 Cosmos Hierarchy
<
model id="model_1" xmlns="livcos.org/ns/model">
<
type id="type_10" name="NodeBase">
<
relation id="relation_1" type="composite">
<start role="parent" cardinality="0..1"/>
<end ref="#type_10" role="childNodes" cardinality="0..*"/>
<
type id="type_1" name="ElementNode" specialize="#type_10">
<
property id="property_1" name="name" type="QName" access="read"/>
<
property id="property_2" name="namespace" type="Uri" access="read"/>
<
relation id="relation_2" type="composite">
<start role="element" cardinality="1"/>
<end ref="#type_3" role="attributes" cardinality="0..*"/>
<
type id="type_2" name="ObjectNode" specialize="#type_1">
<
property id="property_3" name="id" type="Uri" access="read"/>
<
type id="type_3" name="AttributeNode">
<
property id="property_4" name="name" type="QName" access="read"/>
<
property id="property_5" name="namespace" type="Uri" access="read"/>
<
property id="property_6" name="value" type="String"/>
<
type id="type_4" name="Domain" specialize="#type_2">
<
relation id="relation_3" specialize="#relation_1">
<
end cardinality="1..*">
<
include id="include_1" type="#type_4"/>
<
include id="include_2" type="#type_6"/>
<
include id="include_8" type="#type_7"/>
<
include id="include_9" type="#type_8"/>
<
type id="type_5" name="Cosmos" specialize="#type_2">
<
relation id="relation_4" specialize="#relation_1">
<
end cardinality="1..*">
<
include id="include_3" type="#type_4"/>
<
include id="include_4" type="#type_6"/>
<
include id="include_6" type="#type_7"/>
<
include id="include_7" type="#type_8"/>
<
type id="type_6" name="DataAccessNode" specialize="#type_1">
<
relation id="relation_5">
<label> managed nodes
<start cardinality="0..1"/>
<
end ref="#type_1" role="nodes" cardinality="0..*">
<
include id="include_5" subset="following-siblings(parent)"/>
<
line id="line_4" to="263,55" xmlns="livcos.org/ns/doc/diagram"/>
<
line id="line_5" to="267,61" xmlns="livcos.org/ns/doc/diagram"/>
<
type id="type_7" name="MetaNode" specialize="#type_1">
<
relation id="relation_6" specialize="#relation_1">
<
end>
<
exclude id="exclude_1" type="#type_2"/>
<
exclude id="exclude_2" type="#type_8"/>
<
type id="type_8" name="HistoryNode" specialize="#type_1"/>
Cosmos - Domain - ObjectNode - content
- ... - ... - meta
- history
3 Nodes
3.1 ObjectNode
An ObjectNode represents an object within the Cosmos. It can contain either other ObjectNodes or one content node, several DataAccess nodes (although mostly one) and/or several MetaInfo nodes.
Even though the object node model seems to follow a "normal", XML-like structure, the elements forming the objects cannot be modeled by a static schema. The element names don't express data types, since all the objects, well are of a kind of an object node type. And an object node's element name forms the ID of the object, so is always unique within one child node level.
An object node is represented by an element node in the namespace "livcos.org/ns/cosmos". All elements in this namespace form object nodes. There is no XML Schema for this namespace.
3.1.1 Object Names
Object names are formed via the element local name of the Object Node. As such their syntax has to conform to XML Names.
"Encoding names sometimes contain characters that are invalid in XML names, such as spaces or half-width Katakana. Characters that need to be mapped to XML names without reference to schemas are translated into XML names. The invalid characters are translated into escaped numeric entity encoding."
Instead of a fixed "_x1234_" 4-digit encoding, shortcuts are allowed (eg. ' ' => "_20_"). See also org.livcos.common.xml.XmlUtils.encodeTagName().
Also capital letters (A-F) seem to be more common for HEX code representation.
3.2 Entity Node
An entity node is a identifiable node within the object node's content. It defines an "id" attribute with a unique value within this content.
Since the element names for entity nodes represent the entity's type, it is suitable to model entity structures with a schema.