Version 4 (modified by lqu, 19 years ago) (diff) |
---|
Ontology Adapter: Composite
Developer: Lizhen Qu
Description
This adapter servces as a wrapper of the other ontology, especially it makes possible to contract and expand subgraphs. The adapter package implements all the interfaces of de.dfki.km.phaselib.model.ontology in order to wrap every frame of a ontology. The most important classes are OntologyWrapper and CompositeCls. OntologyWrapper utilizes a static method to wrap every frame of the given ontology. Except contracted classes, every wrapped frame behaves the same as the original frame. CompositeCls provides the contract and expand functionalities. The name of the contracted class is given by an alphabetic ordered names from all the classes of the original subgraph. The URL begins with prefix http://km.dfki.de/phaselib/adapters/composite/. If the same datatype properties are found in different classes, they all should be added to the new contracted class. After contracting, the domain of properites are changed to the contracted class, any references to the original class set of the subgraph will point to the contracted class.
Characteristics
TODO
Evaluation/Performance
TODO
Specification
Intitialisation
The ontology adapter class is
de.dfki.km.phaselib.adapters.compoosite.OntologyWrapper
Initialisation: Using static method OntologyWrapper.init() to encapsulate an existing ontology.
CompositeOntology ont = OntologyWrapper.init(otherOntology);
Usage
Contracting and Expanding: CompositeCls provides utilities to contract or expand a subgraph. Contract: A subgraph is represented as a set of wrapped classes. After contracting, the contracted class is a wrapped class representing the original class set.
CompositeCls compositedCls = CompositeCls.composite(subgraph);
Expand: After expanding, the original class set is returned.
Collection<Cls> subgraph = compositedCls.expand();
Parameters
TODO
Dependencies
Log4j - for logging
License Issues
TODO