ConnectorLib Java 25.1
ConnectorLib Java SDK Programming Guide

# Create a Document

With ConnectorLib Java, you can create a new document using the `com.autonomy.connector.DocInfo` constructors, for example:

           DocInfo docInfo = new DocInfo(task.getTaskConfig(),
              "http://www.example.com/testDocument.doc",
              "testDocument.doc",
              true);

The arguments for this method are:

           DocInfo(TaskConfig taskConfig, String reference,
                   String filename, boolean ownFile)

The reference uniquely identifies the document and is used for the `DREREFERENCE` if the document is ingested. The file `testDocument.doc` forms the content of the document. If the document is sent to CFS, File Content Extraction extracts metadata and content from the file and adds this information to the document. The final argument indicates whether `testDocument.doc` is a temporary file owned by the connector. In the example, this argument is passed the value `true`, which means that ConnectorLib Java automatically deletes the file when it is no longer needed.

Copyright 2024 Open Text
Version 25.1 | Last updated January 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery ConnectorLib Java 25.1

Topic Title: Create a Document