org.apache.hivemind.schema.impl
Class ElementModelImpl

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
              extended by org.apache.hivemind.schema.impl.ElementModelImpl
All Implemented Interfaces:
Locatable, LocationHolder, AnnotationHolder, ElementModel, Schema

public class ElementModelImpl
extends SchemaImpl
implements ElementModel

Implementation of ElementModel.

Author:
Howard Lewis Ship

Constructor Summary
ElementModelImpl()
           
 
Method Summary
 void addAttributeModel(AttributeModel attributeModel)
           
 void addRule(Rule rule)
           
 AttributeModel getAttributeModel(java.lang.String name)
           
 java.util.List getAttributeModels()
          Returns a List of AttributeModels.
 java.lang.String getContentTranslator()
          Returns the translator used for character content within the body of the element; may return null.
 java.lang.String getElementName()
          Returns the name of the element.
 java.lang.String getKeyAttribute()
          Returns the name of the attribute whose value can be used as a key for an instance of an Element with this ElementModel.
 java.util.List getRules()
          Returns a List of Rule.
 void setContentTranslator(java.lang.String string)
           
 void setElementName(java.lang.String string)
           
 void setKeyAttribute(java.lang.String keyAttribute)
           
 
Methods inherited from class org.apache.hivemind.schema.impl.SchemaImpl
addElementModel, canInstancesBeKeyed, getDefiningModule, getElementModel, getId, getModuleId, getVisibility, setId, setModule, setVisibility, validateKeyAttributes, visibleToModule
 
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.schema.ElementModel
getElementModel
 
Methods inherited from interface org.apache.hivemind.parse.AnnotationHolder
getAnnotation, setAnnotation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

ElementModelImpl

public ElementModelImpl()
Method Detail

getElementName

public java.lang.String getElementName()
Description copied from interface: ElementModel
Returns the name of the element.

Specified by:
getElementName in interface ElementModel

setElementName

public void setElementName(java.lang.String string)

addAttributeModel

public void addAttributeModel(AttributeModel attributeModel)

getAttributeModels

public java.util.List getAttributeModels()
Description copied from interface: ElementModel
Returns a List of AttributeModels. The List is unmodifiable and won't be null, but may be empty.

Specified by:
getAttributeModels in interface ElementModel

getAttributeModel

public AttributeModel getAttributeModel(java.lang.String name)
Specified by:
getAttributeModel in interface ElementModel

setKeyAttribute

public void setKeyAttribute(java.lang.String keyAttribute)

getKeyAttribute

public java.lang.String getKeyAttribute()
Description copied from interface: ElementModel
Returns the name of the attribute whose value can be used as a key for an instance of an Element with this ElementModel. This key is usually used to index a configuration contribution inside a Map.

Specified by:
getKeyAttribute in interface ElementModel

addRule

public void addRule(Rule rule)

getRules

public java.util.List getRules()
Description copied from interface: ElementModel
Returns a List of Rule. The List is unmodifiable and won't but null, but could be empty.

Specified by:
getRules in interface ElementModel

getContentTranslator

public java.lang.String getContentTranslator()
Description copied from interface: ElementModel
Returns the translator used for character content within the body of the element; may return null.

Specified by:
getContentTranslator in interface ElementModel

setContentTranslator

public void setContentTranslator(java.lang.String string)