Tabnine Logo
ExternalEmbedder
Code IndexAdd Tabnine to your IDE (free)

How to use
ExternalEmbedder
in
org.apache.tika.embedder

Best Java code snippets using org.apache.tika.embedder.ExternalEmbedder (Showing top 18 results out of 315)

origin: apache/tika

/**
 * Checks to see if the command can be run. Typically used with something
 * like "myapp --version" to check to see if "myapp" is installed and on the
 * path.
 *
 * @param checkCmd the check command to run
 * @param errorValue what is considered an error value?
 * @return whether or not the check completed without error
 */
public static boolean check(String checkCmd, int... errorValue) {
  return check(new String[] { checkCmd }, errorValue);
}
origin: apache/tika

public Set<MediaType> getSupportedEmbedTypes(ParseContext context) {
  return getSupportedEmbedTypes();
}
origin: apache/tika

/**
 * Starts a thread that reads and discards the contents of the standard
 * stream of the given process. Potential exceptions are ignored, and the
 * stream is closed once fully processed.
 *
 * @param process the process
 * param outputStream the output stream to send to standard error of the process
 */
private void sendStdErrToOutputStream(
    final Process process,
    final OutputStream outputStream) {
  multiThreadedStreamCopy(process.getErrorStream(), outputStream);
}
origin: apache/tika

commandMetadataSegments = getCommandMetadataSegments(metadata);
      commandSegment = commandSegment.replace(
          METADATA_COMMAND_ARGUMENTS_SERIALIZED_TOKEN,
          serializeMetadata(commandMetadataSegments));
      cmd.set(i, commandSegment);
sendStdErrToOutputStream(process, stdErrOutputStream);
  sendInputStreamToStdIn(inputStream, process);
} else {
  sendStdOutToOutputStream(process, outputStream);
} else {
  tmp.dispose();
origin: apache/tika

for (Property property : getMetadataCommandArguments().keySet()) {
  if (metadataName.equals(property.getName())) {
    String[] metadataCommandArguments = getMetadataCommandArguments().get(property);
    if (metadataCommandArguments != null) {
      for (String metadataCommandArgument : metadataCommandArguments) {
origin: org.apache.tika/tika-core

commandMetadataSegments = getCommandMetadataSegments(metadata);
      commandSegment = commandSegment.replace(
          METADATA_COMMAND_ARGUMENTS_SERIALIZED_TOKEN,
          serializeMetadata(commandMetadataSegments));
      cmd.set(i, commandSegment);
sendStdErrToOutputStream(process, stdErrOutputStream);
  sendInputStreamToStdIn(inputStream, process);
} else {
  sendStdOutToOutputStream(process, outputStream);
} else {
  tmp.dispose();
origin: org.apache.tika/tika-core

for (Property property : getMetadataCommandArguments().keySet()) {
  if (metadataName.equals(property.getName())) {
    String[] metadataCommandArguments = getMetadataCommandArguments().get(property);
    if (metadataCommandArguments != null) {
      for (String metadataCommandArgument : metadataCommandArguments) {
origin: com.github.lafa.tikaNoExternal/tika-external

commandMetadataSegments = getCommandMetadataSegments(metadata);
      commandSegment = commandSegment.replace(
          METADATA_COMMAND_ARGUMENTS_SERIALIZED_TOKEN,
          serializeMetadata(commandMetadataSegments));
      cmd.set(i, commandSegment);
sendStdErrToOutputStream(process, stdErrOutputStream);
  sendInputStreamToStdIn(inputStream, process);
} else {
  sendStdOutToOutputStream(process, outputStream);
} else {
  tmp.dispose();
origin: apache/tika

/**
 * Sends the contents of the given input stream to the
 * standard input of the given process. Potential exceptions are
 * ignored.
 * <p>
 * Note that the given input stream is <em>not</em> closed by this method.
 *
 * @param process the process
 * @param inputStream the input stream to send to standard input of the process
 */
private void sendInputStreamToStdIn(
    final InputStream inputStream,
    final Process process) {
  multiThreadedStreamCopy(inputStream, process.getOutputStream());
}
origin: org.apache.tika/tika-core

/**
 * Checks to see if the command can be run. Typically used with something
 * like "myapp --version" to check to see if "myapp" is installed and on the
 * path.
 *
 * @param checkCmd the check command to run
 * @param errorValue what is considered an error value?
 * @return whether or not the check completed without error
 */
public static boolean check(String checkCmd, int... errorValue) {
  return check(new String[] { checkCmd }, errorValue);
}
origin: org.apache.tika/tika-core

public Set<MediaType> getSupportedEmbedTypes(ParseContext context) {
  return getSupportedEmbedTypes();
}
origin: com.github.lafa.tikaNoExternal/tika-external

for (Property property : getMetadataCommandArguments().keySet()) {
  if (metadataName.equals(property.getName())) {
    String[] metadataCommandArguments = getMetadataCommandArguments().get(property);
    if (metadataCommandArguments != null) {
      for (String metadataCommandArgument : metadataCommandArguments) {
origin: com.github.lafa.tikaNoExternal/tika-external

/**
 * Starts a thread that reads and discards the contents of the standard
 * stream of the given process. Potential exceptions are ignored, and the
 * stream is closed once fully processed.
 *
 * @param process the process
 * param outputStream the output stream to send to standard error of the process
 */
private void sendStdErrToOutputStream(
    final Process process,
    final OutputStream outputStream) {
  multiThreadedStreamCopy(process.getErrorStream(), outputStream);
}
origin: com.github.lafa.tikaNoExternal/tika-external

/**
 * Checks to see if the command can be run. Typically used with something
 * like "myapp --version" to check to see if "myapp" is installed and on the
 * path.
 *
 * @param checkCmd the check command to run
 * @param errorValue what is considered an error value?
 * @return whether or not the check completed without error
 */
public static boolean check(String checkCmd, int... errorValue) {
  return check(new String[] { checkCmd }, errorValue);
}
origin: com.github.lafa.tikaNoExternal/tika-external

public Set<MediaType> getSupportedEmbedTypes(ParseContext context) {
  return getSupportedEmbedTypes();
}
origin: org.apache.tika/tika-core

/**
 * Starts a thread that reads and discards the contents of the standard
 * stream of the given process. Potential exceptions are ignored, and the
 * stream is closed once fully processed.
 *
 * @param process the process
 * param outputStream the output stream to send to standard error of the process
 */
private void sendStdErrToOutputStream(
    final Process process,
    final OutputStream outputStream) {
  multiThreadedStreamCopy(process.getErrorStream(), outputStream);
}
origin: org.apache.tika/tika-core

/**
 * Sends the contents of the given input stream to the
 * standard input of the given process. Potential exceptions are
 * ignored.
 * <p>
 * Note that the given input stream is <em>not</em> closed by this method.
 *
 * @param process the process
 * @param inputStream the input stream to send to standard input of the process
 */
private void sendInputStreamToStdIn(
    final InputStream inputStream,
    final Process process) {
  multiThreadedStreamCopy(inputStream, process.getOutputStream());
}
origin: com.github.lafa.tikaNoExternal/tika-external

/**
 * Sends the contents of the given input stream to the
 * standard input of the given process. Potential exceptions are
 * ignored.
 * <p>
 * Note that the given input stream is <em>not</em> closed by this method.
 *
 * @param process the process
 * @param inputStream the input stream to send to standard input of the process
 */
private void sendInputStreamToStdIn(
    final InputStream inputStream,
    final Process process) {
  multiThreadedStreamCopy(inputStream, process.getOutputStream());
}
org.apache.tika.embedderExternalEmbedder

Javadoc

Embedder that uses an external program (like sed or exiftool) to embed text content and metadata into a given document.

Most used methods

  • check
    Checks to see if the command can be run. Typically used with something like "myapp --version" to che
  • getCommandMetadataSegments
    Constructs a collection of command line arguments responsible for setting individual metadata fields
  • getMetadataCommandArguments
    Gets the map of Metadata keys to command line parameters.
  • getSupportedEmbedTypes
  • multiThreadedStreamCopy
    Creates a new thread for copying a given input stream to a given output stream.
  • sendInputStreamToStdIn
    Sends the contents of the given input stream to the standard input of the given process. Potential e
  • sendStdErrToOutputStream
    Starts a thread that reads and discards the contents of the standard stream of the given process. Po
  • sendStdOutToOutputStream
    Sends the standard output of the given process to the given output stream. Potential exceptions are
  • serializeMetadata
    Serializes a collection of metadata command line arguments into a single string.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now