Show / Hide Table of Contents

Interface IDocumentService

Represents the document service.

Namespace: Relativity.Testing.Framework.Api.Services
Assembly: Relativity.Testing.Framework.Api.dll
Syntax
public interface IDocumentService
Examples
_documentService = relativityFacade.Resolve<IDocumentService>();

Methods

| Improve this Doc View Source

Delete(Int32, Int32)

Deletes the workspace entity by the specified IDs of workspace and entity.

Declaration
void Delete(int workspaceId, int entityId)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.Int32 entityId

The entity ID.

Examples
var workspaceArtifactId = 1234567;
var documentArtifactId = 12345;
_documentService.Delete(workspaceArtifactId, documentArtifactId);
| Improve this Doc View Source

Get(Int32, String)

Gets the document by the entity name.

Declaration
Document Get(int workspaceId, string entityName)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.String entityName

The entity name.

Returns
Type Description
Document

Returns a document.

Examples
var workspaceArtifactId = 1234567;
Document document = _documentService.Get(workspaceArtifactId, "someDocumentName");
| Improve this Doc View Source

GetAll(Int32)

Gets the documents by the specified workspace ID.

Declaration
Document[] GetAll(int workspaceId)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

Returns
Type Description
Document[]

The array of documents.

Examples
var workspaceArtifactId = 1234567;
var documents = _documentService.GetAll(workspaceArtifactId);
| Improve this Doc View Source

ImportGeneratedDocuments(Int32, Int32)

Creates and import basic document metadata to import to the given workspace.

Declaration
void ImportGeneratedDocuments(int workspaceId, int numberOfDocuments = 10)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.Int32 numberOfDocuments

The number of documents to generate and import.

Examples
var workspaceService = Facade.Resolve<IWorkspaceService>();
var defaultWorkspace = workspaceService.Create(new Workspace { Name = "DefaultWorkspaceName" });
documentService.ImportGeneratedDocuments(defaultWorkspace.ArtifactID);
| Improve this Doc View Source

ImportImages(Int32, DataTable, ImageImportOptions)

Import image documents from data table object.

Declaration
void ImportImages(int workspaceId, DataTable dataTable, ImageImportOptions options = null)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.Data.DataTable dataTable

The data table object.

ImageImportOptions options

The options for document import.

Examples
int workspaceArtifactId = 1234567;
DataTable table = new DataTable();
table.Columns.Add("Bates", typeof(string));
table.Columns.Add("Doc", typeof(string));
table.Columns.Add("File", typeof(string));
ImageImportOptions imageImportOptions = new ImageImportOptions()
{
	DocumentIdentifierField = "Doc",
	BatesNumberField = "Bates",
	FileLocationField = "File",
	OverwriteMode = DocumentOverwriteMode.Append
};
documentService.ImportImages(workspaceArtifactId, table, imageImportOptions);
| Improve this Doc View Source

ImportImagesFromCsv(Int32, String, ImageImportOptions)

Import image documents from comma-separated values file.

Declaration
void ImportImagesFromCsv(int workspaceId, string pathToFile, ImageImportOptions options = null)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.String pathToFile

The path to the existing comma-separated values file.

ImageImportOptions options

The options for document import.

Examples
ImageImportOptions options = new ImageImportOptions();
int workspaceId = 1234;
string fullPath = "some\path\to\file.csv";
documentService.ImportImagesFromCsv(workspaceId, fullPath, options);
| Improve this Doc View Source

ImportNatives(Int32, DataTable, NativeImportOptions)

Import native documents from data table object.

Declaration
void ImportNatives(int workspaceId, DataTable dataTable, NativeImportOptions options = null)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.Data.DataTable dataTable

The data table object.

NativeImportOptions options

The options for document import.

Examples
int workspaceArtifactId = 1234567;
DataTable table = new DataTable();
table.Columns.Add("Control Number", typeof(string));
table.Columns.Add("Native File", typeof(string));
table.Rows.Add("A_1", @"");
table.Rows.Add("Image-5_00002", @"");

NativeImportOptions nativeImportOptions = new NativeImportOptions()
{
	DocumentIdentifierField = "Control Number",
	NativeFilePathColumnName = "Native File",
	NativeFileCopyMode = NativeFileCopyMode.CopyFiles,
	OverwriteMode = DocumentOverwriteMode.Append
};
documentService.ImportNatives(workspaceArtifactId, table, nativeImportOptions);
int workspaceArtifactId = 1234567;
var dataTable = new DataTable("Documents");
var options = new NativeImportOptions()
{
	NativeFileCopyMode = NativeFileCopyMode.DoNotImportNativeFiles,
	NativeFilePathColumnName = null,
	ExtractedTextFieldContainsFilePath = false,
	OverwriteMode = DocumentOverwriteMode.AppendOverlay
};
string controlNumberField = options.DocumentIdentifierField;

dataTable.Columns.Add(controlNumberField);
dataTable.Columns.Add("Extracted Text");
documentService.ImportNatives(workspaceArtifactId, dataTable, options);
| Improve this Doc View Source

ImportNativesFromCsv(Int32, String, NativeImportOptions)

Import native documents from comma-separated values file.

Declaration
void ImportNativesFromCsv(int workspaceId, string pathToFile, NativeImportOptions options = null)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.String pathToFile

The path to the existing comma-separated values file.

NativeImportOptions options

The options for document import.

Examples
NativeImportOptions options = new NativeImportOptions();
int workspaceId = 1234;
string fullPath = "some\path\to\file.csv";
documentService.ImportNativesFromCsv(workspaceId, fullPath, options);
| Improve this Doc View Source

ImportProducedImages(Int32, Int32, DataTable, ImageImportOptions)

Import produced image documents from data table object.

Declaration
void ImportProducedImages(int workspaceId, int productionId, DataTable dataTable, ImageImportOptions options = null)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.Int32 productionId

The production ID.

System.Data.DataTable dataTable

The data table object.

ImageImportOptions options

The options for document import.

Examples
int productionId = 12354;
int workspaceArtifactId = 1234567;

DataTable table = new DataTable();
table.Columns.Add("Bates", typeof(string));
table.Columns.Add("Doc", typeof(string));
table.Columns.Add("File", typeof(string));
ImageImportOptions imageImportOptions = new ImageImportOptions()
{
	DocumentIdentifierField = "Doc",
	BatesNumberField = "Bates",
	FileLocationField = "File",
	OverwriteMode = DocumentOverwriteMode.Append
};
documentService.ImportProducedImages(workspaceArtifactId, productionId, table, imageImportOptions);
| Improve this Doc View Source

ImportProducedImagesFromCsv(Int32, Int32, String, ImageImportOptions)

Import produced image documents from comma-separated values file.

Declaration
void ImportProducedImagesFromCsv(int workspaceId, int productionId, string pathToFile, ImageImportOptions options = null)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.Int32 productionId

The production ID.

System.String pathToFile

The path to the existing comma-separated values file.

ImageImportOptions options

The options for document import.

Examples
int workspaceId = 1234;
int productionId = 12354;
string fullPath = "some\path\to\file.csv";
ImageImportOptions options = new ImageImportOptions();
documentService.ImportProducedImagesFromCsv(workspaceId, productionId, fullPath, options);
| Improve this Doc View Source

ImportSingleImage(Int32, String)

Import single image document by specified path.

Declaration
void ImportSingleImage(int workspaceId, string pathToFile)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.String pathToFile

The path to the existing native file.

Examples
int workspaceId = 1234;
string fullPath = "some\path\to\file";
documentService.ImportSingleImage(workspaceId, fullPath);
| Improve this Doc View Source

ImportSingleNative(Int32, String)

Import single native document by specified path.

Declaration
void ImportSingleNative(int workspaceId, string pathToFile)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.String pathToFile

The path to the existing native file.

Examples
int workspaceId = 1234;
string fullPath = "some\path\to\native\file";
documentService.ImportSingleNative(workspaceId, fullPath);
| Improve this Doc View Source

ImportSingleProducedImage(Int32, Int32, String)

Import single produced image document by specified path.

Declaration
void ImportSingleProducedImage(int workspaceId, int productionId, string pathToFile)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.Int32 productionId

The production ID.

System.String pathToFile

The path to the existing file.

Examples
int workspaceId = 1234;
int productionId = 12354;
string fullPath = "some\path\to\file.csv";
ImageImportOptions options = new ImageImportOptions();
documentService.ImportProducedImagesFromCsv(workspaceId, productionId, fullPath, options);
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX