-
- All Implemented Interfaces:
public class DocumentMetadataUse this class to pass additional information for a document when uploading it to the Gini API. Besides the predefined metadata fields you may also add custom fields.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringHEADER_FIELD_NAME_PREFIXpublic final static StringBRANCH_ID_HEADER_FIELD_NAME
-
Constructor Summary
Constructors Constructor Description DocumentMetadata()Create a new instance. DocumentMetadata(CharsetEncoder charsetEncoder)
-
Method Summary
Modifier and Type Method Description voidsetBranchId(@NonNull() String branchId)Set a branch identifier to associate the document with a particular branch. booleanisASCIIEncodable(@NonNull() String string)voidadd(@NonNull() String name, @NonNull() String value)Add a custom metadata field. Map<String, String>getMetadata()-
-
Constructor Detail
-
DocumentMetadata
DocumentMetadata()
Create a new instance.
-
DocumentMetadata
DocumentMetadata(CharsetEncoder charsetEncoder)
-
-
Method Detail
-
setBranchId
void setBranchId(@NonNull() String branchId)
Set a branch identifier to associate the document with a particular branch.
- Parameters:
branchId- an identifier as an ASCII compatible string
-
isASCIIEncodable
boolean isASCIIEncodable(@NonNull() String string)
-
add
void add(@NonNull() String name, @NonNull() String value)
Add a custom metadata field. If there is already a field with the same name, the previous value will be overwritten with this one.
- Parameters:
name- field name as an ASCII compatible stringvalue- field value as an ASCII compatible string
-
getMetadata
@NonNull() Map<String, String> getMetadata()
-
-
-
-