Powered by Zoomin Software. For more details please contactZoomin

Semaphore Publisher

Running Publisher from the command line

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

This assumes that the stand-alone publisher is installed and the model publisher configs has been linked to the <stand-alone publisher>/config/<ModelName> directory

Publisher can be run from the command line as long as Java (version 8 or higher) is installed. However, you will need to supply it with

  • the SPARQL endpoint for the model being published,
  • the named graph for the data (e.g. “task:ModelName:TaskName:Administrator” or “urn:x-evn-master:ModelName:Administrator”)
  • the name of the configuration file (it is assumed to be in the conf directory). Note that you must include the model directory as part of the file name, e.g. –config-file=“/IPSV/Semaphore-Publisher.xml”.
RunPublisherFromConsole --sparql-endpoint=<SPARQL Endpoint> --named-graph=<NamedGraph> --config-file=<config-file>

When run from within the Knowledge Model Management, these three command parameters are pre-populated.

Publishing without SPARQL Endpoint

In Publisher 4.3.0, it is now possible to publish models using the local TTL file. This also assumes that your model (i.e IPSV.ttl) and the publisher configs are in <stand-alone publisher>/config/<ModelName> directory.

RunPublisherFromConsole --named-graph=”<NamedGraph>” --config-file=”<config-file>”

For example,

RunPublisherFromConsole --named-graph="IPSV" --config-file=”IPSV/Semaphore-Local-TTL.xml”

Here’s an example of Semaphore-Local-TTL.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans default-lazy-init="true">
    <description>Publish config for LocalTTL file</description>
    
    <bean class="com.smartlogic.publisher.Publisher">
        <property name="model" ref="LocalTTL" />
        <property name="configurationSets">
            <list>
                <ref bean="myAllConcepts" />
            </list>
        </property>
        <!-- <property name="modelUpdater" ref="OEUpdater" />  -->
    </bean>
    
    <bean id="LocalTTL" class="com.smartlogic.publisher.model.LocalJenaModel" parent="modelInterface">
    <property name="modelName" value="${model.name}" />
      <property name="modelFilePaths" >
            <list>
                <value>${config.directory}/${model.name}/modelName.ttl</value>
            </list>
      </property>
      <property name="coreTtlDirPath" value="${resources.directory}/CoreTTLFiles" />
    </bean>

    <!-- Details of to where the rulebases should be published. Multiple instances of PakFilePublisher beans
         may be defined if multiple Classification Server instances are in use. -->
    <bean id="rulebasePublisher" class="com.smartlogic.publisher.pak.PakFilePublisher">
        <property name="classificationServerHost" value="localhost" />
        <property name="classificationServerPort" value="5058" />
        <property name="publishSetName" value="${model.name}" />
    </bean>

    <!-- The configuration set. This instance will include all concepts and concept schemes.
         If you generate multiple configuration sets, you must list them all by id in the Publisher
         bean at the top of this file -->
    <bean id="myAllConcepts" parent="AllResources">
        <property name="outputProcessors">
            <list>
                <!-- The simplest one-field index writer -->
                <bean parent="SolrWriterTemplate" >
                    <!-- The name of the index to be generated -->
                    <property name="indexName" value="${model.name}" />
                    <!-- The URL of the local solr instance -->
                    <property name="solrURL" value="http://localhost:8983/solr"/>
                    <!-- The URLs that should be called if a versioned model is published -->
                    <property name="sesModelsVersionsURLs">
                        <list>
                            <value>http://localhost:8983/ses/modelversions</value>
                        </list>
                    </property>

                    <!-- If using a remote SES index, it may be necessary to specify the Zookeeper host - note the format-->
                    <property name="zkHost" value="localhost:9983"/>

                </bean>
                <bean id="NamedEntityRules" parent="RulebaseWriterTemplate" >
                    <!-- Uncomment the line below if you want to generate the rulebases outside of the pak files -->
                    <!-- <property name="rulebaseOutputDirectory" value="${results.directory}/${model.name}/rulebases"/> -->
                    <!-- Uncomment the line below if you want to write these rulebase files to separate directories dependent on rulebase class -->
                    <!-- <property name="useRulebaseClassDirectories" value="true" /> -->
                    <property name="templateFileName" value="ContextualCitation.kid" />
                </bean>
                <ref bean="rulebasePublisher" />
            </list>
        </property>
    </bean>

    <!-- The following import lines import many default configuration settings
         that will not usually be altered.
         Therefore be careful editing anything below here -->
    <import resource="file:${resources.directory}/import/ModelInterface.xml" />
    <!-- <import resource="file:${resources.directory}/import/ModelDefinition.xml" /> -->
    <import resource="file:${resources.directory}/import/RulebaseStructure.xml" />
    <import resource="file:${resources.directory}/import/SESConfiguration.xml" />
    <import resource="file:${resources.directory}/import/ConfigurationSets.xml" />

    <!-- The line below here is important to the operation of the Semaphore Publisher and should not be altered -->
    <bean id="propConfig" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer" />

</beans>
TitleResults for “How to create a CRG?”Also Available inAlert