|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.common.schema.model.constraint.property.Cardinality
@Immutable public class Cardinality
Specifies the cardinality for a property, default is for a property to occur exactly once.
Field Summary | |
---|---|
static Cardinality |
CC_ANY_NUMBER
Cardinality constraint for properties that occur in any number (zero to infinity) |
static Cardinality |
CC_AT_LEAST_ONCE
Cardinality constraint for properties that occur at least once (one to infinity) |
static Cardinality |
CC_EXACTLY_ONCE
Cardinality constraint for properties that occur exactly once (one) |
static Cardinality |
CC_OPTIONAL
Cardinality constraint for properties that occur once or not at all (zero to one) |
static long |
UNBOUNDED
Value for unrestricted maxOccurs |
Constructor Summary | |
---|---|
Cardinality()
Creates a default cardinality constraint with minOccurs and
maxOccurs one.NOTE: Instead of using the constructor to create new instances please use get(long, long) if possible. |
Method Summary | |
---|---|
static Cardinality |
get(long minOccurs,
long maxOccurs)
Get the cardinality constraint with the given occurrences |
long |
getMaxOccurs()
Get the number of maximum occurrences of a property |
long |
getMinOccurs()
Get the number of minimum occurrences of a property |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long UNBOUNDED
maxOccurs
public static final Cardinality CC_EXACTLY_ONCE
public static final Cardinality CC_OPTIONAL
public static final Cardinality CC_AT_LEAST_ONCE
public static final Cardinality CC_ANY_NUMBER
Constructor Detail |
---|
public Cardinality()
minOccurs
and
maxOccurs
one.get(long, long)
if possible.
Method Detail |
---|
public static Cardinality get(long minOccurs, long maxOccurs)
minOccurs
- the number of minimum occurrences of a property, may not
be negativemaxOccurs
- the number of maximum occurrences of a property,
-1L for an infinite maximum occurrence
public long getMinOccurs()
public long getMaxOccurs()
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |