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,- java.lang.Cloneable
 
 public class Schema extends RMObject implements RMJSONArchiver.GetKeys, Archivable This class describes the structure of a data source by managing a list of entities.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEntity(Entity anEntity)Adds an entity to the list.voidaddEntity(Entity anEntity, int anIndex)Adds an entity to the list.Schemaclone()Standard clone implementation.protected EntitycreateRootEntity()Creates a root entity.booleanequals(java.lang.Object anObj)Standard equals implementation.SchemafromXML(RXArchiver anArchiver, RXElement anElement)XML unarchival.java.util.List<Entity>getEntities()Returns the list of entities.EntitygetEntity(int anIndex)Returns the specific entity at the given index.EntitygetEntity(java.lang.String aName)Returns the schema entity with the given name.intgetEntityCount()Returns the number of entities in this schema.java.util.List<java.lang.String>getJSONKeys()Returns keys for JSON archival.java.lang.StringgetName()Returns the name of the entity.EntitygetRootEntity()Returns the root entity.WebSitegetSite()Returns the WebSite the schema works for.EntityremoveEntity(int anIndex)Removes an entity at given index.intremoveEntity(Entity anEntity)Removes an entity from the list.voidsetEntities(java.util.List<Entity> theEntities)Sets a list of entities.voidsetName(java.lang.String aName)Sets the name of the entity.voidsetSite(WebSite aSite)Sets the WebSite the schema works for.java.lang.StringtoString()Returns schema name.RXElementtoXML(RXArchiver anArchiver)XML archival.- 
Methods inherited from class com.inductiveautomation.rm.base.RMObjectaddPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
 - 
Methods inherited from class com.inductiveautomation.rm.base.RMListenerListaddListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
 
- 
 
- 
- 
- 
Method Detail- 
getNamepublic java.lang.String getName() Returns the name of the entity.
 - 
setNamepublic void setName(java.lang.String aName) Sets the name of the entity.
 - 
getSitepublic WebSite getSite() Returns the WebSite the schema works for.
 - 
setSitepublic void setSite(WebSite aSite) Sets the WebSite the schema works for.
 - 
getEntityCountpublic int getEntityCount() Returns the number of entities in this schema.
 - 
getEntitypublic Entity getEntity(int anIndex) Returns the specific entity at the given index.
 - 
getEntitiespublic java.util.List<Entity> getEntities() Returns the list of entities.
 - 
setEntitiespublic void setEntities(java.util.List<Entity> theEntities) Sets a list of entities.
 - 
addEntitypublic void addEntity(Entity anEntity) Adds an entity to the list.
 - 
addEntitypublic void addEntity(Entity anEntity, int anIndex) Adds an entity to the list.
 - 
removeEntitypublic Entity removeEntity(int anIndex) Removes an entity at given index.
 - 
removeEntitypublic int removeEntity(Entity anEntity) Removes an entity from the list.
 - 
getEntitypublic Entity getEntity(java.lang.String aName) Returns the schema entity with the given name.
 - 
getRootEntitypublic Entity getRootEntity() Returns the root entity.
 - 
createRootEntityprotected Entity createRootEntity() Creates a root entity.
 - 
equalspublic boolean equals(java.lang.Object anObj) Standard equals implementation.- Overrides:
- equalsin class- java.lang.Object
 
 - 
clonepublic Schema clone() Standard clone implementation.- Overrides:
- clonein class- RMListenerList
 
 - 
toXMLpublic RXElement toXML(RXArchiver anArchiver) XML archival.- Specified by:
- toXMLin interface- Archivable
 
 - 
fromXMLpublic Schema fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.- Specified by:
- fromXMLin interface- Archivable
 
 - 
getJSONKeyspublic java.util.List<java.lang.String> getJSONKeys() Returns keys for JSON archival.- Specified by:
- getJSONKeysin interface- RMJSONArchiver.GetKeys
 
 
- 
 
-