com.indexdata.torus2.model
Class Record

java.lang.Object
  extended by com.indexdata.torus2.model.Record
All Implemented Interfaces:
DOMSerializable, XMLSerializable

public class Record
extends Object
implements DOMSerializable, XMLSerializable

Author:
jakub

Nested Class Summary
static class Record.Layer
           
 
Constructor Summary
Record(String type, String parentId)
           
Record(String type, String parentId, Record.Layer layer)
           
 
Method Summary
 Record.Layer addLayer(Record.Layer layer)
           
 Record.Layer addLayer(String name)
           
static Record fromDOM(Element root, String type)
           
 Date getLastModified()
           
 Record.Layer getLayer(String layerName)
           
 List<Record.Layer> getLayers()
           
 String getParentId()
           
 String getType()
           
 boolean hideLayer(String layerName)
           
 void setLastModified(Date lastModified)
           
 Record setLayer(Record.Layer layer)
           
 boolean showLayer(String layerName)
           
 Element toDOM(Element parent)
          Serializes object to a DOM Tree and returns the root element for that Tree.
 void toXML(XMLWriter xw)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Record

public Record(String type,
              String parentId)

Record

public Record(String type,
              String parentId,
              Record.Layer layer)
Method Detail

getType

public String getType()

getParentId

public String getParentId()

setLastModified

public void setLastModified(Date lastModified)

getLastModified

public Date getLastModified()

hideLayer

public boolean hideLayer(String layerName)

showLayer

public boolean showLayer(String layerName)

getLayer

public Record.Layer getLayer(String layerName)

setLayer

public Record setLayer(Record.Layer layer)

addLayer

public Record.Layer addLayer(String name)

addLayer

public Record.Layer addLayer(Record.Layer layer)

getLayers

public List<Record.Layer> getLayers()

toXML

public void toXML(XMLWriter xw)
Specified by:
toXML in interface XMLSerializable

toDOM

public Element toDOM(Element parent)
Description copied from interface: DOMSerializable
Serializes object to a DOM Tree and returns the root element for that Tree. If parentElement is null this method creates a new Document on it's own.

Specified by:
toDOM in interface DOMSerializable
Returns:

fromDOM

public static Record fromDOM(Element root,
                             String type)
                      throws MalformedInputException
Throws:
MalformedInputException


Copyright © 2008-2013 Index Data. All Rights Reserved.