Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page Properties
hiddentrue
idDONE

Product Version
Report Notepresentable
Assignee

Resources & Remarks

Version 2019 Winter

Modification History

NameDateProduct VersionAction
Antje08 FEB 20212.4New page properties macro.
Antje09 JAN 2023allrefacture


...

Excerpt

Concatenate multiple binary content files as byte arrays in one compound document. Create sub-documents that refer to specified ranges within the total byte array.


Section
bordertrue


Column

Table of contents

Table of Contents
exclude(Read On|Table of contents|Login to the Core API|Retrieving Documents|Deleting Documents|Importing Documents via Core API)


...

Compound documents in yuuvis® Momentum are document objects with a byte array as binary content file. In the byte array, it is possible to concatenate the binary coding of multiple individual files. Sub-documents can be defined such that they refer exactly to the ranges within the byte array where the individual original files are located. A retrieval request for the content file of such sub-documents then returns exactly the binary coding of the individual original files. But also any other range or any combination of ranges can be referenced as content of sub-documents. A retrieval request for the content file of such sub-documents then returns the concatenation of the specified ranges.

In this tutorial, we provide an example szenario scenario for the handling of compound documents and sub-documents.

...

To work through this tutorial, the following is required:

  • Set-up yuuvis® API Momentumsystem (see Installation Guide)

  • Configured user with appropriate permissions (in the example: clouduser:secret on tenant default)
  • Simple Maven project

...

Our Java client will submit its requests to the Core API using OkHttp 3.12 by Square, Inc. To build up the metadata of a compound document and evaluate the responses of the Core API, it also requires a JSON library, with org.json selected in this tutorial. To work with these libraries, the following block must be added to the Maven dependencies in the pom.xml of the project:

...

The binary content of a compound document must be a byte array. All individual files you want to concatenate have to be converted into this format. In the example code block below, FileUtils.readFileToByteArray (File file) is used to convert the contents of a file into a ByteArray (transforming it into binary code). If you want to reference the content of the individual original files lateron, you need to know their length within the byte array to determine their ranges.

...

It is also possible to create sub-documents of an already existing compound document. Do not assign again a binary content file a seconf time, but reference the contentStreamId, repositoryId and archivePath where the binary content file of the compound document is stored. The archivePath is especially required if reconstruction is not possible with metadata information (e.g., , if a pathTemplate containing dynamic path elements like DATE is configured in the archive profile). As you can see in the example, you can also specify a concatenation of multiple ranges. 

...

If you request the deletion of a compound document, its metadata is deleted from the database. Thus, the DMS object itself does not exist in the system anymore. However, if at least one sub-document references a range within the former compound document's binary content file, the entire original byte array remains in the binary storage. It is even possible to define new sub-documents with reference on the same repositoryId and contentStreamId. As soon as Only if you delete all sub-documents of an already deleted compound document, finally the binary content is deleted as well.

...

A complete code example can be found in this git repository.

Info
iconfalse

Read On

Section


Column
width25%

Importing Documents via Core API

Insert excerpt
Importing Documents via Core API
Importing Documents via Core API
nopaneltrue
 Keep reading


Column
width25%

Retrieving Documents

Insert excerpt
Retrieving Documents via Core API
Retrieving Documents via Core API
nopaneltrue
 Keep reading


Column
width25%

Deleting Documents

Insert excerpt
Deleting Documents via Core API
Deleting Documents via Core API
nopaneltrue
 Keep reading



...