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:
  • Constructor Details

    • DWGReadParser

      public DWGReadParser()
  • Method Details

    • 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:
      IOException
      SAXException
      org.apache.tika.exception.TikaException