Next: Query Structure.
Up: Formats and Protocol.
Previous: Formats and Protocol.
Both queries and content labels use the same data structure, called
the keynet structure and defined as follows:
- Ontology Identifier. Each ontology is assigned a unique
integer identifier.
- Major version number.
Since ontologies can evolved over time, a version
number is used to distinguish both major and minor versions of an ontology.
Minor versions differ from one another only by the addition of new
concepts, conceptual categories and relationship types.
Major versions may differ in more substantial ways, including the splitting
of categories, merging of categories, as well as more complex alterations
in the ontology.
- Minor version number.
- Count. Most keynets are expected to be small enough to fit into a
single UDP packet, but there is a mechanism for larger keynets.
The count field specifies that the keynet has been split into a number of
pieces as specified in this field. Normally the value of this field is 1.
- Sequence number. When a keynet is in several pieces, this field
will have the sequence number of this piece. The values range from 0 to
one less than the count field above.
- Vertex count. This is the count of the number of vertices that
will be specified in the list immediately following this field.
- Vertex list. This is a set of zero or more vertex specifications.
Each vertex specification consists of three integers as follows:
- Vertex id. Each vertex of a keynet has a unique identifier within
the keynet.
- Type id. Each vertex has a type or conceptual category. The types
and their identifiers are listed in the ontology.
- Instance id.
A vertex may be instantiated using one of the instances
given in the ontology. Instance identifiers are nonzero integers.
If this field has value 0, then the vertex has not been instantiated.
- Edge count. This is the count of the number of edges that
will be specified in the list immediately following this field.
- Edge list. This is a set of zero or more edge specifications.
Each edge specification consists of three integers as follows:
- Source vertex. This is the vertex identifier of the source of this
edge in the keynet.
- Destination vertex.
This is the vertex identifier of the destination
of this edge in the keynet.
- Edge type id.
Each edge has a type. The edge or relationship types
and their identifiers are listed in the ontology.
Next: Query Structure.
Up: Formats and Protocol.
Previous: Formats and Protocol.