Package com.ribs.datasource
Class RMSchema
java.lang.Object
com.ribs.datasource.RMSchema
This class describes the structure of a datasource by managing a list of RMEntity.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an entity to the list.fromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival.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.getName()
Returns the schema name.static RMProperty
getRelation
(RMEntity anEntity, String aKeyPath) Returns the relation for the given key path evaluated from the given entity.Returns the root entity.void
removeEntity
(RMEntity anEntity) Removes an entity from the list.void
Sets the schema name.toString()
Returns schema name.toXML
(RXArchiver anArchiver) XML archival.
-
Constructor Details
-
RMSchema
public RMSchema()Creates a new empty schema. -
RMSchema
Creates a new schema with the given name.
-
-
Method Details
-
getName
Returns the schema name. -
setName
Sets the schema name. -
getEntityCount
public int getEntityCount()Returns the number of entities in this schema. -
getEntity
Returns the specific entity at the given index. -
addEntity
Adds an entity to the list. -
removeEntity
Removes an entity from the list. -
getEntity
Returns the schema entity with the given name. -
getRootEntity
Returns the root entity. -
getRelation
Returns the relation for the given key path evaluated from the given entity. -
toString
Returns schema name. -
toXML
XML archival. -
fromXML
XML unarchival.
-