Class RMSchema

java.lang.Object
com.ribs.datasource.RMSchema

public class RMSchema extends Object
This class describes the structure of a datasource by managing a list of RMEntity.
  • Constructor Details

    • RMSchema

      public RMSchema()
      Creates a new empty schema.
    • RMSchema

      public RMSchema(String aName)
      Creates a new schema with the given name.
  • Method Details

    • getName

      public String getName()
      Returns the schema name.
    • setName

      public void setName(String aName)
      Sets the schema name.
    • getEntityCount

      public int getEntityCount()
      Returns the number of entities in this schema.
    • getEntity

      public RMEntity getEntity(int anIndex)
      Returns the specific entity at the given index.
    • addEntity

      public void addEntity(RMEntity anEntity)
      Adds an entity to the list.
    • removeEntity

      public void removeEntity(RMEntity anEntity)
      Removes an entity from the list.
    • getEntity

      public RMEntity getEntity(String aName)
      Returns the schema entity with the given name.
    • getRootEntity

      public RMEntity getRootEntity()
      Returns the root entity.
    • getRelation

      public static RMProperty getRelation(RMEntity anEntity, String aKeyPath)
      Returns the relation for the given key path evaluated from the given entity.
    • toString

      public String toString()
      Returns schema name.
      Overrides:
      toString in class Object
    • toXML

      public RXElement toXML(RXArchiver anArchiver)
      XML archival.
    • fromXML

      public Object fromXML(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.