Interface IPictureManifest
-
- All Known Subinterfaces:
IZipPictureManifest
- All Known Implementing Classes:
AbsSinglePictureManifest,AbstractSinglePictureManifest,AbstractZipPictureManifest,AbsZipPictureManifest,LayoutSinglePictureManifest,LayoutZipPictureManifest,MdSinglePictureManifest,MdZipPictureManifest,PlatformSinglePictureManifest,PlatformZipPictureManifest,UrlSinglePictureManifest
public interface IPictureManifestPicture manifest stores extendedPictureproperties and allow to access them by client queries.
-
-
Field Summary
Fields Modifier and Type Field Description static IPictureManifestUNRESOLVED_PICTURE_MANIFESTSpecial implementation ofIPictureManifestfor cases when information about picture cannot be got.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompositeIdgetCompositeId()The pictureCompositeIdPictureDirectionVariantgetDirection(IPictureManifestQuery query)The picturePictureDirectionVariantOptional<InputStream>getInputStream(IPictureManifestQuery query)The pictureInputStreambooleanisTemplate(IPictureManifestQuery query)Is picture is template
-
-
-
Field Detail
-
UNRESOLVED_PICTURE_MANIFEST
static final IPictureManifest UNRESOLVED_PICTURE_MANIFEST
Special implementation ofIPictureManifestfor cases when information about picture cannot be got.
The real example of this case may be aPictureRefwith reference to unresolved picture
-
-
Method Detail
-
getCompositeId
CompositeId getCompositeId()
The pictureCompositeId- Returns:
- the
CompositeIdornullif picture without id.
-
isTemplate
boolean isTemplate(IPictureManifestQuery query) throws IOException
Is picture is template- Parameters:
query- theIPictureManifestQuery, cannot benull- Returns:
trueif picture by given query is template,falsein otherwise- Throws:
IOException- if there is a problem to read the picture contentPictureManifestException- if there is a problem to obtain the picture content or manifest
-
getDirection
PictureDirectionVariant getDirection(IPictureManifestQuery query) throws IOException
The picturePictureDirectionVariant- Parameters:
query- theIPictureManifestQuery, cannot benull- Returns:
- first suitable
PictureDirectionVariantby the following algorithm:Picture variant selection in LTR-interface (in order of priority):
- Left to right
- Left to right, can flip
- Right to left, can flip
- Any
- Right to left
Picture variant selection in RTL-interface (in order of priority):
- Right to left
- Right to left, can flip
- Left to right, can flip
- Any
- Left to right
- Throws:
IOException- if there is a problem to read the picture content
-
getInputStream
Optional<InputStream> getInputStream(IPictureManifestQuery query) throws IOException
The pictureInputStreamThe picture may be cropped if it contains enough information for this purpose.
- Parameters:
query- theIPictureManifestQuery, cannot benull- Returns:
- the
InputStreamof picture by given query, nevernull - Throws:
IOException- if there is a problem to read the picture contentPictureManifestException- if there is a problem to obtain the picture content or manifest
-
-