public class GridSpec extends DataStructureSpec
Constructor and Description |
---|
GridSpec(org.w3c.dom.Element elem)
Construct a grid specification from an XML element
|
GridSpec(java.lang.String specName)
Construct an empty graph specification with the given name
|
Modifier and Type | Method and Description |
---|---|
void |
addTemplate(java.lang.String templateName)
Add the template by name to the set of templates used for cells in this
grid specification
|
java.util.List<java.lang.String> |
getCoordFields()
Get the sequence of coordinate fields for this grid.
|
int[] |
getDimensionSizes()
Get the dimension sizes for the grid
|
java.lang.String |
getName()
Get the name for the particular data structure
|
java.util.HashSet<java.lang.String> |
getTemplateNames()
Get the names of the templates identified for this specification.
|
void |
loadFromXml(org.w3c.dom.Element elem)
Load the Grid Specification from an XML element.
|
org.w3c.dom.Element |
toXml(org.w3c.dom.Document doc)
Convert this specification into XML format.
|
getTemplates, storeTemplates
public GridSpec(org.w3c.dom.Element elem)
elem
- the element containing the grid specificationpublic GridSpec(java.lang.String specName)
specName
- the name of the graph specificationpublic void addTemplate(java.lang.String templateName)
templateName
- the template namepublic java.util.List<java.lang.String> getCoordFields()
public int[] getDimensionSizes()
public java.lang.String getName()
getName
in class DataStructureSpec
public java.util.HashSet<java.lang.String> getTemplateNames()
getTemplateNames
in class DataStructureSpec
public void loadFromXml(org.w3c.dom.Element elem)
cellClass
, and may be a
space-separated sequence of template names. The coordFields
attribute specifies the fields which are used to specify the coordinates
for the grid elements.elem
- the element to parsepublic org.w3c.dom.Element toXml(org.w3c.dom.Document doc)
doc
- the document to use to create the elements