Package org.apache.tika.parser.gdal
Class GDALParser
- java.lang.Object
-
- org.apache.tika.parser.gdal.GDALParser
-
- All Implemented Interfaces:
Serializable,org.apache.tika.parser.Parser
public class GDALParser extends Object implements org.apache.tika.parser.Parser
Wraps execution of the Geospatial Data Abstraction Library (GDAL)gdalinfotool used to extract geospatial information out of hundreds of geo file formats. The parser requires the installation of GDAL and forgdalinfoto be located on the path. Basic information (Size, Coordinate System, Bounding Box, Driver, and resource info) are extracted as metadata, and the remaining metadata patterns are extracted and added. The output of the command is available from the providedContentHandlerin theparse(InputStream, ContentHandler, Metadata, ParseContext)method.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_TIMEOUT_MS
-
Constructor Summary
Constructors Constructor Description GDALParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCommand()Set<org.apache.tika.mime.MediaType>getSupportedTypes(org.apache.tika.parser.ParseContext context)voidparse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context)StringprocessCommand(InputStream stream)voidsetCommand(String command)voidsetMaxStdErr(int maxStdErr)voidsetMaxStdOut(int maxStdOut)voidsetTimeoutMs(long timeoutMs)
-
-
-
Field Detail
-
DEFAULT_TIMEOUT_MS
public static final long DEFAULT_TIMEOUT_MS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCommand
public String getCommand()
-
setCommand
public void setCommand(String command)
-
processCommand
public String processCommand(InputStream stream)
-
getSupportedTypes
public Set<org.apache.tika.mime.MediaType> getSupportedTypes(org.apache.tika.parser.ParseContext context)
- Specified by:
getSupportedTypesin interfaceorg.apache.tika.parser.Parser
-
parse
public void parse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context) throws IOException, SAXException, org.apache.tika.exception.TikaException
- Specified by:
parsein interfaceorg.apache.tika.parser.Parser- Throws:
IOExceptionSAXExceptionorg.apache.tika.exception.TikaException
-
setTimeoutMs
@Field public void setTimeoutMs(long timeoutMs)
-
setMaxStdErr
@Field public void setMaxStdErr(int maxStdErr)
-
setMaxStdOut
@Field public void setMaxStdOut(int maxStdOut)
-
-