|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.SIRAPRISE.server.IntervalTypeImplementation
public final class IntervalTypeImplementation
IntervalTypeImplementation generically defines implementation objects for each interval type. The physical encoding for values of any INTERVAL type always has the following structure :
Method Summary | |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
getComponentNameMap()
Gets a map of component/type names. |
ValueBuffer |
getComponentValue(java.lang.String componentName,
ScalarValueBuffer valueBuffer)
"Extracts" a possrep component value out of a value of the type |
PossRepImplementation |
getDefaultPossrepImplementation()
Gets the possrep implementation that is to be considered the default for the type. |
int |
getDfltLogicalSize()
Gets the default (logical) size of an attribute of this type. |
int |
getMaxLogicalSize()
Gets the maximum logical size of an attribute of this type. |
int |
getMinLogicalSize()
Gets the minimum logical size of an attribute of this type. |
int |
getPhysicalSizeFor(int logicalSize)
Determines the number of bytes needed to encode a value of the given logical size of this type. |
PossRepImplementation |
getPossrepImplementation(java.lang.String componentName)
Gets the PossrepImplementation object implementing the possrep of which the given component name names a component. |
java.util.Set<PossRepImplementation> |
getPossrepImplementations()
Gets the set of all PossRepImplementations for this type. |
java.lang.String |
getPossrepName()
Gets the possrep name |
static boolean |
isNegativeInfinite(short finitenessIndicator)
Checks whether the interval value that the given finiteness indicator was drawn from, lacks a begin component. |
static boolean |
isPositiveInfinite(short finitenessIndicator)
Checks whether the interval value that the given finiteness indicator was drawn from, lacks an end component |
ValueBuffer |
valueFromComponentValues(java.util.HashMap<java.lang.String,ValueBuffer> componentValueMap,
int logicalSize)
Returns a ValueBuffer holding the value of the type that this PossRepImplementation is for, and that corresponds to the component values given in the componentValueMap argument. |
ValueBuffer |
valueFromExternalRepresentation(java.lang.String value)
Convert a value of this possrep's type to internal format. |
ValueBuffer |
valueFromExternalRepresentation(java.lang.String value,
int maximumLogicalLengthAllowed)
Converts a value of this type from external to internal format, given a specified maximum allowable logical size for the value to be returned. |
java.lang.String |
valueToEscapedExternalRepresentation(ValueBuffer valueBuffer)
Converts a value in internal format to the appropriate textual representation of that value for this possrep. |
java.lang.String |
valueToExternalRepresentation(ValueBuffer valueBuffer)
Converts a value in internal format to the appropriate textual representation of that value for this possrep. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean isNegativeInfinite(short finitenessIndicator)
0000 ===> false |
FFFF ===> false (these values were used to indicate infinity at the time when negative infinity was not yet supported) |
00ff ===> true |
FF00 ===> true |
finitenessIndicator
- The finiteNess indicator obtained from some physically recorded interval value
public static boolean isPositiveInfinite(short finitenessIndicator)
finitenessIndicator
- The finiteNess indicator obtained from some physically recorded interval value
public final java.util.Map<java.lang.String,java.lang.String> getComponentNameMap()
PossRepImplementation
getComponentNameMap
in interface PossRepImplementation
public final ValueBuffer getComponentValue(java.lang.String componentName, ScalarValueBuffer valueBuffer)
PossRepImplementation
getComponentValue
in interface PossRepImplementation
componentName
- The possrep component NamevalueBuffer
- The scalarValueBuffer holding the value of which the possrep's component's value is to be extracted
public final PossRepImplementation getDefaultPossrepImplementation()
TypeImplementation
getDefaultPossrepImplementation
in interface TypeImplementation
public final int getDfltLogicalSize()
TypeImplementation
getDfltLogicalSize
in interface TypeImplementation
public final int getMaxLogicalSize()
TypeImplementation
getMaxLogicalSize
in interface TypeImplementation
public final int getMinLogicalSize()
TypeImplementation
getMinLogicalSize
in interface TypeImplementation
public final int getPhysicalSizeFor(int logicalSize)
TypeImplementation
getPhysicalSizeFor
in interface TypeImplementation
logicalSize
- The logical size of a declared attribute of this type
public PossRepImplementation getPossrepImplementation(java.lang.String componentName)
TypeImplementation
getPossrepImplementation
in interface TypeImplementation
componentName
- The name of a component of some possrep of this type (and for which the corresponding PossrepImplementation object is to be returned)
public final java.util.Set<PossRepImplementation> getPossrepImplementations()
TypeImplementation
getPossrepImplementations
in interface TypeImplementation
public final java.lang.String getPossrepName()
PossRepImplementation
getPossrepName
in interface PossRepImplementation
public final ValueBuffer valueFromComponentValues(java.util.HashMap<java.lang.String,ValueBuffer> componentValueMap, int logicalSize)
PossRepImplementation
valueFromComponentValues
in interface PossRepImplementation
componentValueMap
- A Map holding component names and their corresponding values, held in a ValueBuffer.logicalSize
- The maximum logical size that the returned value is allowed to have. This only applies to certain variable-length types. E.g. imagine that type STRING has a possrep with components LENGTH and NONBLANKS, such that the string represented by LENGTH(12)NONBLANKS(A) represents the string "A ". An InvalidValueException should be thrown if these component values are passed to this method, along with a logicalSize of, say, 8.
public final ValueBuffer valueFromExternalRepresentation(java.lang.String value) throws InvalidValueException
PossRepImplementation
valueFromExternalRepresentation
in interface PossRepImplementation
value
- the value in external format.
InvalidValueException
- If the textual representation does not represent a value of the possrep's type.public final ValueBuffer valueFromExternalRepresentation(java.lang.String value, int maximumLogicalLengthAllowed) throws InvalidValueException
PossRepImplementation
valueFromExternalRepresentation
in interface PossRepImplementation
value
- the textual representation of the value.maximumLogicalLengthAllowed
- the maximum logical length that the returned value can be allowed to have.
InvalidValueException
- If the textual representation does not represent a value of the possrep's type.public final java.lang.String valueToEscapedExternalRepresentation(ValueBuffer valueBuffer)
PossRepImplementation
valueToEscapedExternalRepresentation
in interface PossRepImplementation
valueBuffer
- The value in internal format.
public final java.lang.String valueToExternalRepresentation(ValueBuffer valueBuffer)
PossRepImplementation
valueToExternalRepresentation
in interface PossRepImplementation
valueBuffer
- The value in internal format.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |