Interface DatumMetadataOperations
- All Superinterfaces:
Differentiable<DatumMetadataOperations>
- All Known Subinterfaces:
MutableDatumMetadataOperations
- All Known Implementing Classes:
GeneralDatumMetadata
- Since:
- 2.3
- Version:
- 1.0
- Author:
- matt
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleangetInfo()Get a general information metadata map.default ObjectGet the information metadata for a given key.default BigDecimalgetInfoBigDecimal(String key) Get a BigDecimal value from thegetInfo()map, or null if not available.default BigDecimalgetInfoBigDecimal(String property, String key) Get a BigDecimal value from thegetPropertyInfo(String)map, or null if not available.default BigIntegergetInfoBigInteger(String key) Get a BigInteger value from thegetInfo()map, or null if not available.default BigIntegergetInfoBigInteger(String property, String key) Get a BigInteger value from thegetPropertyInfo(String)map, or null if not available.default DoublegetInfoDouble(String key) Get a Double value from thegetInfo()map, or null if not available.default DoublegetInfoDouble(String property, String key) Get a Double value from thegetPropertyInfo(String)map, or null if not available.default FloatgetInfoFloat(String key) Get a Float value from thegetInfo()map, or null if not available.default FloatgetInfoFloat(String property, String key) Get a Float value from thegetPropertyInfo(String)map, or null if not available.default IntegergetInfoInteger(String key) Get an Integer value from thegetInfo()map, or null if not available.default IntegergetInfoInteger(String property, String key) Get an Integer value from thegetPropertyInfo(String)map, or null if not available.Get a set of all available info keys.default LonggetInfoLong(String key) Get a Long value from thegetInfo()map, or null if not available.default LonggetInfoLong(String property, String key) Get a Long value from thegetPropertyInfo(String)map, or null if not available.default NumbergetInfoNumber(String key) Get a Number value from thegetInfo()map, or null if not available.default NumbergetInfoNumber(String property, String key) Get a Number value from thegetPropertyInfo(String)map, or null if not available.default ShortgetInfoShort(String key) Get a Short value from thegetInfo()map, or null if not available.default ShortgetInfoShort(String property, String key) Get a Short value from thegetPropertyInfo(String)map, or null if not available.default StringgetInfoString(String key) Get a String value from thegetInfo()map, or null if not available.default StringgetInfoString(String property, String key) Get a String value from thegetPropertyInfo(String)map, or null if not available.getPropertyInfo(String key) Get the property information metadata map for a given key.Get a set of all available property info keys.getTags()Get the sample tags.default booleanTest if a given info key is available.default booleanTest if a given property info key is available.default booleanhasMetadataAtPath(String path) Test if metadata at a given path is available.default booleanhasPropertyInfo(String key) Test if a given property info key is available.default booleanTest if a given tag is set.default booleanisEmpty()Test if this metadata instance has no properties set.metadataAtPath(String path) Get a metadata value at a given path.<T> TmetadataAtPath(String path, Class<T> clazz) Get a metadata value of a given type at a given path.
-
Method Details
-
getInfoKeys
Get a set of all available info keys.- Returns:
- the set of keys, never null
-
getInfo
Get a general information metadata map.- Returns:
- the map of general information, or null
-
getInfo
Get the information metadata for a given key.- Parameters:
key- the info key to get the associated metadata value for- Returns:
- the value, or null
-
hasInfo
Test if a given info key is available.- Parameters:
key- the info key to look for- Returns:
- true if info for the given key has been set on this instance
-
getPropertyInfoKeys
Get a set of all available property info keys.- Returns:
- the set of property info keys, never null
-
getPropertyInfo
Get the property information metadata map for a given key.- Parameters:
key- the property key to get the metadata for- Returns:
- the property metadata, or null
-
hasPropertyInfo
Test if a given property info key is available.- Parameters:
key- the property info key to look for- Returns:
- true if property info for the given key has been set on this instance
-
hasInfo
Test if a given property info key is available.- Parameters:
property- the property namekey- the key of the value to get- Returns:
- true if info for the given property key has been set on this instance
-
getTags
Get the sample tags.- Returns:
- the tags, or null
-
hasTag
Test if a given tag is set.- Parameters:
tag- the tag to look for- Returns:
- true if the given tag has been set on this instance
-
isEmpty
default boolean isEmpty()Test if this metadata instance has no properties set.- Returns:
- true if there are no properties configured
-
differsFrom
- Specified by:
differsFromin interfaceDifferentiable<DatumMetadataOperations>
-
hasMetadataAtPath
Test if metadata at a given path is available.- Parameters:
path- the path of the metadata object to get- Returns:
- true if metadata for the given path is available on this instance
-
metadataAtPath
Get a metadata value at a given path.- Parameters:
path- the path of the metadata object to get- Returns:
- the metadata value, or null if none exists at the given path
- See Also:
-
metadataAtPath
Get a metadata value of a given type at a given path.The
pathsyntax is that of URL paths, using a / delimiter between nested metadata objects. The top-level path component must be one of /m forgetInfo()data, /pm forgetPropertyInfo(String)data, or /t forgetTags()data.For example, the path /m/foo would return the value associated with the "foo" key in the
Mapreturned fromgetInfo(). The path /pm/foo/bar would return the "bar" key in theMapassociated with the "foo" key in theMapreturned fromgetPropertyInfo(String).For tags, using the /t path will return the complete
Setof tags returned bygetTags(). If the path has another component, then the next component value will be returned if a tag matching that component value exists. For example the path /t/foo would return foo ifgetTags()contains foo, otherwise null.- Type Parameters:
T- the expected return type- Parameters:
path- the path of the metadata object to getclazz- the expected class of the return type- Returns:
- the metadata, or null if none exists at the given path
or is not of type
T
-
getInfoNumber
Get a Number value from thegetInfo()map, or null if not available.- Parameters:
key- the key of the value to get- Returns:
- the value as a Short, or null if not available
-
getInfoShort
Get a Short value from thegetInfo()map, or null if not available.- Parameters:
key- the key of the value to get- Returns:
- the value as a Short, or null if not available
-
getInfoInteger
Get an Integer value from thegetInfo()map, or null if not available.- Parameters:
key- the key of the value to get- Returns:
- the value as an Integer, or null if not available
-
getInfoLong
Get a Long value from thegetInfo()map, or null if not available.- Parameters:
key- the key of the value to get- Returns:
- the value as an Long, or null if not available
-
getInfoFloat
Get a Float value from thegetInfo()map, or null if not available.- Parameters:
key- the key of the value to get- Returns:
- the value as an Float, or null if not available
-
getInfoDouble
Get a Double value from thegetInfo()map, or null if not available.- Parameters:
key- the key of the value to get- Returns:
- the value as an Double, or null if not available
-
getInfoBigDecimal
Get a BigDecimal value from thegetInfo()map, or null if not available.- Parameters:
key- the key of the value to get- Returns:
- the value as an BigDecimal, or null if not available
-
getInfoBigInteger
Get a BigInteger value from thegetInfo()map, or null if not available.- Parameters:
key- the key of the value to get- Returns:
- the value as an BigInteger, or null if not available
-
getInfoString
Get a String value from thegetInfo()map, or null if not available.- Parameters:
key- the key of the value to get- Returns:
- the value as a String, or null if not available
-
getInfoNumber
Get a Number value from thegetPropertyInfo(String)map, or null if not available.- Parameters:
property- the property namekey- the key of the value to get- Returns:
- the value as a Number, or null if not available
-
getInfoShort
Get a Short value from thegetPropertyInfo(String)map, or null if not available.- Parameters:
property- the property namekey- the key of the value to get- Returns:
- the value as a Short, or null if not available
-
getInfoInteger
Get an Integer value from thegetPropertyInfo(String)map, or null if not available.- Parameters:
property- the property namekey- the key of the value to get- Returns:
- the value as an Integer, or null if not available
-
getInfoLong
Get a Long value from thegetPropertyInfo(String)map, or null if not available.- Parameters:
property- the property namekey- the key of the value to get- Returns:
- the value as an Long, or null if not available
-
getInfoFloat
Get a Float value from thegetPropertyInfo(String)map, or null if not available.- Parameters:
property- the property namekey- the key of the value to get- Returns:
- the value as an Float, or null if not available
-
getInfoDouble
Get a Double value from thegetPropertyInfo(String)map, or null if not available.- Parameters:
property- the property namekey- the key of the value to get- Returns:
- the value as an Double, or null if not available
-
getInfoBigDecimal
Get a BigDecimal value from thegetPropertyInfo(String)map, or null if not available.- Parameters:
property- the property namekey- the key of the value to get- Returns:
- the value as an BigDecimal, or null if not available
-
getInfoBigInteger
Get a BigInteger value from thegetPropertyInfo(String)map, or null if not available.- Parameters:
property- the property namekey- the key of the value to get- Returns:
- the value as an BigInteger, or null if not available
-
getInfoString
Get a String value from thegetPropertyInfo(String)map, or null if not available.- Parameters:
property- the property namekey- the key of the value to get- Returns:
- the value as a String, or null if not available
-