Changes between Version 1 and Version 2 of adapters_composite


Ignore:
Timestamp:
05/02/06 01:04:36 (19 years ago)
Author:
lqu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • adapters_composite

    v1 v2  
    44 
    55== Description == 
    6  TODO 
     6 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. 
    77 
    88== Characteristics == 
     
    1515=== Intitialisation === 
    1616The ontology adapter class is 
    17  {{{de.dfki.km.phaselib.adapters.compoosite.CompositeOntology}}} 
     17 {{{de.dfki.km.phaselib.adapters.compoosite.OntologyWrapper}}} 
    1818 
    1919Initialisation: 
    20  TODO 
     20Using static method OntologyWrapper.init() to encapsulate an existing ontology. 
     21 
     22{{{ 
     23CompositeOntology ont = OntologyWrapper.init(otherOntology); 
     24}}} 
     25 
     26Contracting and Expanding: 
     27CompositeCls provides utilities to contract or expand a subgraph. 
     28Contract: 
     29A 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{{{ 
     32CompositeCls compositedCls = CompositeCls.composite(subgraph); 
     33}}} 
     34 
     35 
     36Expand: 
     37After expanding, the original class set is returned.  
     38{{{ 
     39Collection<Cls> subgraph = compositedCls.expand(); 
     40}}} 
     41 
    2142 
    2243=== Parameters ===