fr.reseaumexico.model.parser
Class XmlParser<M>

java.lang.Object
  extended by java.io.Reader
      extended by java.io.InputStreamReader
          extended by java.io.FileReader
              extended by fr.reseaumexico.model.parser.XmlParser<M>
All Implemented Interfaces:
Closeable, Readable
Direct Known Subclasses:
MexicoXmlParser

public abstract class XmlParser<M>
extends FileReader

Abstract parser to get model from xml file using XPP3

Since:
0.1
Author:
sletellier
See Also:
XmlPullParser

Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
XmlParser(File file)
           
 
Method Summary
 M getModel()
           
protected abstract  M parseModel(org.xmlpull.v1.XmlPullParser parser)
           
 boolean parserEqual(org.xmlpull.v1.XmlPullParser parser, String name)
           
 
Methods inherited from class java.io.InputStreamReader
close, getEncoding, read, read, ready
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlParser

public XmlParser(File file)
          throws FileNotFoundException
Throws:
FileNotFoundException
Method Detail

getModel

public M getModel()
           throws org.xmlpull.v1.XmlPullParserException,
                  IOException,
                  ParseException
Throws:
org.xmlpull.v1.XmlPullParserException
IOException
ParseException

parseModel

protected abstract M parseModel(org.xmlpull.v1.XmlPullParser parser)
                         throws IOException,
                                org.xmlpull.v1.XmlPullParserException,
                                ParseException
Throws:
IOException
org.xmlpull.v1.XmlPullParserException
ParseException

parserEqual

public boolean parserEqual(org.xmlpull.v1.XmlPullParser parser,
                           String name)


Copyright © 2011-2012 Code Lutin. All Rights Reserved.