Powered by Zoomin Software. For more details please contactZoomin

Semaphore Publisher

MarkLogic Writer Processor

  • Last Updated: May 29, 2026
  • 2 minute read
    • Semaphore
    • Documentation

This functionality is only available in Semaphore 5.6.1 and forward

If you want to push the Model as a set of triples to a Marklogic backend, this can be done using the MarkLogic Writer.

This is configured as follows:

<bean class="com.smartlogic.publisher.marklogic.MarklogicWriter">
    <!-- Required property: Marklogic database hostname. -->
    <property name="host" value="localhost"/>

    <!-- Optional marklogic database port - if not specified defaults to 8000.
    <property name="port" value="8000"/>
    -->

    <!-- Database name within marklogic - required if port is 8000, otherwise optional and if not specified defaults to the documents database.
    <property name="database" value="DatabaseName"/>
    -->

    <!-- Required property: An object that specifies the way of connecting to the marklogic database -->
    <property name="securityContext" ref="authContext"/>

    <!-- This optional property specifies the name of the model that should be uploaded to the marklogic database
         If not specified defaults to the ${model.name} value.
    <property name="modelName" value="${model.name}"/>
    -->

    <!-- Optional property that specifies the graphURI of the named graph that the model will be uploaded to in marklogic database
         If not specified defaults to the model name.
    <property name="graphURI" value="${model.name}"/>
    -->

    <!-- Optional property that says whether to upload also the .tch model
         If not specified defaults to false
    <property name="includeTch" value="true"/>
    -->

    <!-- If marklogic database requires connection through ssl set this to true
    <property name="useSSL" value="true"/>
    -->

    <!-- Specify this if you want to use different from system default keystore
         Only needed when useSSL is true
    <property name="sslKeyStoreLocation" value="path/to/the/keystore/file"/>
    -->

    <!-- Use this property if the keystore from sslKeyStoreLocation requires password
         Only needed when useSSL is true
    <property name="sslKeyStorePassword" value="password"/>
    -->

    <!-- Type of SSL hostname verifier
         Only needed when useSSL is true
    <property name="sslHostnameVerifier">
        <bean id="com.marklogic.client.DatabaseClientFactory.SSLHostnameVerifier.ANY" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean" />-->
        <!-- Alternative values
        <bean id="com.marklogic.client.DatabaseClientFactory.SSLHostnameVerifier.COMMON" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean" />
        <bean id="com.marklogic.client.DatabaseClientFactory.SSLHostnameVerifier.STRICT" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean" />
        -->
    <!--</property>-->
</bean>

The authentication details are provided in a separate bean - which can be in a file outside the Publisher configuration directory

<!-- Marklogic authentication context that uses username and password -->
<bean id="authContext" class="com.marklogic.client.DatabaseClientFactory.DigestAuthContext">
    <constructor-arg value="admin"/>
    <constructor-arg value="admin"/>
</bean>
TitleResults for “How to create a CRG?”Also Available inAlert