Class BatchItemContext

    • Constructor Detail

      • BatchItemContext

        public BatchItemContext()
        Creates a new empty BatchItemContext object.
      • BatchItemContext

        public BatchItemContext​(RawDocument rawDoc,
                                URI outputURI,
                                String outputEncoding)
        Creates a new BatchItemContext object and initializes it with a given RawDocument and additional arguments.
        Parameters:
        rawDoc - the RawDocument to use as the main input document.
        outputURI - the output URI of the input document (can be null if not used).
        outputEncoding - the output encoding (can be null if not used).
      • BatchItemContext

        public BatchItemContext​(RawDocument rawDoc,
                                URI outputURI,
                                String outputEncoding,
                                RawDocument... rawDocs)
        Creates a new BatchItemContext object and initializes it with a given RawDocument and additional arguments.
        Parameters:
        rawDoc - the RawDocument to use as the main input document.
        outputURI - the output URI of the input document (can be null if not used).
        outputEncoding - the output encoding (can be null if not used).
        rawDocs - one or more RawDocuments to include in this item.
      • BatchItemContext

        public BatchItemContext​(URI inputURI,
                                String defaultEncoding,
                                String filterConfigId,
                                URI outputURI,
                                String outputEncoding,
                                LocaleId sourceLocale,
                                LocaleId targetLocale)
        Creates a new BatchItemContext object and initializes it based on a given input URI and additional arguments.
        Parameters:
        inputURI - the URI of the main input document
        defaultEncoding - the default encoding of the input document.
        filterConfigId - the filter configuration ID (can be null if not used)
        outputURI - the output URI (can be null if not used).
        outputEncoding - the output encoding (can be null if not used)
        sourceLocale - the source locale.
        targetLocale - the target locale.
    • Method Detail

      • add

        public void add​(DocumentData data)
        Adds a document to the list of inputs for this batch item.
        Parameters:
        data - the data of the document.
      • add

        public void add​(RawDocument rawDoc,
                        URI outputURI,
                        String outputEncoding)
        Adds a document to the list of inputs for this batch item using the provided arguments.
        Parameters:
        rawDoc - the RawDocument to use as the main input document.
        outputURI - the output URI of the input document (can be null if not used).
        outputEncoding - the output encoding (can be null if not used).
      • getFilterConfigurationId

        public String getFilterConfigurationId​(int index)
        Description copied from interface: IBatchItemContext
        Gets the filter configuration identifier for a given input document of this batch item.
        Specified by:
        getFilterConfigurationId in interface IBatchItemContext
        Parameters:
        index - the zero-based index of the input document.
        Returns:
        the filter configuration identifier of the given the input document.
      • getOutputEncoding

        public String getOutputEncoding​(int index)
        Description copied from interface: IBatchItemContext
        Gets the output encoding for a given input document of this batch item.
        Specified by:
        getOutputEncoding in interface IBatchItemContext
        Parameters:
        index - the zero-based index of the input document.
        Returns:
        the output encoding of the given the input document, or null if there is no output encoding for the given input.
      • getOutputURI

        public URI getOutputURI​(int index)
        Description copied from interface: IBatchItemContext
        Gets the output URI for a given input document of this batch item.
        Specified by:
        getOutputURI in interface IBatchItemContext
        Parameters:
        index - the zero-based index of the input document.
        Returns:
        the output URI of the given the input document, or null if there is no output URI for the given input.
      • getRawDocument

        public RawDocument getRawDocument​(int index)
        Description copied from interface: IBatchItemContext
        Gets a RawDocument object from the given input document of this batch item.
        Specified by:
        getRawDocument in interface IBatchItemContext
        Parameters:
        index - the zero-based index of the input document.
        Returns:
        the RawDocument object from the given input document, or null if there is no RawDocument for the given input.
      • getSourceLocale

        public LocaleId getSourceLocale​(int index)
        Description copied from interface: IBatchItemContext
        Gets the source locale for a given input document of this batch item.
        Specified by:
        getSourceLocale in interface IBatchItemContext
        Parameters:
        index - the zero-based index of the input document.
        Returns:
        the source locale of the given the input document, or null if there is no source locale for the given input.
      • getTargetLocale

        public LocaleId getTargetLocale​(int index)
        Description copied from interface: IBatchItemContext
        Gets the target locale for a given input document of this batch item.
        Specified by:
        getTargetLocale in interface IBatchItemContext
        Parameters:
        index - the zero-based index of the input document.
        Returns:
        the target locale of the given the input document, or null if there is no target locale for the given input.