Changes between Version 1 and Version 2 of adapters_composite
- Timestamp:
- 05/02/06 01:04:36 (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
adapters_composite
v1 v2 4 4 5 5 == Description == 6 T ODO6 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. 7 7 8 8 == Characteristics == … … 15 15 === Intitialisation === 16 16 The ontology adapter class is 17 {{{de.dfki.km.phaselib.adapters.compoosite. CompositeOntology}}}17 {{{de.dfki.km.phaselib.adapters.compoosite.OntologyWrapper}}} 18 18 19 19 Initialisation: 20 TODO 20 Using static method OntologyWrapper.init() to encapsulate an existing ontology. 21 22 {{{ 23 CompositeOntology ont = OntologyWrapper.init(otherOntology); 24 }}} 25 26 Contracting and Expanding: 27 CompositeCls provides utilities to contract or expand a subgraph. 28 Contract: 29 A subgraph is represented as a set of wrapped classes. After contracting, the contracted class is a wrapped class representing the original class set. 30 31 {{{ 32 CompositeCls compositedCls = CompositeCls.composite(subgraph); 33 }}} 34 35 36 Expand: 37 After expanding, the original class set is returned. 38 {{{ 39 Collection<Cls> subgraph = compositedCls.expand(); 40 }}} 41 21 42 22 43 === Parameters ===