Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.uka.ipd.consensus.impl
Class XTMImportHandler

    java.lang.Object
      de.uka.ipd.consensus.impl.XTMImportHandler

All Implemented Interfaces:
  ImportHandler

public class XTMImportHandler
extends Object
implements ImportHandler

TODO has to keep base locator! first remove old ontology, then import new one called only on startup

Version:
  2006-06-14
Author:
  Thomas Much

Constructor Summary
`XTMImportHandler(LoggingManager lm, OntologyManager om)`

Method Summary
`boolean` | `canMerge()` Signals whether this handler can not only load (import), but also merge ontologies
`String` | `getDescription()` Returns a short description about this import handler.
`String` | `getExtension()` Returns the file extensions of the ontology format that this handler can load, e.g.
`void` | `importOntology(InputStream in)` Imports an ontology from the given InputStream.
`void` | `mergeOntology(InputStream in, Collection errors)` If this handler supports ontology merging, this method can be called by an application to merge an ontology into the existing ontology.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XTMImportHandler

    public XTMImportHandler(LoggingManager lm,
                            OntologyManager om)

Method Detail

### importOntology

    public void importOntology(InputStream in)
                        throws IOException,
                               OntologyManagerException

  Description copied from interface: `ImportHandler`
  Imports an ontology from the given InputStream. This method will be called from the OntologyManager during startup of the application, it replaces an existing ontology.

  This method is responsible for closing the stream!

  Specified by:
    `importOntology` in interface `ImportHandler`
  Parameters:
    `in` - the InputStream to read the ontology from
  Throws:
    `IOException` - if an IO error occurrs while reading the stream
    `OntologyManagerException` - if the ontology cannot be loaded for logical reasons

### mergeOntology

    public void mergeOntology(InputStream in,
                              Collection errors)
                       throws IOException

  Description copied from interface: `ImportHandler`
  If this handler supports ontology merging, this method can be called by an application to merge an ontology into the existing ontology.

  This method is responsible for closing the stream!

  Specified by:
    `mergeOntology` in interface `ImportHandler`
  Parameters:
    `in` - the InputStream to read the ontology from
    `errors` - an empty collection provided by the caller, into which the method can put all exceptions that happen during the merge
  Throws:
    `IOException` - if an IO error occurrs while reading the stream
  See Also:
    `ImportHandler.canMerge()`

### canMerge

    public boolean canMerge()

  Description copied from interface: `ImportHandler`
  Signals whether this handler can not only load (import), but also merge ontologies

  Specified by:
    `canMerge` in interface `ImportHandler`
  Returns:
    `true` if the handler can merge ontologies, `false` otherwise
  See Also:
    `ImportHandler.mergeOntology(InputStream, Collection)`

### getExtension

    public String getExtension()

  Description copied from interface: `ImportHandler`
  Returns the file extensions of the ontology format that this handler can load, e.g. "xtm".

  Specified by:
    `getExtension` in interface `ImportHandler`
  Returns:
    the file extension for the handlers ontology file format

### getDescription

    public String getDescription()

  Description copied from interface: `ImportHandler`
  Returns a short description about this import handler.

  Specified by:
    `getDescription` in interface `ImportHandler`
  Returns:
    a description about this handler

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD