de.topicmapslab.majortom.importer
Class Importer

java.lang.Object
  extended by de.topicmapslab.majortom.importer.Importer

public class Importer
extends java.lang.Object

Main class which provides some static methods to import from files and streams

Author:
Hannes Niederhausen

Constructor Summary
Importer()
           
 
Method Summary
static void importFile(java.io.File file, java.lang.String baseIRI)
          Imports a topic map read by the file
static void importFile(java.io.File file, java.lang.String baseIRI, java.util.Properties dbProperties)
          Imports a topic map read by the file
static void importFile(IHandler handler, java.io.File file, java.lang.String baseIRI)
          Imports a topic map read by the file
static void importStream(IHandler handler, java.io.InputStream is, java.lang.String baseIRI, de.topicmapslab.format_estimator.FormatEstimator.Format format)
          Imports a topic map read by the input stream
static void importStream(java.io.InputStream is, java.lang.String baseIRI, de.topicmapslab.format_estimator.FormatEstimator.Format format)
          Imports a topic map read by the input stream
static void importStream(java.io.InputStream is, java.lang.String baseIRI, de.topicmapslab.format_estimator.FormatEstimator.Format format, java.util.Properties dbProperties)
          Imports a topic map read by the input stream
private static void importStream(java.io.InputStream is, java.lang.String baseIRI, MapHandler mapHandler, de.topicmapslab.format_estimator.FormatEstimator.Format format)
          Instantiates the deserilizer for the given format and reads the topic map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Importer

public Importer()
Method Detail

importFile

public static void importFile(IHandler handler,
                              java.io.File file,
                              java.lang.String baseIRI)
                       throws com.semagia.mio.MIOException
Imports a topic map read by the file

Parameters:
handler - the internal handler
file - file to load
baseIRI - base iri to use
Throws:
com.semagia.mio.MIOException

importStream

public static void importStream(IHandler handler,
                                java.io.InputStream is,
                                java.lang.String baseIRI,
                                de.topicmapslab.format_estimator.FormatEstimator.Format format)
                         throws com.semagia.mio.MIOException
Imports a topic map read by the input stream

Parameters:
handler - the internal handler
is - the InputStream of the serialized topic map
baseIRI - the base iri for the topic map
Throws:
com.semagia.mio.MIOException

importFile

public static void importFile(java.io.File file,
                              java.lang.String baseIRI,
                              java.util.Properties dbProperties)
                       throws com.semagia.mio.MIOException
Imports a topic map read by the file

Parameters:
file - file to load
baseIRI - base iri to use
Throws:
com.semagia.mio.MIOException

importFile

public static void importFile(java.io.File file,
                              java.lang.String baseIRI)
                       throws com.semagia.mio.MIOException
Imports a topic map read by the file

Parameters:
file - file to load
baseIRI - base iri to use
dbProperties - database properties overriding values in db.properties
Throws:
com.semagia.mio.MIOException

importStream

public static void importStream(java.io.InputStream is,
                                java.lang.String baseIRI,
                                de.topicmapslab.format_estimator.FormatEstimator.Format format,
                                java.util.Properties dbProperties)
                         throws com.semagia.mio.MIOException
Imports a topic map read by the input stream

Parameters:
is - the InputStream of the serialized topic map
baseIRI - the base iri for the topic map
Throws:
com.semagia.mio.MIOException

importStream

public static void importStream(java.io.InputStream is,
                                java.lang.String baseIRI,
                                de.topicmapslab.format_estimator.FormatEstimator.Format format)
                         throws com.semagia.mio.MIOException
Imports a topic map read by the input stream

Parameters:
is - the InputStream of the serialized topic map
baseIRI - the base iri for the topic map
format - the serialization format
Throws:
com.semagia.mio.MIOException

importStream

private static void importStream(java.io.InputStream is,
                                 java.lang.String baseIRI,
                                 MapHandler mapHandler,
                                 de.topicmapslab.format_estimator.FormatEstimator.Format format)
                          throws com.semagia.mio.MIOException
Instantiates the deserilizer for the given format and reads the topic map

Parameters:
is - the InputStream for the serialized topic map
baseIRI - the base iri to use for the topic map
mapHandler - the MapHandler
format - the format of the topic map
Throws:
com.semagia.mio.MIOException - if somethihng went wront