ReportMill 11 API

com.reportmill.datasource
Class RMSchema

java.lang.Object
  extended by com.reportmill.base.RMObject
      extended by com.reportmill.datasource.RMSchema
All Implemented Interfaces:
com.reportmill.base.RMPropertyChanger, java.lang.Cloneable

public class RMSchema
extends com.reportmill.base.RMObject

This class describes the structure of a datasource by managing a list of RMEntity.


Constructor Summary
RMSchema()
          Creates a new empty schema.
RMSchema(java.lang.String aName)
          Creates a new schema with the given name.
 
Method Summary
 void addEntity(RMEntity anEntity)
          Adds an entity to the list.
 void addEntity(RMEntity anEntity, int anIndex)
          Adds an entity to the list.
 RMSchema clone()
          Standard clone implementation.
 java.util.List<RMEntity> createEntities()
          Creates the entities list.
 RMEntity createRootEntity()
          Creates a root entity.
 boolean equals(java.lang.Object anObj)
          Standard equals implementation.
 RMSchema fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
          XML unarchival.
 java.util.List<RMEntity> getEntities()
          Returns the list of entities.
 RMEntity getEntity(int anIndex)
          Returns the specific entity at the given index.
 RMEntity getEntity(java.lang.String aName)
          Returns the schema entity with the given name.
 int getEntityCount()
          Returns the number of entities in this schema.
 java.lang.String getName()
          Returns the name of the entity.
 RMEntity getRootEntity()
          Returns the root entity.
 int indexOfEntity(RMEntity anEntity)
          Returns the index of a given entity.
 void mergeSchema(RMSchema aSchema)
          Merges a schema with this schema.
 RMEntity removeEntity(int anIndex)
          Removes an entity at given index.
 int removeEntity(RMEntity anEntity)
          Removes an entity from the list.
 void setEntities(java.util.List<RMEntity> aList)
          Sets the list of entities.
 void setName(java.lang.String aName)
          Sets the name of the entity.
 java.lang.String toString()
          Returns schema name.
 com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver, java.lang.Object anOwner)
          XML archival.
 
Methods inherited from class com.reportmill.base.RMObject
addListener, addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, getListener, getListenerCount, getListeners, isFirePropertyChangeEnabled, isUndoing, removeListener, removePropertyChangeListener, setFirePropertyChangeEnabled, setUndoing
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RMSchema

public RMSchema()
Creates a new empty schema.


RMSchema

public RMSchema(java.lang.String aName)
Creates a new schema with the given name.

Method Detail

getName

public java.lang.String getName()
Returns the name of the entity.


setName

public void setName(java.lang.String aName)
Sets the name of the entity.


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.


getEntities

public java.util.List<RMEntity> getEntities()
Returns the list of entities.


setEntities

public void setEntities(java.util.List<RMEntity> aList)
Sets the list of entities.


createEntities

public java.util.List<RMEntity> createEntities()
Creates the entities list.


addEntity

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


addEntity

public void addEntity(RMEntity anEntity,
                      int anIndex)
Adds an entity to the list.


removeEntity

public RMEntity removeEntity(int anIndex)
Removes an entity at given index.


removeEntity

public int removeEntity(RMEntity anEntity)
Removes an entity from the list.


getEntity

public RMEntity getEntity(java.lang.String aName)
Returns the schema entity with the given name.


indexOfEntity

public int indexOfEntity(RMEntity anEntity)
Returns the index of a given entity.


getRootEntity

public RMEntity getRootEntity()
Returns the root entity.


createRootEntity

public RMEntity createRootEntity()
Creates a root entity.


mergeSchema

public void mergeSchema(RMSchema aSchema)
Merges a schema with this schema.


equals

public boolean equals(java.lang.Object anObj)
Standard equals implementation.

Overrides:
equals in class java.lang.Object

clone

public RMSchema clone()
Standard clone implementation.

Overrides:
clone in class com.reportmill.base.RMObject

toString

public java.lang.String toString()
Returns schema name.

Overrides:
toString in class java.lang.Object

toXML

public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver,
                                               java.lang.Object anOwner)
XML archival.


fromXML

public RMSchema fromXML(com.reportmill.archiver.RXArchiver anArchiver,
                        com.reportmill.archiver.RXElement anElement,
                        java.lang.Object anOwner)
XML unarchival.


ReportMill 11 API