Package org.apache.tika.detect.zip
Class GeoGebraDetector
java.lang.Object
org.apache.tika.detect.zip.GeoGebraDetector
- All Implemented Interfaces:
Serializable,ZipContainerDetector
Detects the zip-based GeoGebra formats by their well-known entry names:
geogebra.xmlat the root → a worksheet (*.ggb)structure.jsonat the root plus at least one_slide<N>/geogebra.xml→ GeoGebra Notes/Slides (*.ggs)geogebra_macro.xmlat the root → a tool (*.ggt)
geogebra.xml and
geogebra_macro.xml, so the worksheet check takes precedence over
the tool check, and the decision is only made once all entry names have
been seen.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondetect(org.apache.commons.compress.archivers.zip.ZipFile zip, TikaInputStream tis) If detection is successful, the ZipDetector should set the zip file or OPCPackage in TikaInputStream.setOpenContainer() Implementations should _not_ close the ZipFilestreamingDetectFinal(StreamingDetectContext detectContext) After we've finished streaming the zip archive entries, a detector may make a final decision.streamingDetectUpdate(org.apache.commons.compress.archivers.zip.ZipArchiveEntry zae, InputStream zis, StreamingDetectContext detectContext) Try to detect on a specific entry.
-
Constructor Details
-
GeoGebraDetector
public GeoGebraDetector()
-
-
Method Details
-
detect
public MediaType detect(org.apache.commons.compress.archivers.zip.ZipFile zip, TikaInputStream tis) throws IOException Description copied from interface:ZipContainerDetectorIf detection is successful, the ZipDetector should set the zip file or OPCPackage in TikaInputStream.setOpenContainer() Implementations should _not_ close the ZipFile- Specified by:
detectin interfaceZipContainerDetector- Parameters:
zip-tis-- Returns:
- Throws:
IOException
-
streamingDetectUpdate
public MediaType streamingDetectUpdate(org.apache.commons.compress.archivers.zip.ZipArchiveEntry zae, InputStream zis, StreamingDetectContext detectContext) Description copied from interface:ZipContainerDetectorTry to detect on a specific entry. Detectors are allowed to store state (e.g. "remember what they've seen") in theStreamingDetectContext- Specified by:
streamingDetectUpdatein interfaceZipContainerDetector- Parameters:
zae-- Returns:
-
streamingDetectFinal
Description copied from interface:ZipContainerDetectorAfter we've finished streaming the zip archive entries, a detector may make a final decision.- Specified by:
streamingDetectFinalin interfaceZipContainerDetector- Returns:
-