org.apache.hivemind.schema.impl
Class SchemaImpl

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.hivemind.parse.BaseAnnotationHolder
          extended by org.apache.hivemind.schema.impl.SchemaImpl
All Implemented Interfaces:
Locatable, LocationHolder, AnnotationHolder, Schema
Direct Known Subclasses:
ElementModelImpl

public class SchemaImpl
extends BaseAnnotationHolder
implements Schema

Implementation of Schema.

Author:
Howard Lewis Ship

Constructor Summary
SchemaImpl()
           
 
Method Summary
 void addElementModel(ElementModel model)
           
 boolean canInstancesBeKeyed()
          Returns true if Elements conforming to this Schema can be indexed using a key.
 Module getDefiningModule()
          Return the Module in which the Schema was defined.
 java.util.List getElementModel()
          Returns a List of ElementModel, identifing the elements which may be enclosed by the modeled element.
 java.lang.String getId()
          Returns the (unqualified) id of this schema.
 java.lang.String getModuleId()
           
 Visibility getVisibility()
           
 void setId(java.lang.String id)
           
 void setModule(Module module)
           
 void setVisibility(Visibility visibility)
           
 void validateKeyAttributes()
          Called by the DescriptorParser to make sure that key attributes specified by the top-level elements actually are defined.
 boolean visibleToModule(java.lang.String moduleId)
          Returns true if the schema is visible to the specified module, false otherwise.
 
Methods inherited from class org.apache.hivemind.parse.BaseAnnotationHolder
getAnnotation, setAnnotation
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hivemind.parse.AnnotationHolder
getAnnotation, setAnnotation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

SchemaImpl

public SchemaImpl()
Method Detail

getModuleId

public java.lang.String getModuleId()
Since:
1.1

getId

public java.lang.String getId()
Description copied from interface: Schema
Returns the (unqualified) id of this schema.

Specified by:
getId in interface Schema
Since:
1.1

getVisibility

public Visibility getVisibility()
Since:
1.1

visibleToModule

public boolean visibleToModule(java.lang.String moduleId)
Description copied from interface: Schema
Returns true if the schema is visible to the specified module, false otherwise.

Specified by:
visibleToModule in interface Schema
Since:
1.1

addElementModel

public void addElementModel(ElementModel model)

getElementModel

public java.util.List getElementModel()
Description copied from interface: Schema
Returns a List of ElementModel, identifing the elements which may be enclosed by the modeled element.

The returned list is unmodifiabled and may be empty, but won't be null.

Specified by:
getElementModel in interface Schema

canInstancesBeKeyed

public boolean canInstancesBeKeyed()
Description copied from interface: Schema
Returns true if Elements conforming to this Schema can be indexed using a key. For this to be true every top-level ElementModel must define a non-null key attribute.

Specified by:
canInstancesBeKeyed in interface Schema

validateKeyAttributes

public void validateKeyAttributes()
Called by the DescriptorParser to make sure that key attributes specified by the top-level elements actually are defined.


setVisibility

public void setVisibility(Visibility visibility)
Since:
1.1

setModule

public void setModule(Module module)
Since:
1.1

setId

public void setId(java.lang.String id)
Since:
1.1

getDefiningModule

public Module getDefiningModule()
Description copied from interface: Schema
Return the Module in which the Schema was defined.

Specified by:
getDefiningModule in interface Schema
Since:
1.1