Package org.apache.tika.parser.dwg
Class DWGReadParser
- java.lang.Object
-
- org.apache.tika.parser.dwg.AbstractDWGParser
-
- org.apache.tika.parser.dwg.DWGReadParser
-
- All Implemented Interfaces:
Serializable,org.apache.tika.parser.Parser
public class DWGReadParser extends AbstractDWGParser
DWGReadParser (CAD Drawing) parser. This extends the original DWGParser if in the parser configuration DwgRead is set. DWG reader can be found here:https://github.com/LibreDWG/libredwg
DWGRead outputs json which we then loop through extracting the text elements The required configuration is dwgReadExecutable. The other settings which can be overwritten are:
boolean : cleanDwgReadOutput - whether to clean the json output
int : cleanDwgReadOutputBatchSize - clean output batch size to process
long : dwgReadTimeout -timeout in milliseconds before killing the dwgread process
String : cleanDwgReadRegexToReplace - characters to replace in the json
String : cleanDwgReadReplaceWith - * replacement characters dwgReadExecutable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DWGReadParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)-
Methods inherited from class org.apache.tika.parser.dwg.AbstractDWGParser
configure, getCleanDwgReadOutputBatchSize, getCleanDwgReadRegexToReplace, getCleanDwgReadReplaceWith, getDwgReadExecutable, getDwgReadTimeout, isCleanDwgReadOutput, setCleanDwgReadOutput, setCleanDwgReadOutputBatchSize, setCleanDwgReadRegexToReplace, setCleanDwgReadReplaceWith, setDwgReadExecutable, setDwgReadTimeout
-
-
-
-
Method Detail
-
getSupportedTypes
public Set<org.apache.tika.mime.MediaType> getSupportedTypes(org.apache.tika.parser.ParseContext context)
-
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
- Throws:
IOExceptionSAXExceptionorg.apache.tika.exception.TikaException
-
-