de.dfki.mycbr.io
Class MyCBRImporter

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by de.dfki.mycbr.io.MyCBRImporter
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class MyCBRImporter
extends org.xml.sax.helpers.DefaultHandler

Imports myCBR files version 2.6.4 or higher. First tries to import the concepts from the inheritance similarity then imports the attributes from _CASEBASE.XML file. Then imports similarity functions and the case base.

Author:
myCBR Team

Constructor Summary
MyCBRImporter(Project project)
          Initializes this with the given project, path and name.
 
Method Summary
 void doImport()
          Imports the model from the specified XML files to the given project.
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyCBRImporter

public MyCBRImporter(Project project)
              throws java.lang.Exception
Initializes this with the given project, path and name. Adds a new case base to this project.

Parameters:
project - the project whose model should be imported
Throws:
java.lang.Exception
Method Detail

doImport

public void doImport()
Imports the model from the specified XML files to the given project. The model contains the concepts hierarchy structure, the c's attributes and the corresponding similarity functions.


startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException