Ontology Adapter: Composite

Developer: Lizhen Qu


This adapter services as a wrapper of the other ontology, especially it makes possible to contract and expand subgraphs. There are implementations in this package of all the interfaces from in order to wrap every frame of a ontology. If a frame is wrapped by a wrapper class, it should behave like the being wrapped frame from a point view of the implemented interface. That means, the returned values from the methods belonging to the interface are semantically equal. Objects of CompositeCls, which contract or expand a subgraph, do not obey the rule, because they are semantically different.

The most important classes are OntologyWrapper and CompositeCls. OntologyWrapper utilizes a static method to wrap every frame of the given ontology. CompositeCls provides the contract and expand functionalities. After contracting, the name of the new class is given by alphabetically concatenating all names of the classes from the original subgraph. The URL begins with prefix, followed by the new class name. If the same datatype properties are found in different classes, they are all added to the new class. After contracting, the domain of properites are changed to the new class, any references to the original classes of the subgraph will be redirected to the new class.


The overhead at the wrapping phase is huge, because every frame will be wrapped into a new class.





The ontology adapter class is

Initialisation: Using static method OntologyWrapper.init() to encapsulate an existing ontology.

 CompositeOntology ont = OntologyWrapper.init(otherOntology);


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();




Log4j - for logging

License Issues


Last modified 18 years ago Last modified on 05/05/06 14:56:35