public enum ContainerType extends Enum<ContainerType>
METADATA_LIBRARY_OBJECT
allows the most variations of data, as
well as no size limitation (if it can be stored within a DWORD amount of
bytes).Enum Constant and Description |
---|
CONTENT_BRANDING
The descriptor is used in the content branding object (chunk)
|
CONTENT_DESCRIPTION
The descriptor is used in the content description object (chunk), so
maximum data length
applies, no language index and stream number are allowed, as well as no
multiple values.
|
EXTENDED_CONTENT
The descriptor is used in an extended content description object, so the
maximum data size applies,
and no language index and stream number other than "0" is
allowed.
|
METADATA_LIBRARY_OBJECT
The descriptor is used in a metadata library object.
|
METADATA_OBJECT
The descriptor is used in a metadata object.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
areInCorrectOrder(ContainerType low,
ContainerType high)
Determines if low has index as high, in respect to
getOrdered() |
void |
assertConstraints(String name,
byte[] data,
int type,
int stream,
int language)
Calls
checkConstraints(String, byte[], int, int, int) and
actually throws the exception if there is one. |
RuntimeException |
checkConstraints(String name,
byte[] data,
int type,
int stream,
int language)
Checks if the values for a content
descriptor match the contraints of the container type, and returns a
RuntimeException if the requirements aren't met. |
GUID |
getContainerGUID() |
BigInteger |
getMaximumDataLength() |
static ContainerType[] |
getOrdered()
Returns the elements in an order, that indicates more capabilities
(ascending).
|
boolean |
isGuidEnabled() |
boolean |
isLanguageEnabled() |
boolean |
isMultiValued() |
boolean |
isStreamNumberEnabled() |
boolean |
isWithinValueRange(long value)
Tests if the given value is less than or equal to
getMaximumDataLength() , and greater or equal to zero. |
static ContainerType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ContainerType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ContainerType CONTENT_BRANDING
public static final ContainerType CONTENT_DESCRIPTION
public static final ContainerType EXTENDED_CONTENT
public static final ContainerType METADATA_LIBRARY_OBJECT
public static final ContainerType METADATA_OBJECT
public static ContainerType[] values()
for (ContainerType c : ContainerType.values()) System.out.println(c);
public static ContainerType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static boolean areInCorrectOrder(ContainerType low, ContainerType high)
getOrdered()
low
- high
- true
if in correct order.public static ContainerType[] getOrdered()
public void assertConstraints(String name, byte[] data, int type, int stream, int language)
checkConstraints(String, byte[], int, int, int)
and
actually throws the exception if there is one.name
- name of the descriptordata
- contenttype
- data typestream
- stream numberlanguage
- language indexpublic RuntimeException checkConstraints(String name, byte[] data, int type, int stream, int language)
RuntimeException
if the requirements aren't met.name
- name of the descriptordata
- contenttype
- data typestream
- stream numberlanguage
- language indexnull
if everything is fine.public GUID getContainerGUID()
public BigInteger getMaximumDataLength()
public boolean isGuidEnabled()
public boolean isLanguageEnabled()
public boolean isWithinValueRange(long value)
getMaximumDataLength()
, and greater or equal to zero.value
- The value to testtrue
if size restrictions for binary data are met
with this container type.public boolean isMultiValued()
public boolean isStreamNumberEnabled()
Copyright © 2005–2020 jthink.net. All rights reserved.