public class Schema extends RMObject implements RMJSONArchiver.GetKeys, Archivable
Constructor and Description |
---|
Schema()
Creates a new empty schema.
|
Schema(java.lang.String aName)
Creates a new schema with the given name.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntity(Entity anEntity)
Adds an entity to the list.
|
void |
addEntity(Entity anEntity,
int anIndex)
Adds an entity to the list.
|
Schema |
clone()
Standard clone implementation.
|
protected Entity |
createRootEntity()
Creates a root entity.
|
boolean |
equals(java.lang.Object anObj)
Standard equals implementation.
|
Schema |
fromXML(RXArchiver anArchiver,
RXElement anElement)
XML unarchival.
|
java.util.List<Entity> |
getEntities()
Returns the list of entities.
|
Entity |
getEntity(int anIndex)
Returns the specific entity at the given index.
|
Entity |
getEntity(java.lang.String aName)
Returns the schema entity with the given name.
|
int |
getEntityCount()
Returns the number of entities in this schema.
|
java.util.List<java.lang.String> |
getJSONKeys()
Returns keys for JSON archival.
|
java.lang.String |
getName()
Returns the name of the entity.
|
Entity |
getRootEntity()
Returns the root entity.
|
WebSite |
getSite()
Returns the WebSite the schema works for.
|
int |
removeEntity(Entity anEntity)
Removes an entity from the list.
|
Entity |
removeEntity(int anIndex)
Removes an entity at given index.
|
void |
setEntities(java.util.List<Entity> theEntities)
Sets a list of entities.
|
void |
setName(java.lang.String aName)
Sets the name of the entity.
|
void |
setSite(WebSite aSite)
Sets the WebSite the schema works for.
|
java.lang.String |
toString()
Returns schema name.
|
RXElement |
toXML(RXArchiver anArchiver)
XML archival.
|
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
public Schema()
public Schema(java.lang.String aName)
public java.lang.String getName()
public void setName(java.lang.String aName)
public WebSite getSite()
public void setSite(WebSite aSite)
public int getEntityCount()
public Entity getEntity(int anIndex)
public java.util.List<Entity> getEntities()
public void setEntities(java.util.List<Entity> theEntities)
public void addEntity(Entity anEntity)
public void addEntity(Entity anEntity, int anIndex)
public Entity removeEntity(int anIndex)
public int removeEntity(Entity anEntity)
public Entity getEntity(java.lang.String aName)
public Entity getRootEntity()
protected Entity createRootEntity()
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public Schema clone()
clone
in class RMListenerList
public RXElement toXML(RXArchiver anArchiver)
toXML
in interface Archivable
public Schema fromXML(RXArchiver anArchiver, RXElement anElement)
fromXML
in interface Archivable
public java.util.List<java.lang.String> getJSONKeys()
getJSONKeys
in interface RMJSONArchiver.GetKeys