When reading an EDXML data stream, the parser consumes both events and ontology information and provides an interface to access both. On the other hand, EDXML writers require providing an ontology matching the events that are written. In the EDXML SDK, ontology information is represented by instances of the Ontology class. This class is supported by several peripheral classes representing event types, event properties, object types, data types and event sources.
Ontologies can be populated by using the various named constructors of the Ontology class. Alternatively, ontology elements can be fetched from an Ontology Brick <bricks>
. or generated using an event type factory <event_type_factory>
.
EDXML data sources can provide a wealth of knowledge. Learning if and how that knowledge will help you in your data analysis tasks requires studying its output ontology and how it fits into other domain ontologies that you might use. Unless an EDXML data source can just tell you.
The describe_producer_rst() <edxml.ontology.description.describe_producer_rst>
function can do just that. Given an ontology it will list the object types and concepts that it uses and how it aids reasoning about data. For example, the description might say: Identifies computers as network routers or Relates IP addresses to host names. The name of the function indicates that the generated descriptions are meant for describing EDXML data producers such as data sources or data processors.
When designing an EDXML ontology, getting the relations and concept associations right is critical. A picture can be most helpful to review your design. Using the generate_graph_property_concepts() <edxml.ontology.visualization.generate_graph_property_concepts>
function you can generate a visualization showing the reasoning paths provided by a given ontology. It displays the concepts and object types and how they are connected.
The API documentation can be found below.
Ontology Elements
- Ontology
- EventType
- EventTypeAttachment
- EventProperty
- PropertyConcept
- ObjectType
- Concept
- DataType
- EventSource
Base Classes
Functions
edxml.ontology.Ontology
edxml.ontology.EventType
edxml.ontology.EventTypeAttachment
edxml.ontology.EventTypeParent
edxml.ontology.EventProperty
edxml.ontology.PropertyConcept
edxml.ontology.ObjectType
edxml.ontology.Concept
edxml.ontology.DataType
edxml.ontology.EventSource
edxml.ontology.OntologyElement
edxml.ontology.VersionedOntologyElement
edxml.ontology.description
edxml.ontology.visualization