de.fzi.kadmos.parser
Interface AlignmentParser

All Known Implementing Classes:
INRIAFormatParser

public interface AlignmentParser

Interface for alignment parsers. Specific parsers must implement two parse() methods to read and parse an input, as well as a method to provide a specific CorrespondenceFactory for creating correspondence object.

Since:
1.0.0
Version:
1.3.0
Author:
Juergen Bock
See Also:
de.fzi.kadmos.renderer

Method Summary
 Alignment parse(File file)
          Parses an alignment and creates a new Alignment object.
 Alignment parse(InputSource inputSource)
          Parses an alignment and creates a new Alignment object.
 Alignment parse(InputStream inputStream)
          Parses an alignment and creates a new Alignment object.
 Alignment parse(Reader reader)
          Parses an alignment and creates a new Alignment object.
 Alignment parse(String string)
          Parses an alignment and creates a new Alignment object.
 Alignment parse(URL url)
          Parses an alignment and creates a new Alignment object.
 void setAlignmentFactory(AlignmentFactory factory)
          Specifies the AlignmentFactory to be used in order to create the alignment object.
 void setCorrespondenceFactory(CorrespondenceFactory factory)
          Specifies the CorrespondenceFactory to be used in order to create correspondence objects.
 void setOntology1(OWLOntology ont1)
          Provide an ontology to be used as ontology 1 instead of parsing the location for the ontology in the document to be parsed.
 void setOntology1Document(InputStream is1)
          Provide a document for ontology 1 to be used instead of parsing the location for the ontology in the document to be parsed.
 void setOntology1Document(URL url1)
          Provide a document for ontology 1 to be used instead of parsing the location for the ontology in the document to be parsed.
 void setOntology2(OWLOntology ont2)
          Provide an ontology to be used as ontology 2 instead of parsing the location for the ontology in the document to be parsed.
 void setOntology2Document(InputStream is2)
          Provide a document for ontology 2 to be used instead of parsing the location for the ontology in the document to be parsed.
 void setOntology2Document(URL url2)
          Provide a document for ontology 2 to be used instead of parsing the location for the ontology in the document to be parsed.
 void setParsingLevel(ParsingLevel level)
          Sets the parsing level for the parsing process
 

Method Detail

parse

Alignment parse(File file)
                throws AlignmentParserException,
                       IllegalArgumentException,
                       FileNotFoundException
Parses an alignment and creates a new Alignment object.

Parameters:
File - representing the alignment to be parsed
Returns:
Parsing result as an Alignment object.
Throws:
AlignmentParserException - if a parsing problem occurs.
IllegalArgumentException
FileNotFoundException
Since:
1.0.1

parse

Alignment parse(String string)
                throws AlignmentParserException,
                       IllegalArgumentException,
                       FileNotFoundException
Parses an alignment and creates a new Alignment object.

Parameters:
String - representing the alignment to be parsed
Returns:
Parsing result as an Alignment object.
Throws:
AlignmentParserException - if a parsing problem occurs.
IllegalArgumentException
FileNotFoundException
Since:
1.0.1

parse

Alignment parse(URL url)
                throws AlignmentParserException,
                       IllegalArgumentException,
                       IOException
Parses an alignment and creates a new Alignment object.

Parameters:
URL - representing the alignment to be parsed
Returns:
Parsing result as an Alignment object.
Throws:
AlignmentParserException - if a parsing problem occurs.
IllegalArgumentException
IOException
Since:
1.0.1

parse

Alignment parse(Reader reader)
                throws AlignmentParserException,
                       IllegalArgumentException,
                       IOException
Parses an alignment and creates a new Alignment object.

Parameters:
Reader - representing the alignment to be parsed
Returns:
Parsing result as an Alignment object.
Throws:
AlignmentParserException - if a parsing problem occurs.
IllegalArgumentException
IOException
Since:
1.0.1

parse

Alignment parse(InputStream inputStream)
                throws AlignmentParserException,
                       IllegalArgumentException
Parses an alignment and creates a new Alignment object.

Parameters:
InputStream - representing the alignment to be parsed
Returns:
Parsing result as an Alignment object.
Throws:
AlignmentParserException - if a parsing problem occurs.
IllegalArgumentException
Since:
1.0.1

parse

Alignment parse(InputSource inputSource)
                throws AlignmentParserException
Parses an alignment and creates a new Alignment object.

Parameters:
InputSource - representing the alignment to be parsed
Returns:
Parsing result as an Alignment object.
Throws:
AlignmentParserException - if a parsing problem occurs.
Since:
1.0.1

setParsingLevel

void setParsingLevel(ParsingLevel level)
Sets the parsing level for the parsing process

Parameters:
Parsing - level used while parsing the alignment
Since:
1.0.1

setCorrespondenceFactory

void setCorrespondenceFactory(CorrespondenceFactory factory)
Specifies the CorrespondenceFactory to be used in order to create correspondence objects. Calling this method is optional, so the parser can be used without explicitly specifying a CorrespondenceFactory. In this case a default factory is used for creating correspondence objects.

Parameters:
factory - The CorrespondenceFactory to be used for creating correspondence objects.
Since:
1.0.0

setAlignmentFactory

void setAlignmentFactory(AlignmentFactory factory)
Specifies the AlignmentFactory to be used in order to create the alignment object. Calling this method is optional, so the parser can be used without explicitly specifying an AlignmentFactory. In this case a default factory is used for creating the alignment object.

Parameters:
factory - The AlignmentFactory to be used for creating the alignment object.
Since:
1.0.1

setOntology1Document

void setOntology1Document(URL url1)
                          throws IllegalArgumentException
Provide a document for ontology 1 to be used instead of parsing the location for the ontology in the document to be parsed.

Parameters:
url1 - The ontology 1 to be used provided as URL.
Throws:
IllegalArgumentException - if the ontology is null or cannot be loaded from provided URL.
Since:
1.2.0

setOntology2Document

void setOntology2Document(URL url2)
                          throws IllegalArgumentException
Provide a document for ontology 2 to be used instead of parsing the location for the ontology in the document to be parsed.

Parameters:
url2 - The ontology 2 to be used provided as URL.
Throws:
IllegalArgumentException - if the ontology is null or cannot be loaded from provided URL.
Since:
1.2.0

setOntology1Document

void setOntology1Document(InputStream is1)
                          throws IllegalArgumentException
Provide a document for ontology 1 to be used instead of parsing the location for the ontology in the document to be parsed.

Parameters:
is1 - The ontology 1 to be used provided as InputStream.
Throws:
IllegalArgumentException - if the ontology is null or cannot be loaded from provided Inputstream.
Since:
1.2.0

setOntology2Document

void setOntology2Document(InputStream is2)
                          throws IllegalArgumentException
Provide a document for ontology 2 to be used instead of parsing the location for the ontology in the document to be parsed.

Parameters:
is2 - The ontology 2 to be used provided as InputStream.
Throws:
IllegalArgumentException - if the ontology is null or cannot be loaded from provided Inputstream.
Since:
1.2.0

setOntology1

void setOntology1(OWLOntology ont1)
                  throws IllegalArgumentException
Provide an ontology to be used as ontology 1 instead of parsing the location for the ontology in the document to be parsed.

Parameters:
ont1 - The ontology 1 to be used.
Throws:
IllegalArgumentException - if the ontology is null.
Since:
1.2.0

setOntology2

void setOntology2(OWLOntology ont2)
                  throws IllegalArgumentException
Provide an ontology to be used as ontology 2 instead of parsing the location for the ontology in the document to be parsed.

Parameters:
ont2 - The ontology 2 to be used.
Throws:
IllegalArgumentException - if the ontology is null.
Since:
1.2.0


Copyright © 2012. All Rights Reserved.