docria.model

Docria document model ( primary module )

Classes

DataType(typename, **kwargs)

Data type declaration

DataTypeBinary(typename, **kwargs)

Bytes field type, field with raw binary data

DataTypeBool(typename, **kwargs)

Boolean field type

DataTypeEnum(value)

Type names

DataTypeFloat(typename, **kwargs)

64 bit floating point (double) field type

DataTypeInt32(typename, **kwargs)

Signed 32 bit integer field type

DataTypeInt64(typename, **kwargs)

Signed 64 bit integer field type

DataTypeNoderef(typename, **kwargs)

Node reference field type in same or other layer

DataTypeNoderefList(typename, **kwargs)

Multi node reference field type in same or other layer

DataTypeNodespan(typename, **kwargs)

Nodespan field type, sequence of nodes

DataTypeString(typename, **kwargs)

String field type

DataTypeTextspan(typename, **kwargs)

Textspan field type, text sequence

DataTypes()

Layer field type factory

Document(**kwargs)

The document which contains all data

ExtData(type, data)

User-defined typed data container

Node(*args, **kwargs)

Basic building block of the document model

NodeCollection(fieldtypes)

Base class for all node collections

NodeCollectionQuery(collection, predicate)

Represents a query to document data

NodeFieldCollection(collection, field)

Field from a node collection

NodeLayerCollection(schema)

Node collection, internally a list with gaps which will compact when 25% of the list is empty.

NodeLayerSchema(name)

Node layer declaration

NodeList(*elems[, fieldtypes])

Python list enriched with extra indexing and presentation functionality for optimal use in Docria.

NodeSpan(left_most_node, right_most_node)

Represents a span of nodes in a layer

Offset(offset)

Text offset object

Text(name, text)

Text object, consisting of text and an index of current offsets

TextSpan(text, start_offset, stop_offset)

Text span, consisting of a start and stop offset.

Exceptions

DataValidationError(message)

Failed to validate document

SchemaError(message)

Failed to validate a part of the schema

SchemaValidationError(message, fields)

Schema validation failed