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 TypeMethodDescriptionvoidAdds an entity to the list.voidAdds an entity to the list.clone()Standard clone implementation.protected EntityCreates a root entity.booleanStandard 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.intReturns 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.intremoveEntity(Entity anEntity) Removes an entity from the list.voidsetEntities(List<Entity> theEntities) Sets a list of entities.voidSets the name of the entity.voidSets 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, sendPropertyChangeMethods 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:
clonein classRMListenerList
-
toXML
XML archival.- Specified by:
toXMLin interfaceArchivable
-
fromXML
XML unarchival.- Specified by:
fromXMLin interfaceArchivable
-
getJSONKeys
Returns keys for JSON archival.- Specified by:
getJSONKeysin interfaceRMJSONArchiver.GetKeys
-
toString
Returns schema name.
-