|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
nz.ac.waikato.mcennis.rat.parser.xmlHandler.Handler
nz.ac.waikato.bibliography.XMLParser.ParseBibliographyXML
public class ParseBibliographyXML
XML SAX parser for parsing a custom bibliography XML format with most of the
information inside a bibtex file containing journal entries.
The DTD of the XML file is as follows:
<!DOCTYPE bibliography [
<!ELEMENT bibliography (authorRef+,paper+)>
<!ELEMENT authorRef (authorName,authorID)>
<!ELEMENT authorName (#PCDATA)>
<!ELEMENT authorID (#PCDATA)>
<!ELEMENT paper (paperID,title,abstract,authorList,year,file,type,journal,referenceList,citationList,clusterId?)>
<!ELEMENT paperID (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT abstract (#PCDATA)>
<!ELEMENT authorList (author+)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT file (#PCDATA)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT journal (#PCDATA)>
<!ELEMENT referenceList (reference*)>
<!ELEMENT reference (#PCDATA)>
<!ELEMENT citationList (citation*)>
<!ELEMENT citation (#PCDATA)>
<!ELEMENT clusterId (#PCDATA)>
]>
| Constructor Summary | |
|---|---|
ParseBibliographyXML()
|
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
|
Handler |
duplicate()
Create a complete duplicate of this class |
void |
endDocument()
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
|
ParsedObject |
get()
Return the underlying parsed object |
java.lang.String |
getAuthorMode()
Return the mode used for authors of papers. |
java.lang.String |
getPaperMode()
Return the mode used for papers. |
java.lang.String |
getReferencesRelation()
return the relation for citation links |
java.lang.String |
getWroteRelation()
Return the relation for authorship links |
boolean |
isAddClusters()
Are subgraphs created from cluster designations in the XML file |
boolean |
isBiDirectionalReferences()
are created citations bidirectional |
void |
set(ParsedObject o)
Set the underlying parsed object for parsing |
void |
setAddClusters(boolean addClusters)
Sets whether subgraphs are created or not from cluster data in the bibligoraphic entry |
void |
setAuthorMode(java.lang.String authorMode)
Set the mode used for authors of papers. |
void |
setBiDirectionalReferences(boolean biDirectionalReferences)
Set whether citations are bidirectional |
void |
setPaperMode(java.lang.String paperMode)
Set the mode used for papers. |
void |
setReferencesRelation(java.lang.String referencesRelation)
Set the relation for citation links |
void |
setWroteRelation(java.lang.String wroteRelation)
Set the relation for authorship links |
void |
startDocument()
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
|
| Methods inherited from class nz.ac.waikato.mcennis.rat.parser.xmlHandler.Handler |
|---|
error, fatalError, setCrawler, warning |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ParseBibliographyXML()
| Method Detail |
|---|
public boolean isBiDirectionalReferences()
public void setBiDirectionalReferences(boolean biDirectionalReferences)
biDirectionalReferences - are citations bidirectionalpublic java.lang.String getAuthorMode()
public java.lang.String getPaperMode()
public java.lang.String getWroteRelation()
public java.lang.String getReferencesRelation()
public void setAuthorMode(java.lang.String authorMode)
authorMode - mode for authorspublic void setPaperMode(java.lang.String paperMode)
paperMode - mode for papers.public void setWroteRelation(java.lang.String wroteRelation)
wroteRelation - relation for authorshippublic void setReferencesRelation(java.lang.String referencesRelation)
referencesRelation - relation for citation linkspublic boolean isAddClusters()
public void setAddClusters(boolean addClusters)
addClusters - are subgraphs createdpublic ParsedObject get()
Handler
get in class Handlerpublic void set(ParsedObject o)
Handler
set in class Handlero - underlying parsed objectpublic Handler duplicate()
Handler
duplicate in class Handler
public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerendDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||