org.xerial.util.xml.index
Class DataGuide
java.lang.Object
org.xerial.util.xml.pullparser.AbstractSAXEventHandler
org.xerial.util.xml.index.DataGuide
- All Implemented Interfaces:
- SAXEventHandler
public class DataGuide
- extends AbstractSAXEventHandler
DataGuideを作成する
- Author:
- leo
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ROOT_TAG
public static final String ROOT_TAG
- See Also:
- Constant Field Values
DataGuide
public DataGuide()
getPathID
public int getPathID(SinglePath path)
- DataGuideをたどって、与えられたpathに該当するノードIDを得る
- Parameters:
path -
- Returns:
- ノードID. 該当するパスが存在しないときには-1
getTagID
public int getTagID(String tagName)
- DataGuide中のノードIDを返す
- Parameters:
tagName - タグの名前。attributeの場合は, @id のような形式
- Returns:
- node ID. タグに対応するノードが見つからない場合には、-1
newTag
public int newTag(String tagName)
throws XMLException
- Throws:
XMLException
newAttribute
public void newAttribute(String attributeName)
throws XMLException
- Throws:
XMLException
closeTag
public void closeTag()
init
public void init()
startDocument
public void startDocument(org.xmlpull.v1.XmlPullParser parser)
throws XMLException
- Specified by:
startDocument in interface SAXEventHandler- Overrides:
startDocument in class AbstractSAXEventHandler
- Throws:
XMLException
startTag
public void startTag(org.xmlpull.v1.XmlPullParser parser)
throws XMLException
- Specified by:
startTag in interface SAXEventHandler- Overrides:
startTag in class AbstractSAXEventHandler
- Throws:
XMLException
endTag
public void endTag(org.xmlpull.v1.XmlPullParser parser)
throws XMLException
- Specified by:
endTag in interface SAXEventHandler- Overrides:
endTag in class AbstractSAXEventHandler
- Throws:
XMLException
generateFrom
public void generateFrom(String xmlFile)
throws FileNotFoundException,
Exception,
IOException,
XerialException
- xml fileを読んでDataGuideを生成する。
- Parameters:
xmlFile -
- Throws:
FileNotFoundException
XMLParserException
XMLException
IOException
XerialException
Exception
generateFrom
public void generateFrom(Reader xmlReader)
throws Exception,
IOException,
XerialException
- readerからXMLを読み込んで、DataGuideを生成する
- Parameters:
xmlReader -
- Throws:
FileNotFoundException
XMLParserException
Exception
IOException
XerialException
outputGraphviz
public void outputGraphviz(OutputStream out)
main
public static void main(String[] args)
throws OptionParserException
- Throws:
OptionParserException

This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.