|
Alignment API and Server 4.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.inrialpes.exmo.align.parser.AlignmentParser
public class AlignmentParser
This class allows the creation of a parser for an Alignment file. The class is called by: AlignmentParser parser = new AlignmentParser( debugLevel ); Alignment alignment = parser.parse( input ); input can be a URI as a String, an InputStream This new version (January 2004) parses the alignment description in RDF/XML/OWL format and RDF format. It understands the EDOAL format.
Field Summary | |
---|---|
protected int |
alignLevel
The level at which we found the Alignment tag. |
protected Alignment |
alignment
the alignment that is parsed We always create a URIAlignment (we could also use a BasicAlignment). |
protected int |
debugMode
level of debug/warning information |
protected boolean |
embedded
The parsing level, if equal to 3 we are in the Alignment if equal to 5 we are in a cell and can find metadata |
protected int |
parseLevel
The parsing level, if equal to 3 we are in the Alignment if equal to 5 we are in a cell and can find metadata |
protected String |
uri
a URI to a process |
Constructor Summary | |
---|---|
AlignmentParser(int debugMode)
Creates a Parser. |
Method Summary | |
---|---|
private Alignment |
callParser(Object o)
Parses the document corresponding to the URI given in parameter If the current process has links (import or include) to others documents then they are parsed. |
private Alignment |
callParser(RDFParser p,
Object o)
|
private Alignment |
callParser(XMLParser p,
Object o)
This dispatch is ridiculous, but that's life |
void |
initAlignment(URIAlignment al)
Allows to have the parser filling an existing alignment instead of creating a new one |
Alignment |
parse(InputStream s)
Parses an inputStream |
Alignment |
parse(Reader r)
Parses a the content of a reader |
Alignment |
parse(String uri)
Parses a URI expressed as a String |
Alignment |
parse(String uri,
Hashtable loaded)
Deprecated. use parse( URI ) instead |
Alignment |
parse(URI uri)
Parses a URI |
Alignment |
parseString(String s)
Parses the content of a string |
void |
setEmbedded(boolean b)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int debugMode
protected String uri
protected Alignment alignment
protected int parseLevel
protected boolean embedded
protected int alignLevel
Constructor Detail |
---|
public AlignmentParser(int debugMode)
debugMode
- The value of the debug modeMethod Detail |
---|
public void setEmbedded(boolean b)
@Deprecated public Alignment parse(String uri, Hashtable loaded) throws AlignmentException
uri
- URI of the document to parseloaded
- (cached ontologies)
AlignmentException
private Alignment callParser(Object o) throws AlignmentException
uri
- URI of the document to parse
AlignmentException
private Alignment callParser(XMLParser p, Object o) throws AlignmentException
AlignmentException
private Alignment callParser(RDFParser p, Object o) throws AlignmentException
AlignmentException
public Alignment parseString(String s) throws AlignmentException
s
- String the string to parse
AlignmentException
public Alignment parse(Reader r) throws AlignmentException
r
- the reader to parse
AlignmentException
public Alignment parse(String uri) throws AlignmentException
uri
- the URI as a String
This is only here for compatibility purposes
AlignmentException
public Alignment parse(URI uri) throws AlignmentException
uri
- the URI
AlignmentException
public Alignment parse(InputStream s) throws AlignmentException
s
- the Stream to parse
AlignmentException
public void initAlignment(URIAlignment al)
al
- URIAlignment the alignment to be returned by the parser
Note that this function is also useful for reseting the parser
and using it once again by parser.initAlignment( null )
Otherwise, this may lead to errors.
|
Alignment API and Server 4.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |