Class DateTimeMetadata
java.lang.Object
net.okapia.osid.jamocha.metadata.spi.AbstractMetadata
net.okapia.osid.jamocha.metadata.spi.AbstractDateTimeMetadata
net.okapia.osid.jamocha.metadata.DateTimeMetadata
- All Implemented Interfaces:
Metadata
Defines a datetime Metadata.
-
Constructor Summary
ConstructorsConstructorDescriptionDateTimeMetadata(Id elementId) Constructs a new single unlinkedDateTimeMetadata.DateTimeMetadata(Id elementId, boolean isArray) Constructs a new unlinkedDateTimeMetadata.DateTimeMetadata(Id elementId, boolean isArray, boolean isLinked) Constructs a newDateTimeMetadata. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCalendarType(Type calendarType) Add support for a calendar type.voidaddDefaultDateTimeValue(DateTime value) Adds a default date time value.voidaddDefaultDateTimeValues(Collection<DateTime> values) Adds a collection of default date time values.voidaddExistingDateTimeValue(DateTime value) Adds a existing date time value.voidaddExistingDateTimeValues(Collection<DateTime> values) Adds a collection of existing date time values.voidaddTimeType(Type timeType) Add support for a time type.voidaddToDateTimeSet(Collection<DateTime> values) Adds a collection of values to the datetime set.voidaddToDateTimeSet(DateTime value) Adds a value to the datetime set.voidClears the datetime set.voidClears the default date time values.voidClears the existing date time values.voidRemoves a default date time value.voidRemoves a existing date time value.voidremoveFromDateTimeSet(DateTime value) Removes a value from the datetime set.voidsetDateTimeRange(DateTime min, DateTime max) Sets the min and max datetimes.voidsetDateTimeSet(Collection<DateTime> values) Sets the datetime set.voidsetDefaultDateTimeValues(Collection<DateTime> values) Sets the default date time set.voidsetExistingDateTimeValues(Collection<DateTime> values) Sets the existing date time set.voidsetInstructions(DisplayText instructions) Sets the instructions.voidsetLabel(DisplayText label) Sets the element label.voidsetReadOnly(boolean readonly) Sets the read only flag.voidsetRequired(boolean required) Sets the required flag.voidsetResolution(DateTimeResolution resolution) Sets the resolution.voidsetUnits(DisplayText units) Sets the units.voidsetValueExists(boolean exists) Sets the has value flag.Methods inherited from class AbstractDateTimeMetadata
getCalendarTypes, getDateTimeResolution, getDateTimeSet, getDefaultDateTimeValues, getExistingDateTimeValues, getMaximumDateTime, getMinimumDateTime, getTimeTypes, supportsCalendarType, supportsTimeTypeModifier and TypeMethodDescriptionType[]Gets the set of acceptable calendar types.Gets the smallest resolution of the date time value.DateTime[]Gets the set of acceptable datetime values.DateTime[]Gets the default date time values.DateTime[]Gets the existing date time values.Gets the maximum datetime value.Gets the minimum datetime value.Type[]Gets the set of acceptable time types.booleansupportsCalendarType(Type calendarType) Tests if the given calendar type is supported.booleansupportsTimeType(Type timeType) Tests if the given time type is supported.Methods inherited from class AbstractMetadata
getAxesForCoordinateType, getAxesForHeadingType, getCardinalSet, getCoordinateSet, getCoordinateTypes, getCurrencySet, getCurrencyTypes, getDecimalScale, getDecimalSet, getDefaultCardinalValues, getDefaultCoordinateValues, getDefaultCurrencyValues, getDefaultDecimalValues, getDefaultDistanceValues, getDefaultDurationValues, getDefaultHeadingValues, getDefaultIdValues, getDefaultIntegerValues, getDefaultObjectValues, getDefaultSpatialUnitValues, getDefaultSpeedValues, getDefaultStringValues, getDefaultTimeValues, getDefaultTypeValues, getDefaultVersionValues, getDistanceResolution, getDistanceSet, getDurationSet, getElementId, getElementLabel, getExistingCardinalValues, getExistingCoordinateValues, getExistingCurrencyValues, getExistingDecimalValues, getExistingDistanceValues, getExistingDurationValues, getExistingHeadingValues, getExistingIdValues, getExistingIntegerValues, getExistingObjectValues, getExistingSpatialUnitValues, getExistingSpeedValues, getExistingStringValues, getExistingTimeValues, getExistingTypeValues, getExistingVersionValues, getHeadingSet, getHeadingTypes, getIdSet, getInstructions, getIntegerSet, getMaximumCardinal, getMaximumCoordinateValues, getMaximumCurrency, getMaximumDecimal, getMaximumDistance, getMaximumDuration, getMaximumElements, getMaximumHeadingValues, getMaximumInteger, getMaximumSpeed, getMaximumStringLength, getMaximumTime, getMaximumVersion, getMinimumCardinal, getMinimumCoordinateValues, getMinimumCurrency, getMinimumDecimal, getMinimumDistance, getMinimumDuration, getMinimumElements, getMinimumHeadingValues, getMinimumInteger, getMinimumSpeed, getMinimumStringLength, getMinimumTime, getMinimumVersion, getObjectSet, getObjectTypes, getSpatialUnitRecordTypes, getSpatialUnitSet, getSpeedSet, getStringExpression, getStringFormatTypes, getStringMatchTypes, getStringSet, getSyntax, getTimeSet, getTypeSet, getUnits, getVersionSet, getVersionTypes, hasValue, isArray, isLinked, isReadOnly, isRequired, isValueKnown, setNumberElements, setValueKnown, supportsCoordinateType, supportsCurrencyType, supportsHeadingType, supportsObjectType, supportsSpatialUnitRecordType, supportsStringMatchType, supportsVersionTypeModifier and TypeMethodDescriptionlonggetAxesForCoordinateType(Type coordinateType) Gets the number of axes for a given supported coordinate type.longgetAxesForHeadingType(Type headingType) Gets the number of axes for a given supported heading type.long[]Gets the set of acceptable cardinal values.Gets the set of acceptable coordinate values.Type[]Gets the set of acceptable coordinate types.Currency[]Gets the set of acceptable currency values.Type[]Gets the set of acceptable currency types.longGets the number of digits to the right of the decimal point.Gets the set of acceptable decimal values.long[]Gets the default cardinal values.Gets the default coordinate values.Currency[]Gets the default currency values.Gets the default decimal values.Distance[]Gets the default distance values.Duration[]Gets the default duration values.Heading[]Gets the default heading values.Id[]Gets the defaultIdvalues.long[]Gets the default integer values.Object[]Gets the default object values.Deprecated.spatial units are deprecated in the OSID specificationSpeed[]Gets the default speed values.String[]Gets the default string values.Time[]Gets the default time values.Type[]Gets the default type values.Version[]Gets the default version values.Gets the smallest resolution of the distance value.Distance[]Gets the set of acceptable distance values.Duration[]Gets the set of acceptable duration values.final IdGets a uniqueIdfor the data element.final DisplayTextGets a display label for the data element.long[]Gets the existing cardinal values.Gets the existing coordinate values.Currency[]Gets the existing currency values.Gets the existing decimal values.Distance[]Gets the existing distance values.Duration[]Gets the existing duration values.Heading[]Gets the existing heading values.Id[]Gets the existingIdvalues.long[]Gets the existing integer values.Object[]Gets the existing object values.Deprecated.spatial units are deprecated in the OSID specificationSpeed[]Gets the existing speed values.String[]Gets the existing string values.Time[]Gets the existing time values.Type[]Gets the existing type values.Version[]Gets the existing version values.Heading[]Gets the set of acceptable heading values.Type[]Gets the set of acceptable heading types.Id[]getIdSet()Gets the set of acceptableIds.final DisplayTextGets instructions for updating this data.long[]Gets the set of acceptable integer values.longGets the maximum cardinal value.getMaximumCoordinateValues(Type coordinateType) Gets the maximum coordinate values given supported coordinate type.Gets the maximum currency value.Gets the maximum decimal value.Gets the maximum distance value.Gets the maximum duration.final longIn the case where an array or list of elements is specified in anOsidForm,this specifies the maximum number of elements that must be included.getMaximumHeadingValues(Type headingType) Gets the maximum heading values given supported heading type.longGets the maximum integer value.Gets the maximum speed value.longGets the maximum string length.Gets the maximum time value.Gets the maximum acceptableVersion.longGets the minimum cardinal value.getMinimumCoordinateValues(Type coordinateType) Gets the minimum coordinate values given supported coordinate type.Gets the minimum currency value.Gets the minimum decimal value.Gets the minimum distance value.Gets the minimum duration.final longIn the case where an array or list of elements is specified in anOsidForm,this specifies the minimum number of elements that must be included.getMinimumHeadingValues(Type headingType) Gets the minimum heading values given supported heading type.longGets the minimum integer value.Gets the minimum speed value.longGets the minimum string length.Gets the minimum time value.Gets the minumim acceptableVersion.Object[]Gets the set of acceptable object values.Type[]Gets the set of acceptableTypesfor an arbitrary object.Type[]Deprecated.spatial units are deprecated in the OSID specificationDeprecated.spatial units are deprecated in the OSID specificationSpeed[]Gets the set of acceptable speed values.getStringExpression(Type stringMatchType) Gets the regular expression of an acceptable string for the given string match type.Type[]Gets the set of valid string formats.Type[]Gets the set of valid string match types for use in validating a string.String[]Gets the set of acceptable string values.final SyntaxGets the syntax of this data.Time[]Gets the set of acceptable time values.Type[]Gets the set of acceptableTypes.final DisplayTextgetUnits()Gets the units of this data for display purposes ('lbs', 'gills', 'furlongs').Version[]Gets the set of acceptableVersions.Type[]Gets the set of acceptable version types.final booleanhasValue()Tests if this data element has a set non-default value.final booleanisArray()Tests if this data element is an array.final booleanisLinked()Tests if this data element is linked to other data in the object.final booleanTests if this data can be updated.final booleanTests if this data element is required for creating new objects.booleanTests if an existing value is known for this data element.protected voidsetNumberElements(long min, long max) Sets the minimum and maximum number of elements if an array.protected voidsetValueKnown(boolean known) Sets a flag that the value is known to exist or not exist.booleansupportsCoordinateType(Type coordinateType) Tests if the given coordinate type is supported.booleansupportsCurrencyType(Type currencyType) Tests if the given currency type is supported.booleansupportsHeadingType(Type headingType) Tests if the given heading type is supported.booleansupportsObjectType(Type objectType) Tests if the given object type is supported.booleansupportsSpatialUnitRecordType(Type spatialUnitRecordType) Deprecated.spatial units are deprecated in the OSID specificationbooleansupportsStringMatchType(Type stringMatchType) Tests if the given string match type is supported.booleansupportsVersionType(Type versionType) Tests if the given version type is supported.
-
Constructor Details
-
DateTimeMetadata
Constructs a new single unlinkedDateTimeMetadata.- Parameters:
elementId- the Id of the element- Throws:
NullArgumentException-elementIdisnull
-
DateTimeMetadata
Constructs a new unlinkedDateTimeMetadata.- Parameters:
elementId- the Id of the elementisArray-trueif the element is an array another element,falseif a single element- Throws:
NullArgumentException-elementIdisnull
-
DateTimeMetadata
Constructs a newDateTimeMetadata.- Parameters:
elementId- the Id of the elementisArray-trueif the element is an array another element,falseif a single elementisLinked-trueif the element is linked to another element,falseotherwise- Throws:
NullArgumentException-elementIdisnull
-
-
Method Details
-
setLabel
Sets the element label.- Overrides:
setLabelin classAbstractMetadata- Parameters:
label- the new element label- Throws:
NullArgumentException-labelisnull
-
setInstructions
Sets the instructions.- Overrides:
setInstructionsin classAbstractMetadata- Parameters:
instructions- the new instructions- Throws:
NullArgumentException-instructionsisnull
-
setRequired
public void setRequired(boolean required) Sets the required flag.- Overrides:
setRequiredin classAbstractMetadata- Parameters:
required-trueif required,falseif optional
-
setValueExists
public void setValueExists(boolean exists) Sets the has value flag.- Overrides:
setValueExistsin classAbstractMetadata- Parameters:
exists-trueif has existing value,falseif no value exists
-
setReadOnly
public void setReadOnly(boolean readonly) Sets the read only flag.- Overrides:
setReadOnlyin classAbstractMetadata- Parameters:
readonly-trueif read only,falseif can be updated
-
setUnits
Sets the units.- Overrides:
setUnitsin classAbstractMetadata- Parameters:
units- the new units- Throws:
NullArgumentException-unitsisnull
-
setResolution
Sets the resolution.- Overrides:
setResolutionin classAbstractDateTimeMetadata- Parameters:
resolution- the smallest resolution allowed- Throws:
NullArgumentException-resolutionisnull
-
addCalendarType
Add support for a calendar type.- Overrides:
addCalendarTypein classAbstractDateTimeMetadata- Parameters:
calendarType- the type of calendar- Throws:
NullArgumentException-calendarTypeisnull
-
addTimeType
Add support for a time type.- Overrides:
addTimeTypein classAbstractDateTimeMetadata- Parameters:
timeType- the type of time- Throws:
NullArgumentException-timeTypeisnull
-
setDateTimeRange
Sets the min and max datetimes.- Overrides:
setDateTimeRangein classAbstractDateTimeMetadata- Parameters:
min- the minimum valuemax- the maximum value- Throws:
InvalidArgumentException-minis greater thanmaxNullArgumentException-minormaxisnull
-
setDateTimeSet
Sets the datetime set.- Overrides:
setDateTimeSetin classAbstractDateTimeMetadata- Parameters:
values- a collection of accepted datetime values- Throws:
InvalidArgumentException- a value is negativeNullArgumentException-valuesisnull
-
addToDateTimeSet
Adds a collection of values to the datetime set.- Overrides:
addToDateTimeSetin classAbstractDateTimeMetadata- Parameters:
values- a collection of accepted datetime values- Throws:
NullArgumentException-valuesisnull
-
addToDateTimeSet
Adds a value to the datetime set.- Overrides:
addToDateTimeSetin classAbstractDateTimeMetadata- Parameters:
value- a datetime value- Throws:
NullArgumentException-valueisnull
-
removeFromDateTimeSet
Removes a value from the datetime set.- Overrides:
removeFromDateTimeSetin classAbstractDateTimeMetadata- Parameters:
value- a datetime value- Throws:
NullArgumentException-valueisnull
-
clearDateTimeSet
public void clearDateTimeSet()Clears the datetime set.- Overrides:
clearDateTimeSetin classAbstractDateTimeMetadata
-
setDefaultDateTimeValues
Sets the default date time set.- Overrides:
setDefaultDateTimeValuesin classAbstractDateTimeMetadata- Parameters:
values- a collection of default date time values- Throws:
InvalidArgumentException- a value is negativeNullArgumentException-valuesisnull
-
addDefaultDateTimeValues
Adds a collection of default date time values.- Overrides:
addDefaultDateTimeValuesin classAbstractDateTimeMetadata- Parameters:
values- a collection of default date time values- Throws:
NullArgumentException-valuesisnull
-
addDefaultDateTimeValue
Adds a default date time value.- Overrides:
addDefaultDateTimeValuein classAbstractDateTimeMetadata- Parameters:
value- a date time value- Throws:
NullArgumentException-valueisnull
-
removeDefaultDateTimeValue
Removes a default date time value.- Overrides:
removeDefaultDateTimeValuein classAbstractDateTimeMetadata- Parameters:
value- a date time value- Throws:
NullArgumentException-valueisnull
-
clearDefaultDateTimeValues
public void clearDefaultDateTimeValues()Clears the default date time values.- Overrides:
clearDefaultDateTimeValuesin classAbstractDateTimeMetadata
-
setExistingDateTimeValues
Sets the existing date time set.- Overrides:
setExistingDateTimeValuesin classAbstractDateTimeMetadata- Parameters:
values- a collection of existing date time values- Throws:
InvalidArgumentException- a value is negativeNullArgumentException-valuesisnull
-
addExistingDateTimeValues
Adds a collection of existing date time values.- Overrides:
addExistingDateTimeValuesin classAbstractDateTimeMetadata- Parameters:
values- a collection of existing date time values- Throws:
NullArgumentException-valuesisnull
-
addExistingDateTimeValue
Adds a existing date time value.- Overrides:
addExistingDateTimeValuein classAbstractDateTimeMetadata- Parameters:
value- a date time value- Throws:
NullArgumentException-valueisnull
-
removeExistingDateTimeValue
Removes a existing date time value.- Overrides:
removeExistingDateTimeValuein classAbstractDateTimeMetadata- Parameters:
value- a date time value- Throws:
NullArgumentException-valueisnull
-
clearExistingDateTimeValues
public void clearExistingDateTimeValues()Clears the existing date time values.- Overrides:
clearExistingDateTimeValuesin classAbstractDateTimeMetadata
-