Class PipelineFactory
- java.lang.Object
-
- org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory
-
public class PipelineFactory extends java.lang.ObjectFactory class for image processing pipelines.
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Logloglogger
-
Constructor Summary
Constructors Constructor Description PipelineFactory(ImageManager manager)Main constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageProviderPipeline[]determineCandidatePipelines(ImageInfo imageInfo, ImageFlavor targetFlavor)Determines all possible pipelines for the given image that can produce the requested target flavor.ImageProviderPipeline[]determineCandidatePipelines(ImageInfo imageInfo, ImageFlavor[] flavors)Finds and returns an array ofImageProviderPipelineinstances which can handle the given MIME type and return one of the givenImageFlavors.ImageProviderPipeline[]determineCandidatePipelines(Image sourceImage, ImageFlavor[] flavors)Finds and returns an array ofImageProviderPipelineinstances which can handle the convert the givenImageand return one of the givenImageFlavors.ImageProviderPipelinenewImageConverterPipeline(ImageInfo imageInfo, ImageFlavor targetFlavor)Creates and returns anImageProviderPipelinethat allows to load an image of the given MIME type and present it in the requested image flavor.ImageProviderPipelinenewImageConverterPipeline(Image originalImage, ImageFlavor targetFlavor)Creates and returns anImageProviderPipelinethat allows to load an image of the given MIME type and present it in the requested image flavor.
-
-
-
Constructor Detail
-
PipelineFactory
public PipelineFactory(ImageManager manager)
Main constructor.- Parameters:
manager- the ImageManager instance
-
-
Method Detail
-
newImageConverterPipeline
public ImageProviderPipeline newImageConverterPipeline(Image originalImage, ImageFlavor targetFlavor)
Creates and returns anImageProviderPipelinethat allows to load an image of the given MIME type and present it in the requested image flavor.- Parameters:
originalImage- the original image that serves as the origin point of the conversiontargetFlavor- the requested image flavor- Returns:
- an
ImageProviderPipelineor null if no suitable pipeline could be assembled
-
newImageConverterPipeline
public ImageProviderPipeline newImageConverterPipeline(ImageInfo imageInfo, ImageFlavor targetFlavor)
Creates and returns anImageProviderPipelinethat allows to load an image of the given MIME type and present it in the requested image flavor.- Parameters:
imageInfo- the image info object of the original imagetargetFlavor- the requested image flavor- Returns:
- an
ImageProviderPipelineor null if no suitable pipeline could be assembled
-
determineCandidatePipelines
public ImageProviderPipeline[] determineCandidatePipelines(ImageInfo imageInfo, ImageFlavor targetFlavor)
Determines all possible pipelines for the given image that can produce the requested target flavor.- Parameters:
imageInfo- the image informationtargetFlavor- the target flavor- Returns:
- the candidate pipelines
-
determineCandidatePipelines
public ImageProviderPipeline[] determineCandidatePipelines(ImageInfo imageInfo, ImageFlavor[] flavors)
Finds and returns an array ofImageProviderPipelineinstances which can handle the given MIME type and return one of the givenImageFlavors.- Parameters:
imageInfo- the image info objectflavors- the possible target flavors- Returns:
- an array of pipelines
-
determineCandidatePipelines
public ImageProviderPipeline[] determineCandidatePipelines(Image sourceImage, ImageFlavor[] flavors)
Finds and returns an array ofImageProviderPipelineinstances which can handle the convert the givenImageand return one of the givenImageFlavors.- Parameters:
sourceImage- the image to be convertedflavors- the possible target flavors- Returns:
- an array of pipelines
-
-