Next: Query Structure. Up: Formats and Protocol. Previous: Formats and Protocol.

Keynet Structure.

Both queries and content labels use the same data structure, called the keynet structure and defined as follows:

  1. Ontology Identifier. Each ontology is assigned a unique integer identifier.
  2. 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.
  3. Minor version number.
  4. 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.
  5. 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.
  6. Vertex count. This is the count of the number of vertices that will be specified in the list immediately following this field.
  7. Vertex list. This is a set of zero or more vertex specifications. Each vertex specification consists of three integers as follows:
    1. Vertex id. Each vertex of a keynet has a unique identifier within the keynet.
    2. Type id. Each vertex has a type or conceptual category. The types and their identifiers are listed in the ontology.
    3. 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.
  8. Edge count. This is the count of the number of edges that will be specified in the list immediately following this field.
  9. Edge list. This is a set of zero or more edge specifications. Each edge specification consists of three integers as follows:
    1. Source vertex. This is the vertex identifier of the source of this edge in the keynet.
    2. Destination vertex. This is the vertex identifier of the destination of this edge in the keynet.
    3. 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.


kenb@ccs.neu.edu
Fri Jan 20 22:19:31 EST 1995