|
INRIA & UMontrŽal | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.DefaultHandler | +--fr.inrialpes.exmo.align.parser.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 BasicAlignment. |
protected OWLEntity |
cl1
the first entity of a cell |
protected OWLEntity |
cl2
the second entity of a cell |
protected java.lang.String |
content
the content found as text... |
protected int |
debugMode
level of debug/warning information |
protected java.lang.String |
measure
the measure content as text... |
(package private) OWLOntology |
onto1
the first Ontology |
(package private) OWLOntology |
onto2
the second Ontology |
protected java.util.Hashtable |
ontologies
The currently loaded ontologies |
protected javax.xml.parsers.SAXParser |
parser
XML Parser 1 |
protected java.lang.String |
relation
the relation content as text... |
protected java.lang.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(java.lang.String namespaceURI,
java.lang.String pName,
java.lang.String qName)
Called by the XML parser at the end of an element. |
private OWLEntity |
getEntity(OWLOntology ontology,
java.lang.String name)
|
private OWLOntology |
loadOntology(java.lang.String ref)
Can be used for loading the ontology if it is not available |
Alignment |
parse(java.lang.String uri,
java.util.Hashtable loaded)
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. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String pName,
java.lang.String qname,
org.xml.sax.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 |
protected int debugMode
protected java.lang.String uri
OWLOntology onto1
OWLOntology onto2
protected java.util.Hashtable ontologies
protected Alignment alignment
protected java.lang.String content
protected OWLEntity cl1
protected OWLEntity cl2
protected java.lang.String relation
protected java.lang.String measure
protected javax.xml.parsers.SAXParser parser
Constructor Detail |
public AlignmentParser(int debugMode) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
debugMode
- The value of the debug modeMethod Detail |
public Alignment parse(java.lang.String uri, java.util.Hashtable loaded) throws org.xml.sax.SAXException, java.io.IOException
uri
- URI of the document to parse
org.xml.sax.SAXException
java.io.IOException
public void startElement(java.lang.String namespaceURI, java.lang.String pName, java.lang.String qname, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.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
org.xml.sax.SAXException
private OWLEntity getEntity(OWLOntology ontology, java.lang.String name) throws OWLException, org.xml.sax.SAXException
OWLException
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length)
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
public void endElement(java.lang.String namespaceURI, java.lang.String pName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
namespaceURI
- The namespace of the current elementpName
- The local name of the current element
org.xml.sax.SAXException
private OWLOntology loadOntology(java.lang.String ref) throws org.xml.sax.SAXException
org.xml.sax.SAXException
|
INRIA & UMontrŽal | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |