|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||
See:
Description
| Interface Summary | |
|---|---|
| CogEventListener | A listener for CogEvents. |
| Coggable | A Coggable is a Java object whose state can be saved to and restored from a Cog structure. |
| CogType | A datatype for Cogs. |
| Class Summary | |
|---|---|
| AbstractCogType | A generic implementation of CogType that takes care of a few minor
details for you. |
| Cog | A Configurable Object Graph. |
| CogBootstrapSchema | A standard base schema for Cog structures. |
| CogCollectionType | Describes collection-like Cogs. |
| CogEnumeratedType | Describes Cogs that must be selected from a list of predefined choices. |
| CogEvent | A superclass for events that occur within Cogs. |
| CogHeader | A CogHeader contains properties of a Cog data structure as a whole, as opposed to node-specific properties. |
| CogLib | Handy Cog functions. |
| CogPrimitiveType | Describes primitive-like CogNodes. |
| CogSchema | A CogSchema defines the data dictionary for a set of related cogs, such as in a Codex. |
| CogStructureField | A field in a CogStructureType. |
| CogStructureType | Describes structure-like Cogs. |
| CogXmlLib | Convenience methods for reading and writing Cogs as XML. |
| CogXmlParser | Parser for Cog XML data. |
| CogXmlWriter | Writes out Cogs as XML. |
| Exception Summary | |
|---|---|
| CogException | A superclass for exceptions that occur within cogs. |
| CogValidationException | Thrown when a validation error occurs. |
A generic, yet complex, data structure.
Cogs are designed to store the many types of "payload" data
encountered in a system. This data is typically just a record-like
structure (named values), but may consist of lists or nested
hierarchies. The primitive data stored within is often of
indeterminate type, so conversions between e.g. string and numeric
types need to be easy.
Cog is also designed to be simple and natural to use from a script, and to remove a lot of the bulk code required to build complex objects. It is designed to be flexible and forgiving, rather than strict and rigid.
Cogs can be used in two major ways. The first is "untyped", where there is no schema or assigned type for the Cog's nodes. Untyped cogs can be used for temporary or casual data storage, or for cases when (e.g. loading old files for backwards compatibility) you don't want to apply validation rules to the data.
"Typed" cogs, on the other hand, have a CogSchema and a data type associated with them. This data type describes the cog's organization and metadata, such as the defined fields for a structure, the allowed contents for a list, etc. It contains user-oriented items such as field labels and descriptions, and also contains validation rules that can be run on the data.
Cogs consist of Cog nodes, connected together in a hierarchy,
doubly-linked so that you can traverse both up and down the structure.
Cogs can be treated as primitives (leaf
nodes), as lists or associations, or as structures,
depending on need and upon the data type.
An optional CogHeader is defined only for the root Cog in a structure; this contains pointers to the schema and maintains event listeners and dispatch.
Cogs fit very naturally into XML format, since the nodes form
hierarchical documents. CogXmlLib provides simple reading
and writing methods for this format.
Cogs intentionally form a separate, language- and
platform-independent typing and data modelling system from
Java. Cogs are readable from other platforms, and the type and
metadata associated with them are expressed in generic
terms. However, it is also useful to use Cog as a serialization
method for Java, and direct support for this is provided via the Coggable
interface.
Copyright 2006-2009 Partner Software, Inc.
|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||