Class StandardDocumentProvider

java.lang.Object
org.apache.nifi.xml.processing.parsers.StandardDocumentProvider
All Implemented Interfaces:
DocumentProvider

public class StandardDocumentProvider extends Object implements DocumentProvider
Standard implementation of Document Provider with secure processing enabled
  • Field Details

    • namespaceAware

      private boolean namespaceAware
    • schema

      private Schema schema
    • errorHandler

      private ErrorHandler errorHandler
  • Constructor Details

    • StandardDocumentProvider

      public StandardDocumentProvider()
  • Method Details

    • setErrorHandler

      public void setErrorHandler(ErrorHandler errorHandler)
      Set Error Handler
      Parameters:
      errorHandler - Error Handler
    • setNamespaceAware

      public void setNamespaceAware(boolean namespaceAware)
      Set Namespace Aware status on DocumentBuilderFactory
      Parameters:
      namespaceAware - Namespace Awareness
    • setSchema

      public void setSchema(Schema schema)
      Set Namespace Aware status on DocumentBuilderFactory
      Parameters:
      schema - Schema for validation or null to disable validation
    • newDocument

      public Document newDocument()
      Description copied from interface: DocumentProvider
      Create new Document
      Specified by:
      newDocument in interface DocumentProvider
      Returns:
      Document
    • parse

      public Document parse(InputStream inputStream)
      Build and return DocumentBuilder
      Specified by:
      parse in interface DocumentProvider
      Parameters:
      inputStream - InputStream to be parsed
      Returns:
      DocumentBuilder configured using provided properties
    • isDisallowDocumentTypeDeclaration

      protected boolean isDisallowDocumentTypeDeclaration()
    • getDocumentBuilderFactory

      private DocumentBuilderFactory getDocumentBuilderFactory()