public class AlignmentParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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 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
|
(package private) static org.slf4j.Logger |
logger |
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
|
Constructor and Description |
---|
AlignmentParser() |
AlignmentParser(int debugMode)
Creates a Parser.
|
Modifier and Type | Method and Description |
---|---|
private Alignment |
callParser(java.lang.Object o)
Parses the document given in parameter
If the current process has links (import or include) to others documents then they are
parsed.
|
private Alignment |
callParser(RDFParser p,
java.lang.Object o) |
private Alignment |
callParser(XMLParser p,
java.lang.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(java.io.InputStream s)
Parses an inputStream
|
Alignment |
parse(java.io.Reader r)
Parses a the content of a reader
|
Alignment |
parse(java.lang.String uri)
Parses a URI expressed as a String
|
Alignment |
parse(java.lang.String uri,
java.util.Hashtable<?,?> loaded)
Deprecated.
use parse( URI ) instead
|
Alignment |
parse(java.net.URI uri)
Parses a URI
|
Alignment |
parseString(java.lang.String s)
Parses the content of a string
|
void |
setEmbedded(boolean b) |
static final org.slf4j.Logger logger
protected Alignment alignment
protected int parseLevel
protected boolean embedded
protected int alignLevel
public AlignmentParser(int debugMode)
debugMode
- The value of the debug mode DEPRECATEDpublic AlignmentParser()
public void setEmbedded(boolean b)
@Deprecated public Alignment parse(java.lang.String uri, java.util.Hashtable<?,?> loaded) throws AlignmentException
uri:
- URI of the document to parseloaded:
- (cached ontologies)AlignmentException
- when something goes wrongprivate Alignment callParser(java.lang.Object o) throws AlignmentException
o:
- a URI, InputStream, String or Reader containing the alignmentAlignmentException
- when something goes wrongprivate Alignment callParser(XMLParser p, java.lang.Object o) throws AlignmentException
p:
- a parsero:
- a URI, InputStream, String or Reader containing the alignmentAlignmentException
- when something goes wrongprivate Alignment callParser(RDFParser p, java.lang.Object o) throws AlignmentException
AlignmentException
public Alignment parseString(java.lang.String s) throws AlignmentException
s:
- a string containing an alignmentAlignmentException
- when something goes wrongpublic Alignment parse(java.io.Reader r) throws AlignmentException
r
- the reader to parseAlignmentException
- when something goes wrongpublic Alignment parse(java.lang.String uri) throws AlignmentException
uri
- the URI as a StringAlignmentException
- when something goes wrong
This is only here for compatibility purposespublic Alignment parse(java.net.URI uri) throws AlignmentException
uri
- the URIAlignmentException
- when something goes wrongpublic Alignment parse(java.io.InputStream s) throws AlignmentException
s
- the Stream to parseAlignmentException
- when something goes wrongpublic 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.(C) INRIA & friends, 2003-2020