|
Alignment API and Server 3.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
fr.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( uri ); This new version (January 2004) parses the alignment description in RDF/XML/OWL format
Field Summary | |
---|---|
protected Alignment |
alignment
the alignment that is parsed We always create a URIAlignment (we could also use a BasicAlignment). |
private static String |
ALIGNNS
|
protected Cell |
cell
the relation content as text... |
protected Object |
cl1
the first entity of a cell |
protected Object |
cl2
the second entity of a cell |
protected String |
content
the content found as text... |
(package private) Ontology |
curronto
|
protected int |
debugMode
level of debug/warning information |
protected Parameters |
extensions
Cell extensions (default null) |
protected String |
id
the cell id as text... |
protected String |
measure
the measure content as text... |
(package private) Ontology |
onto1
the first Ontology |
(package private) Ontology |
onto2
the second Ontology |
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 SAXParser |
parser
XML Parser 1 |
protected String |
relation
the relation content as text... |
protected String |
sem
the semantics of the cell (default first-order)... |
protected String |
uri
a URI to a process |
Constructor Summary | |
---|---|
AlignmentParser(int debugMode)
Creates an XML Parser. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
Put the content in a variable |
void |
endElement(String namespaceURI,
String pName,
String qName)
Called by the XML parser at the end of an element. |
private Object |
getEntity(Object ontology,
String name)
|
Alignment |
parse(String uri)
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. |
Alignment |
parse(String uri,
Hashtable loaded)
Deprecated. use parse( URI ) instead |
Alignment |
parseString(String s)
Parses a string instead of a URI |
void |
startElement(String namespaceURI,
String pName,
String qname,
Attributes atts)
Called by the XML parser at the begining of an element. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static String ALIGNNS
protected int debugMode
protected String uri
Ontology onto1
Ontology curronto
Ontology onto2
protected Alignment alignment
protected String content
protected Object cl1
protected Object cl2
protected Cell cell
protected String relation
protected String id
protected String sem
protected Parameters extensions
protected String measure
protected SAXParser parser
protected int parselevel
Constructor Detail |
---|
public AlignmentParser(int debugMode) throws ParserConfigurationException, SAXException
debugMode
- The value of the debug mode
ParserConfigurationException
SAXException
Method Detail |
---|
public Alignment parse(String uri, Hashtable loaded) throws SAXException, IOException, org.omwg.mediation.parser.rdf.RDFParserException
uri
- URI of the document to parseloaded
- should be replaced by OntologyCache (by useless)
SAXException
IOException
org.omwg.mediation.parser.rdf.RDFParserException
public Alignment parse(String uri) throws SAXException, IOException, org.omwg.mediation.parser.rdf.RDFParserException
uri
- URI of the document to parse
SAXException
IOException
org.omwg.mediation.parser.rdf.RDFParserException
public Alignment parseString(String s) throws SAXException, IOException, XPathExpressionException
s
- String the string to parse
SAXException
IOException
XPathExpressionException
public void startElement(String namespaceURI, String pName, String qname, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
namespaceURI
- The namespace of the current elementpName
- The local name of the current elementqname
- The name of the current elementatts
- The attributes name of the current element
SAXException
private Object getEntity(Object ontology, String name) throws SAXException
SAXException
public void characters(char[] ch, int start, int length)
characters
in interface ContentHandler
characters
in class DefaultHandler
public void endElement(String namespaceURI, String pName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class DefaultHandler
namespaceURI
- The namespace of the current elementpName
- The local name of the current elementqName
- The name of the current element
SAXException
|
Alignment API and Server 3.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |