Interface IPictureManifest
-
- All Known Subinterfaces:
IZipPictureManifest
- All Known Implementing Classes:
AbsSinglePictureManifest
,AbstractSinglePictureManifest
,AbstractZipPictureManifest
,AbsZipPictureManifest
,GraphicalSchemeSinglePictureManifest
,GraphicalSchemeZipPictureManifest
,LayoutSinglePictureManifest
,LayoutZipPictureManifest
,MdSinglePictureManifest
,MdZipPictureManifest
,PlatformSinglePictureManifest
,PlatformZipPictureManifest
,UrlSinglePictureManifest
public interface IPictureManifest
Picture manifest stores extendedPicture
properties and allow to access them by client queries.
-
-
Field Summary
Fields Modifier and Type Field Description static IPictureManifest
UNRESOLVED_PICTURE_MANIFEST
Special implementation ofIPictureManifest
for cases when information about picture cannot be got.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompositeId
getCompositeId()
The pictureCompositeId
PictureDirectionVariant
getDirection(IPictureManifestQuery query)
The picturePictureDirectionVariant
Optional<InputStream>
getInputStream(IPictureManifestQuery query)
The pictureInputStream
boolean
isTemplate(IPictureManifestQuery query)
Is picture is template
-
-
-
Field Detail
-
UNRESOLVED_PICTURE_MANIFEST
static final IPictureManifest UNRESOLVED_PICTURE_MANIFEST
Special implementation ofIPictureManifest
for cases when information about picture cannot be got.
The real example of this case may be aPictureRef
with reference to unresolved picture
-
-
Method Detail
-
getCompositeId
CompositeId getCompositeId()
The pictureCompositeId
- Returns:
- the
CompositeId
ornull
if picture without id.
-
isTemplate
boolean isTemplate(IPictureManifestQuery query) throws IOException
Is picture is template- Parameters:
query
- theIPictureManifestQuery
, cannot benull
- Returns:
true
if picture by given query is template,false
in 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
PictureDirectionVariant
by 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 pictureInputStream
The picture may be cropped if it contains enough information for this purpose.
- Parameters:
query
- theIPictureManifestQuery
, cannot benull
- Returns:
- the
InputStream
of 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
-
-