org.kuali.student.r1.common.assembly.data
Class MetadataInterrogator

java.lang.Object
  extended by org.kuali.student.r1.common.assembly.data.MetadataInterrogator

public class MetadataInterrogator
extends Object

Author:
nwright

Nested Class Summary
static class MetadataInterrogator.ConstraintIds
           
 
Constructor Summary
MetadataInterrogator(Metadata meta)
           
 
Method Summary
 Integer getLargestMinLength()
          get the largest min occurs value
static Integer getLargestMinLength(Metadata meta)
          get the largest min occurs value
 Integer getLargestMinOccurs()
          get the largest min occurs value
static Integer getLargestMinOccurs(Metadata meta)
          get the largest min occurs value
static Long getLargestMinValue(Metadata meta)
           
static Date getLargestMinValueDate(Metadata meta, DateParser parser, Object dataValue)
           
static Double getLargestMinValueDouble(Metadata meta)
           
static String getNextState(Metadata meta)
          Use to determine if the field is required for the next state.
 Integer getSmallestMaxLength()
           
static Integer getSmallestMaxLength(Metadata meta)
           
 Integer getSmallestMaxOccurs()
          checks if this field is a repeating field
static Integer getSmallestMaxOccurs(Metadata meta)
          Returns the smallest max occurs
static Long getSmallestMaxValue(Metadata meta)
           
static Date getSmallestMaxValueDate(Metadata meta, DateParser parser, Object dataValue)
           
static Double getSmallestMaxValueDouble(Metadata meta)
           
static boolean hasConstraint(Metadata meta, MetadataInterrogator.ConstraintIds id)
          Returns true if the metadata contains the specified constraint
static boolean hasConstraint(Metadata meta, String id)
          Returns true if the metadata contains the specified constraint
 boolean hasConstraint(String id)
          Returns true if the metadata contains the specified constraint
 boolean isMultilined()
           
static boolean isMultilined(Metadata meta)
           
 boolean isRepeating()
          checks if this field is a repeating field
static boolean isRepeating(Metadata meta)
          checks if this field is a repeating field
 boolean isRequired()
          checks if is required
static boolean isRequired(Metadata meta)
          checks if is required
static boolean isRequiredForNextState(Metadata meta)
          Use to determine if the field is required for the next state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataInterrogator

public MetadataInterrogator(Metadata meta)
Method Detail

hasConstraint

public boolean hasConstraint(String id)
Returns true if the metadata contains the specified constraint


isRequired

public boolean isRequired()
checks if is required

Returns:
true if any minOccurs > 1

getLargestMinOccurs

public Integer getLargestMinOccurs()
get the largest min occurs value

Returns:
null if none specified

isRepeating

public boolean isRepeating()
checks if this field is a repeating field

Returns:
true if the smallest maxOccurs is > 1

getSmallestMaxOccurs

public Integer getSmallestMaxOccurs()
checks if this field is a repeating field

Returns:
true if the smallest maxOccurs is > 1

getLargestMinLength

public Integer getLargestMinLength()
get the largest min occurs value

Returns:
null if none specified

getSmallestMaxLength

public Integer getSmallestMaxLength()

isMultilined

public boolean isMultilined()

hasConstraint

public static boolean hasConstraint(Metadata meta,
                                    MetadataInterrogator.ConstraintIds id)
Returns true if the metadata contains the specified constraint


hasConstraint

public static boolean hasConstraint(Metadata meta,
                                    String id)
Returns true if the metadata contains the specified constraint


isRequired

public static boolean isRequired(Metadata meta)
checks if is required

Returns:
true if any minOccurs > 1

isRequiredForNextState

public static boolean isRequiredForNextState(Metadata meta)
Use to determine if the field is required for the next state.

Parameters:
meta -
Returns:

getNextState

public static String getNextState(Metadata meta)
Use to determine if the field is required for the next state.

Parameters:
meta -
Returns:

getLargestMinOccurs

public static Integer getLargestMinOccurs(Metadata meta)
get the largest min occurs value

Returns:
null if none specified

isRepeating

public static boolean isRepeating(Metadata meta)
checks if this field is a repeating field

Returns:
true if the smallest maxOccurs is > 1

getSmallestMaxOccurs

public static Integer getSmallestMaxOccurs(Metadata meta)
Returns the smallest max occurs

Returns:
Returns the smallest of all maxOccurs, if maxOccurs defined in constraints. Returns -1, indicating unbounded repeating field, if repeating constraint defined & maxOccurs not defined. Returns null, indicating that this is a non-repeating field.

getLargestMinLength

public static Integer getLargestMinLength(Metadata meta)
get the largest min occurs value

Returns:
null if none specified

getSmallestMaxLength

public static Integer getSmallestMaxLength(Metadata meta)

isMultilined

public static boolean isMultilined(Metadata meta)

getLargestMinValue

public static Long getLargestMinValue(Metadata meta)

getSmallestMaxValue

public static Long getSmallestMaxValue(Metadata meta)

getLargestMinValueDouble

public static Double getLargestMinValueDouble(Metadata meta)

getSmallestMaxValueDouble

public static Double getSmallestMaxValueDouble(Metadata meta)

getLargestMinValueDate

public static Date getLargestMinValueDate(Metadata meta,
                                          DateParser parser,
                                          Object dataValue)

getSmallestMaxValueDate

public static Date getSmallestMaxValueDate(Metadata meta,
                                           DateParser parser,
                                           Object dataValue)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.