Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.instance.model.impl
Class DefaultGroup

java.lang.Object
  extended by eu.esdihumboldt.hale.common.instance.model.impl.DefaultGroup
All Implemented Interfaces:
Group, MutableGroup
Direct Known Subclasses:
DefaultInstance

public class DefaultGroup
extends Object
implements MutableGroup

Group implementation backed by a ListMultimap.

Author:
Simon Templer

Constructor Summary
DefaultGroup(DefinitionGroup definition)
          Create an empty group.
DefaultGroup(Group org)
          Copy constructor.
 
Method Summary
 void addProperty(QName propertyName, Object value)
          Adds a property value
 DefinitionGroup getDefinition()
          Get the group definition
 Object[] getProperty(QName propertyName)
          Get the values for the property with the given name.
 Iterable<QName> getPropertyNames()
          Get the property names for which any values exist.
 void setProperty(QName propertyName, Object... values)
          Sets values for a property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultGroup

public DefaultGroup(DefinitionGroup definition)
Create an empty group.

Parameters:
definition - the associated definition

DefaultGroup

public DefaultGroup(Group org)
Copy constructor. Creates a group based on the properties and values of the given group.

Parameters:
org - the instance to copy
Method Detail

getProperty

public Object[] getProperty(QName propertyName)
Description copied from interface: Group
Get the values for the property with the given name. Values can also be groups or instances.

Specified by:
getProperty in interface Group
Parameters:
propertyName - the property name
Returns:
the property values, may be null if none exist
See Also:
Group.getProperty(QName)

getPropertyNames

public Iterable<QName> getPropertyNames()
Description copied from interface: Group
Get the property names for which any values exist. Especially helpful when there is (for whatever reason) no type definition associated to the instance.

Specified by:
getPropertyNames in interface Group
Returns:
the list of property names with associated values
See Also:
Group.getPropertyNames()

getDefinition

public DefinitionGroup getDefinition()
Description copied from interface: Group
Get the group definition

Specified by:
getDefinition in interface Group
Returns:
the group definition
See Also:
Group.getDefinition()

addProperty

public void addProperty(QName propertyName,
                        Object value)
Description copied from interface: MutableGroup
Adds a property value

Specified by:
addProperty in interface MutableGroup
Parameters:
propertyName - the property name
value - the property value
See Also:
MutableGroup.addProperty(QName, Object)

setProperty

public void setProperty(QName propertyName,
                        Object... values)
Description copied from interface: MutableGroup
Sets values for a property

Specified by:
setProperty in interface MutableGroup
Parameters:
propertyName - the property name
values - the values for the property
See Also:
MutableGroup.setProperty(QName, Object[])

Humboldt Alignment Editor 2.5.0

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