Sourcecode can be found at:

https://athene2.informatik.unibw-muenchen.de/MASH/communitymashup2

Development environment - Eclipse

Main class: org.sociotech.cm2.server.CommunityMashupServer

Program arguments: 

VM arguments

Basic Sever implementation

DataSetImpl

Stores Item objects in "protected Map<Long,Item> items" - i.e. indexed by the id of the item - ids are Long values!

For creating new Item objects, the class DataFactory should be used:

DataSetImplDB (extends DataSetImpl)

Stores Item objects additionally in relational database - TBD tables

Item

Relevant functions for merging in DataSet


Logging

The Community Mashup server code is using the Simple Logging Facade for Java (SLF4J) for passing log messages. SLF4J currently is passing the log messages via logback - https://logback.qos.ch/manual/index.html

Configuration file logback.xml in ressources:

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%d{HH:mm:ss} %-5level %logger{36} - %msg%n</pattern>
    </encoder>
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter"
      <level>${logback.console.threshold:-DEBUG}</level
    </filter>
  </appender>
  <root level="DEBUG">
    <appender-ref ref="STDOUT" />
  </root>

You may dynamically configure this file by setting the value of logback.console.treshold to other values than DEBUG.

To change to another configuration you may specify the command line parameter: -Dlogback.configurationFile=/xxxx/logback.xml

(Mashup Server) Configuration

For configuration we are using the Apache Commons Configuration Framework.

https://commons.apache.org/proper/commons-configuration/userguide/user_guide.html

Using the Configuration Framework key-value-pairs are loaded from different sources and can be accessed in the code from a Configuration object.

The following sources are combined:

Deployment