Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.schema.model.constraint.type
Class HasValueFlag

java.lang.Object
  extended by eu.esdihumboldt.hale.common.schema.model.constraint.AbstractFlagConstraint
      extended by eu.esdihumboldt.hale.common.schema.model.constraint.type.HasValueFlag
All Implemented Interfaces:
TypeConstraint

@Immutable
public class HasValueFlag
extends AbstractFlagConstraint
implements TypeConstraint

Flags if a type has a direct value, apart from eventual properties, defined by the schema. By default enabled for TypeDefinitions that have no properties, otherwise disabled by default.

The Binding constraint defines the Java binding for the value.

Author:
Simon Templer
See Also:
Binding, AugmentedValueFlag

Field Summary
static HasValueFlag DISABLED
          Disabled has value flag
static HasValueFlag ENABLED
          Enabled has value flag
 
Constructor Summary
HasValueFlag()
          Creates a default simple type flag, which is disabled.
HasValueFlag(TypeDefinition typeDef)
          Creates a default simple type flag from a type definition.
 
Method Summary
static HasValueFlag get(boolean hasValue)
          Get the simple type flag
 boolean isInheritable()
          Determines if the constraint is inheritable, meaning it may be used for a sub-type.
 
Methods inherited from class eu.esdihumboldt.hale.common.schema.model.constraint.AbstractFlagConstraint
isEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENABLED

public static final HasValueFlag ENABLED
Enabled has value flag


DISABLED

public static final HasValueFlag DISABLED
Disabled has value flag

Constructor Detail

HasValueFlag

public HasValueFlag()
Creates a default simple type flag, which is disabled. If possible, instead of creating an instance, use ENABLED or DISABLED.

See Also:
Constraint

HasValueFlag

public HasValueFlag(TypeDefinition typeDef)
Creates a default simple type flag from a type definition. The flag is enabled if the type has no properties.

Parameters:
typeDef - the type definition
See Also:
Constraint
Method Detail

get

public static HasValueFlag get(boolean hasValue)
Get the simple type flag

Parameters:
hasValue - if the flag shall be enabled
Returns:
the flag

isInheritable

public boolean isInheritable()
Description copied from interface: TypeConstraint
Determines if the constraint is inheritable, meaning it may be used for a sub-type. A constraint may only be inherited if it is not overriden in the sub-type.

Specified by:
isInheritable in interface TypeConstraint
Returns:
if the constraint is inheritable
See Also:
TypeConstraint.isInheritable()

Humboldt Alignment Editor 2.5.0

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