Class Schema
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.snap.data.Schema
- All Implemented Interfaces:
Archivable
,RMJSONArchiver.GetKeys
,RMPropertyChanger
,Cloneable
This class describes the structure of a data source by managing a list of entities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an entity to the list.void
Adds an entity to the list.clone()
Standard clone implementation.protected Entity
Creates a root entity.boolean
Standard equals implementation.fromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival.Returns the list of entities.getEntity
(int anIndex) Returns the specific entity at the given index.Returns the schema entity with the given name.int
Returns the number of entities in this schema.Returns keys for JSON archival.getName()
Returns the name of the entity.Returns the root entity.getSite()
Returns the WebSite the schema works for.removeEntity
(int anIndex) Removes an entity at given index.int
removeEntity
(Entity anEntity) Removes an entity from the list.void
setEntities
(List<Entity> theEntities) Sets a list of entities.void
Sets the name of the entity.void
Sets the WebSite the schema works for.toString()
Returns schema name.toXML
(RXArchiver anArchiver) XML archival.Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
Constructor Details
-
Schema
public Schema()Creates a new empty schema. -
Schema
Creates a new schema with the given name.
-
-
Method Details
-
getName
Returns the name of the entity. -
setName
Sets the name of the entity. -
getSite
Returns the WebSite the schema works for. -
setSite
Sets the WebSite the schema works for. -
getEntityCount
public int getEntityCount()Returns the number of entities in this schema. -
getEntity
Returns the specific entity at the given index. -
getEntities
Returns the list of entities. -
setEntities
Sets a list of entities. -
addEntity
Adds an entity to the list. -
addEntity
Adds an entity to the list. -
removeEntity
Removes an entity at given index. -
removeEntity
Removes an entity from the list. -
getEntity
Returns the schema entity with the given name. -
getRootEntity
Returns the root entity. -
createRootEntity
Creates a root entity. -
equals
Standard equals implementation. -
clone
Standard clone implementation.- Overrides:
clone
in classRMListenerList
-
toXML
XML archival.- Specified by:
toXML
in interfaceArchivable
-
fromXML
XML unarchival.- Specified by:
fromXML
in interfaceArchivable
-
getJSONKeys
Returns keys for JSON archival.- Specified by:
getJSONKeys
in interfaceRMJSONArchiver.GetKeys
-
toString
Returns schema name.
-