|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectarcade.mod.model.XMLModel
public class XMLModel
Model created from an XML file. The ResourceNodes are created from the Elements of the DOM parsed Document.
Constructor Summary | |
---|---|
XMLModel(java.io.File file)
Creates a new instance of XMLModel from a given file |
|
XMLModel(java.lang.String pathName)
Creates a new instance of XMLModel from a filePath |
Method Summary | |
---|---|
java.util.Collection<java.lang.String> |
getCategories()
Returns a collection of strings which are all available categories in the XML file |
java.util.List<IResourceNode> |
getResourcesFromCategory(java.lang.String category)
Return the ResourceNodes that exist as children of a category |
void |
writeResources(java.io.File file)
Write resources to a specified file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLModel(java.lang.String pathName) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
pathName
- of the file from which to create the new XMLModel
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
public XMLModel(java.io.File file) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
file
- from which to create the new XMLModel
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
Method Detail |
---|
public java.util.Collection<java.lang.String> getCategories()
getCategories
in interface IModel
public java.util.List<IResourceNode> getResourcesFromCategory(java.lang.String category)
getResourcesFromCategory
in interface IModel
string
- category which is the category from which to draw children
public void writeResources(java.io.File file)
writeResources
in interface IModel
File
- on which to write resources
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |