Package rife.cmf.loader
Interface ContentLoaderBackend<InternalType>
- All Known Implementing Classes:
ImageContentLoaderBackend,ImageIOLoader,ImageJLoader,SAXLoader,XhtmlContentLoaderBackend
public interface ContentLoaderBackend<InternalType>
This is an interface that should be implemented by all content loader
back-ends.
All content loader back-ends that are fronted by the same ContentLoader should handle the same InternalType, which is
returned by the load method.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether the back-end is present.Loads any kind of raw data and tries to accommodate as much as possible to return an instance ofInternalTypeafter successful loading and handling.
-
Method Details
-
isBackendPresent
boolean isBackendPresent()Indicates whether the back-end is present.This can be important for optional libraries that should only actually try to load the data when the required classes are available in the classpath.
- Returns:
trueif the back-end is present; orfalseif this is not the case- Since:
- 1.0
-
load
Loads any kind of raw data and tries to accommodate as much as possible to return an instance ofInternalTypeafter successful loading and handling.Should any errors occur, then they will be added as text messages to the
errorscollection.- Parameters:
data- the raw data that has to be loadedfragment-trueif the raw data is a fragment; orfalseif the raw data is a complete document or fileerrors- a set to which possible error messages will be added- Returns:
- an instance of the
LoadedContentwith theInternalType; ornullif the raw data couldn't be loaded - Since:
- 1.4
-