Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.schema.model.impl
Class DefaultPropertyDefinition

java.lang.Object
  extended by eu.esdihumboldt.hale.common.schema.model.impl.AbstractDefinition<C>
      extended by eu.esdihumboldt.hale.common.schema.model.impl.AbstractChildDefinition<PropertyConstraint>
          extended by eu.esdihumboldt.hale.common.schema.model.impl.DefaultPropertyDefinition
All Implemented Interfaces:
Locatable, ChildDefinition<PropertyConstraint>, Definition<PropertyConstraint>, PropertyDefinition, Comparable<Definition<?>>
Direct Known Subclasses:
LazyPropertyDefinition, SubstitutionProperty

public class DefaultPropertyDefinition
extends AbstractChildDefinition<PropertyConstraint>
implements PropertyDefinition

Default PropertyDefinition implementation

Author:
Simon Templer

Field Summary
 
Fields inherited from class eu.esdihumboldt.hale.common.schema.model.impl.AbstractDefinition
name
 
Constructor Summary
DefaultPropertyDefinition(QName name, DefinitionGroup parentGroup, TypeDefinition propertyType)
          Create a new property and add it to the parent group
 
Method Summary
 GroupPropertyDefinition asGroup()
          Return as a group definition is possible.
 PropertyDefinition asProperty()
          Return as a property definition is possible.
 String getDescription()
          Get the definition description
 TypeDefinition getPropertyType()
          Get the type associated with the property
 String toString()
           
 
Methods inherited from class eu.esdihumboldt.hale.common.schema.model.impl.AbstractChildDefinition
getDeclaringGroup, getIdentifier, getParentType
 
Methods inherited from class eu.esdihumboldt.hale.common.schema.model.impl.AbstractDefinition
compareTo, equals, getConstraint, getDisplayName, getInheritedConstraint, getLocation, getName, hasConstraint, hashCode, setConstraint, setConstraintIfNotSet, setDescription, setLocation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface eu.esdihumboldt.hale.common.schema.model.ChildDefinition
getDeclaringGroup, getParentType
 
Methods inherited from interface eu.esdihumboldt.hale.common.schema.model.Definition
getConstraint, getDisplayName, getIdentifier, getName
 
Methods inherited from interface eu.esdihumboldt.hale.common.core.io.supplier.Locatable
getLocation
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

DefaultPropertyDefinition

public DefaultPropertyDefinition(QName name,
                                 DefinitionGroup parentGroup,
                                 TypeDefinition propertyType)
Create a new property and add it to the parent group

Parameters:
name - the property qualified name
parentGroup - the parent group
propertyType - the property type
Method Detail

getPropertyType

public TypeDefinition getPropertyType()
Description copied from interface: PropertyDefinition
Get the type associated with the property

Specified by:
getPropertyType in interface PropertyDefinition
Returns:
the property type
See Also:
PropertyDefinition.getPropertyType()

getDescription

public String getDescription()
Description copied from interface: Definition
Get the definition description

Specified by:
getDescription in interface Definition<PropertyConstraint>
Overrides:
getDescription in class AbstractDefinition<PropertyConstraint>
Returns:
the description string or null
See Also:
AbstractDefinition.getDescription()

toString

public String toString()
Overrides:
toString in class AbstractDefinition<PropertyConstraint>
See Also:
AbstractDefinition.toString()

asProperty

public PropertyDefinition asProperty()
Description copied from interface: ChildDefinition
Return as a property definition is possible. This is convenience for avoiding casts and instanceof expressions when handling children.

Specified by:
asProperty in interface ChildDefinition<PropertyConstraint>
Returns:
a property definition if this child definition is one, otherwise null
See Also:
ChildDefinition.asProperty()

asGroup

public GroupPropertyDefinition asGroup()
Description copied from interface: ChildDefinition
Return as a group definition is possible. This is convenience for avoiding casts and instanceof expressions when handling children.

Specified by:
asGroup in interface ChildDefinition<PropertyConstraint>
Returns:
a group definition if this child definition is one, otherwise null
See Also:
ChildDefinition.asGroup()

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d