chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tycho Nijon <>
Subject Adding custom properties to CMIS Server.
Date Wed, 21 Feb 2018 11:59:54 GMT

I have been trying to add functionality to my custom CMIS server that 
allows for custom properties to be set. The CMIS server implementation 
is an adaptation of the OpenCMIS server framework stub, where the File 
System structure has been replaced by object based storage with 
ElasticSearch. I need these custom properties to allow not only 
"cmis:file" types, but also "cmis:folder" types to have a url property 
where you can download the appropriate metadata file. The "cmis:file" 
type has a contentStream where you can find the actual content (usually 
a PDF), where this custom property is also required to link to the 
metadata file of the "cmis:file".

Based on the instructions at this URL: 
I have tried multiple variations of the following code:

                 // CMIS 1.1 properties
                 if (context.getCmisVersion() != CmisVersion.CMIS_1_0) {
                     addPropertyString(result, typeId, filter,
    PropertyIds.DESCRIPTION, null);

                     List<String> secondaryTypes = new ArrayList<String>();

                     addPropertyIdList(result, typeId, filter,
    PropertyIds.SECONDARY_OBJECT_TYPE_IDS, secondaryTypes);
                     addPropertyString(result, typeId, filter,
    "tmlo:metaDataFile", tmloCmisObject.getMetaDataFileLocation());

/Note that the syntax is slightly different from the URL, because the 
framework implementation comes with the "addProperty[X]" functions as 
opposed to the "properties.put" found in the URL.

This results in the following exception, however, when trying to connect 
to the CMIS server:

    CMIS Exception: objectNotFound Type 'tmlo:metaDataFile' is unknown!

       Error Content: <html><head><title>Apache Chemistry OpenCMIS -
    objectNotFound error</title><style><!--H1
    solid #3c78b5;padding:2px;} BODY
    HR {color:#3c78b5;height:1px;}--></style></head><body><h1>HTTP
    Status 404 -
    'tmlo:metaDataFile' is unknown!<!--/message--></p></body></html>

I have not been able to find out what causes the error. There have been 
responses to similar questions that "custom properties should be defined 
in the repository", but they come without information on how to actually 
do that.

If further information is required I will gladly supply it.

Best regards,

Tycho Nijon

Digitaal Archief Service

mob      +31 6 43599147
adres:   Schieland 18, 1948RM, Beverwijk

DiVault in beeld: VIDEO <>

Deze e-mail inclusief inhoud is alleen voor de ontvanger van deze e-mail.
Elk gebruik anders dan gebruik door de ontvanger is verboden en onrechtmatig.
De verzender is niet verantwoordelijk voor de juiste en complete verzending
van de informatie noch voor enige vertraging.

This email and any attachments thereto may contain private, confidential,
and privileged material for the sole use of the intended recipient.
Any review, copying, or distribution of this email (or any attachments thereto)
by others is strictly prohibited. If you are not the intended recipient,
please contact the sender immediately and permanently delete the original and
  any copies of this email and any attachments thereto.
                               © DiVault 2018

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message