|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fzi.kadmos.parser.impl.INRIAFormatParser
public final class INRIAFormatParser
Parser that reads and parses the
INRIA alignment format
from an XML representation.
Instances of this parser can only be obtained by the #getInstance(Reader) method.
Each instance is immutably associated with a particular input source,
specified by a Reader. However, an existing instance can be modified
by specifying a particular CorrespondenceFactory.
The parser uses the SimpleCorrespondenceFactory for creating correspondence
objects in case no specific CorrespondenceFactory is set via
setCorrespondenceFactory(CorrespondenceFactory).
| Method Summary | |
|---|---|
static INRIAFormatParser |
getInstance()
Gets a (new) instance of this parser. |
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static INRIAFormatParser getInstance()
Reader
instance there can only be one parser instance.
reader - The Reader providing the input to be parsed.
public void setCorrespondenceFactory(CorrespondenceFactory factory)
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.
setCorrespondenceFactory in interface AlignmentParserfactory - The CorrespondenceFactory to be used
for creating correspondence objects.public void setAlignmentFactory(AlignmentFactory factory)
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.
setAlignmentFactory in interface AlignmentParserfactory - The AlignmentFactory to be used
for creating the alignment object.
public void setOntology1Document(URL url1)
throws IllegalArgumentException
setOntology1Document in interface AlignmentParserurl1 - The ontology 1 to be used provided as URL.
IllegalArgumentException - if the ontology is null or
cannot be loaded from provided URL.
public void setOntology2Document(URL url2)
throws IllegalArgumentException
setOntology2Document in interface AlignmentParserurl2 - The ontology 2 to be used provided as URL.
IllegalArgumentException - if the ontology is null or
cannot be loaded from provided URL.
public void setOntology1Document(InputStream is1)
throws IllegalArgumentException
setOntology1Document in interface AlignmentParseris1 - The ontology 1 to be used provided as InputStream.
IllegalArgumentException - if the ontology is null or cannot be loaded
from provided Inputstream.
public void setOntology2Document(InputStream is2)
throws IllegalArgumentException
setOntology2Document in interface AlignmentParseris2 - The ontology 2 to be used provided as InputStream.
IllegalArgumentException - if the ontology is null or cannot be loaded
from provided Inputstream.
public void setOntology1(OWLOntology ont1)
throws IllegalArgumentException
setOntology1 in interface AlignmentParseront1 - The ontology 1 to be used.
IllegalArgumentException - if the ontology is null.
public void setOntology2(OWLOntology ont2)
throws IllegalArgumentException
setOntology2 in interface AlignmentParseront2 - The ontology 2 to be used.
IllegalArgumentException - if the ontology is null.
public Alignment parse(File file)
throws AlignmentParserException,
IllegalArgumentException,
FileNotFoundException
Alignment object.
parse in interface AlignmentParserAlignment object.
AlignmentParserException - if a parsing problem occurs.
IllegalArgumentException
FileNotFoundException
public Alignment parse(String string)
throws AlignmentParserException,
IllegalArgumentException,
FileNotFoundException
Alignment object.
parse in interface AlignmentParserAlignment object.
AlignmentParserException - if a parsing problem occurs.
IllegalArgumentException
FileNotFoundException
public Alignment parse(URL url)
throws AlignmentParserException,
IllegalArgumentException,
IOException
Alignment object.
parse in interface AlignmentParserAlignment object.
AlignmentParserException - if a parsing problem occurs.
IllegalArgumentException
IOException
public Alignment parse(Reader reader)
throws AlignmentParserException,
IllegalArgumentException,
IOException
Alignment object.
parse in interface AlignmentParserAlignment object.
AlignmentParserException - if a parsing problem occurs.
IllegalArgumentException
IOException
public Alignment parse(InputStream inputStream)
throws AlignmentParserException,
IllegalArgumentException
Alignment object.
parse in interface AlignmentParserAlignment object.
AlignmentParserException - if a parsing problem occurs.
IllegalArgumentException
public Alignment parse(InputSource inputSource)
throws AlignmentParserException
Alignment object.
parse in interface AlignmentParserAlignment object.
AlignmentParserException - if a parsing problem occurs.public void setParsingLevel(ParsingLevel level)
setParsingLevel in interface AlignmentParser
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||