com.dtolabs.shared.resources
Class ResourceXMLGenerator

java.lang.Object
  extended by com.dtolabs.shared.resources.ResourceXMLGenerator
All Implemented Interfaces:
NodesFileGenerator

public class ResourceXMLGenerator
extends java.lang.Object
implements NodesFileGenerator

ResourceXMLGenerator can generate a resources.xml file given a set of entities or INodeEntry objects.


Constructor Summary
ResourceXMLGenerator(java.io.File file)
          Constructor for the ResourceXMLGenerator
ResourceXMLGenerator(java.io.OutputStream output)
          Constructor for the ResourceXMLGenerator
 
Method Summary
 void addEntity(ResourceXMLParser.Entity entity)
          Add entity object
 void addNode(INodeEntry node)
          Add Node object
 void addNodes(java.util.Collection<INodeEntry> iNodeEntries)
          Add all Node objects
 void generate()
          Generate and store the XML file
 java.util.List<ResourceXMLParser.Entity> getEntities()
          Return entities list
 void setEntities(java.util.List<ResourceXMLParser.Entity> entities)
          Set entities list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceXMLGenerator

public ResourceXMLGenerator(java.io.File file)
Constructor for the ResourceXMLGenerator

Parameters:
file - destination output file

ResourceXMLGenerator

public ResourceXMLGenerator(java.io.OutputStream output)
Constructor for the ResourceXMLGenerator

Parameters:
file - destination output file
Method Detail

getEntities

public java.util.List<ResourceXMLParser.Entity> getEntities()
Return entities list

Returns:

setEntities

public void setEntities(java.util.List<ResourceXMLParser.Entity> entities)
Set entities list

Parameters:
entities -

addEntity

public void addEntity(ResourceXMLParser.Entity entity)
Add entity object

Parameters:
entity -

addNode

public void addNode(INodeEntry node)
Add Node object

Specified by:
addNode in interface NodesFileGenerator
Parameters:
node -

addNodes

public void addNodes(java.util.Collection<INodeEntry> iNodeEntries)
Description copied from interface: NodesFileGenerator
Add all Node objects

Specified by:
addNodes in interface NodesFileGenerator
Parameters:
iNodeEntries - the nodes

generate

public void generate()
              throws java.io.IOException
Generate and store the XML file

Specified by:
generate in interface NodesFileGenerator
Throws:
java.io.IOException