Class StandardMetaIdentifierTransformer
java.lang.Object
is.galia.image.StandardMetaIdentifierTransformer
- All Implemented Interfaces:
MetaIdentifierTransformer
public final class StandardMetaIdentifierTransformer
extends Object
implements MetaIdentifierTransformer
Transforms meta-identifiers to or from one of the following formats:
IdentifierIdentifier;PageNumberIdentifier;ScaleConstraintIdentifier;PageNumber;ScaleConstraint
(The ; character is customizable via the Key.STANDARD_META_IDENTIFIER_TRANSFORMER_DELIMITER configuration key.)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(String metaIdentifier) Breaks apart the given meta-identifier into its constituent components.serialize(MetaIdentifier metaIdentifier) Joins the give instance into a meta-identifier string.serialize(MetaIdentifier metaIdentifier, boolean normalize) Joins the give instance into a meta-identifier string.
-
Constructor Details
-
StandardMetaIdentifierTransformer
public StandardMetaIdentifierTransformer()
-
-
Method Details
-
deserialize
Breaks apart the given meta-identifier into its constituent components.- Specified by:
deserializein interfaceMetaIdentifierTransformer- Parameters:
metaIdentifier- Meta-identifier string to deserialize. The string has already been URL-decoded and had slashes substituted.
-
serialize
Joins the give instance into a meta-identifier string.- Specified by:
serializein interfaceMetaIdentifierTransformer- Parameters:
metaIdentifier- Instance to serialize.- Returns:
- Serialized instance, not yet URL-encoded or with slashes substituted.
-
serialize
Joins the give instance into a meta-identifier string.- Parameters:
metaIdentifier- Instance to serialize.normalize- Whether to omit redundant information (such as a page number of 1) from the result. This is used in testing.
-