Pid Cache Manager Service

From MPDLMediaWiki
Jump to: navigation, search
eSciDoc SOA
SOAP and REST style interfaces
Service layers
Core services
Context Handler · Item Handler
Container Handler
Organizational Unit Handler
User Account Handler
Authentication
Content Model Handler
Semantic Store Handler
Intermediate services
Validation Service
Statistics Manager
Technical Metadata extraction
PIDManager
Basket Handler
Duplication detection
ImageHandler(Digilib)

Application services
Depositing
Searching
Search&Export
Control of Named Entities
Citation style Manager
RightsChecking
DataAcquisition
Transformation
Fledged Data
PIDPersistent Identifer or Identification Cache
OAI-PMH

SOA Introduction

edit

This Page describes the PIDPersistent Identifer or Identification cache service.

IDIdentifier (Label)

PIDC

Complete Name

PIDPersistent Identifer or Identification Cache Manager Service

Status

Running with pidmanager 0.6

Description

  • The PIDPersistent Identifer or Identification cache service is a client to the GWDG PID Handle Service.
  • The PIDPersistent Identifer or Identification cache service is used as an alternative to the PIDManager service offered by eSciDocEnhanced Scientific Documentation core infrastructure (PIDPersistent Identifer or Identification Service without pre-cached PIDs).
  • The PIDPersistent Identifer or Identification cache service holds pre-created PIDs which are assigned to an eSciDocEnhanced Scientific Documentation content resource by calling the Item/Container Handler methods (assignObjectPid(), assignVersionPid() or assignContentPid()).

Operations Overview

Operation Status Input Output Description
create implemented URLUniform Resource Locator:String String Scope:Public
Assign a PIDPersistent Identifer or Identification to an URLUniform Resource Locator.
update implemented URLUniform Resource Locator: String
PIDPersistent Identifer or Identification(handler): String
String Scope:Public
Update a PIDPersistent Identifer or Identification with a new URLUniform Resource Locator.
view implemented PIDPersistent Identifer or Identification(handler):String String Scope:Public
Retrieve a PIDPersistent Identifer or Identification (If GWDGGesellschaft für Wissenschaftliche Datenverarbeitung Göttingen service unavailable, can only retrieve PIDPersistent Identifer or Identification that are waiting in cache to be updated at the GWDGGesellschaft für Wissenschaftliche Datenverarbeitung Göttingen).
search implemented URLUniform Resource Locator:String String Scope:Public
Search for a PIDPersistent Identifer or Identification (If GWDGGesellschaft für Wissenschaftliche Datenverarbeitung Göttingen service unavailable, can only search for PIDPersistent Identifer or Identification that are waiting in cache to be updated at the GWDGGesellschaft für Wissenschaftliche Datenverarbeitung Göttingen). Implements only the search by URLUniform Resource Locator so far. Might be extended.

Service Interface

  • The PIDPersistent Identifer or Identification cache service provides a RESTRepresentational State Transfer interface:
    • GET: /pidcache/handle/read, implemting 2 methods:
      • /view?pid= - resolve PIDPersistent Identifer or Identification
      • /search?url= - Find a PIDPersistent Identifer or Identification
    • PUT: Not allowed.
    • POST: /pidcache/handle/write - Implements 2 methods:
      • /create - Create a PIDPersistent Identifer or Identification at GWDGGesellschaft für Wissenschaftliche Datenverarbeitung Göttingen (url passed as body parameter).
      • /update?pid= - Update a PIDPersistent Identifer or Identification with new url (url passed as body parameter)
    • DELETE: (Not allowed)


Installation

  1. Install files in deploy directory:
    1. pidmanger.war
    2. pid_cache.earEnterprise Archive File Formate
    3. pid-cache-ds.xml (see source below)
  2. Defines properties in conf directory and changes with your own credentials (see sources below):
    1. PidManager.properties
    2. gwdg.properties with: <entry key="service.url">http://your.escidoc.url.org:8080/pidcache/handle/</entry> (changes with correct escidoc url)
    3. pidcache.properties (if installed with pubman, then uses pubman.properties instead)
    4. escidoc-core.properties

pid-cache-ds.xml

<?xml version="1.0" encoding="utf-8"?>
<datasources>
	<local-tx-datasource>
		<jndi-name>PidCache</jndi-name>
		<use-java-context>false</use-java-context>
		<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
		<driver-class>org.hsqldb.jdbcDriver</driver-class>
		<user-name>sa</user-name>
		<password></password>
		<min-pool-size>5</min-pool-size>
		<max-pool-size>20</max-pool-size>
		<idle-timeout-minutes>0</idle-timeout-minutes>
		<track-statements/>
		<security-domain>HsqlDbRealm</security-domain>
		<prepared-statement-cache-size>32</prepared-statement-cache-size>
		<metadata>
			<type-mapping>Hypersonic SQLStructured Query Language</type-mapping>
		</metadata>
		<depends>jboss:service=Hypersonic,database=localDB</depends>
	</local-tx-datasource>
</datasources>

escidoc-core.properties

# uncomment following line to use the PIDPersistent Identifer or Identification Manager as PIDPersistent Identifer or Identification service backend
escidoc-core.PidSystemFactory = de.escidoc.core.common.persistence.impl.PIDManagerRESTServiceFactory

#
# set parameter for the PIDPersistent Identifer or Identification Managment service
#
escidoc-core.PidSystemRESTService.host = http://localhost:8080/pidmanager/pid/

# must match <entry key="PIDManager:User"> in PidManager.properties
escidoc-core.PidSystemRESTService.user = pid_manager

# must match <entry key="PIDManager:Password"> in PidManager.properties
escidoc-core.PidSystemRESTService.password = XXX_SOME_PASSWORD_XXX

# must match <entry key="globalPrefix"> in gwdg.properties
escidoc-core.PidSystem.globalPrefix = gwdg

gwdg.properties

<?xml version="1.0" encoding="UTFUnicode Transformation Format-8"?> 
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> 
<properties> 
	<comment>Local Handle Resolver Access Parameter</comment> 
	<!-- customize values to your GWDGGesellschaft für Wissenschaftliche Datenverarbeitung Göttingen handle account -->
	<entry key="globalPrefix">gwdg</entry>

	<entry key="service.url">http://my.escidoc.url.org:8080/pidcache/handle/</entry>
	<entry key="service.username">pid_manager</entry>
	<entry key="service.password">XXX_SAME_PASSWORD_AS_IN_escodoc-core.properties_XXX</entry>

	<!-- define path of service
		e.g. http://hostname:port/pidmanager/pid 
	-->
	<entry key="ResourcePath:Handle">/gwdg</entry>
	<entry key="ResourcePath:Resolve">/gwdg/{suffix}</entry>

	<!-- methods: semantic, random, serial, .. -->
	<!-- debug creates an fixed identifier -->
	<!-- semantic use the identifier which must be given via param. -->
	<!-- <param><systemID>escidoc:40312:4</systemID></param> -->
	<!-- The systemID is automatically added by framework stub.  -->
	<!-- <entry key="generatorMethod">semantic</entry> -->
	<!-- Use value "minter" to receive the identifier from the minter (NOID),
	set to "service" to let the GWDGGesellschaft für Wissenschaftliche Datenverarbeitung Göttingen service create identifier --> 
	
	<entry key="IdGenerator:Mode">service</entry>

	<!-- create identifier with local prefix -->
	<!-- e.g. 12345/test-123abcd456, where test- is the -->
	<!-- configured local prefix part. Leave it empty for no -->
	<!-- prefix. -->
	<entry key="localPrefix"></entry>

	<!-- allow override identifier by client - this means preminted PIDs which are to register -->
	<entry key="IdGenerator:Mode.override">true</entry>

	<!-- log/debug -->
	<entry key="debug">true</entry>
	<entry key="debug.traceMessages">true</entry>

	<!-- Run service without communication with Handle resolver (true/false) -->
	<!-- All response values are predefined -->
	<entry key="debug.coldRun">false</entry>

	<!-- debug identifier must have at minimum length 3 --> 
	<entry key="debug.identifier">test-handle-123:3</entry>

	<entry key="ResourceClass">de.escidoc.pidmanager.pidSystems.handleGWDG.Handle</entry>

	<!-- Class binding -->
	<entry key="BindingResources">Handle;Resolve</entry>
</properties>

pidcache.properties

# PIDPersistent Identifer or Identification cache properties
escidoc.pidcache.cache.size.max=1000
escidoc.pidcache.refresh.interval=1
escidoc.pidcache.dummy.url=http://pubman.mpdl.mpg.de/pubman/faces/PidNotResolved.jsp?id=
escidoc.pid.gwdg.service.url=http://handle.gwdg.de:8080/pidservice
escidoc.pid.gwdg.timeout=10000
escidoc.pid.pidcache.service.url=http://localhost:8080/pidcache/handle
escidoc.pid.service.create.path=/write/create
escidoc.pid.service.view.path=/read/view
escidoc.pid.service.delete.path=/write/delete
escidoc.pid.service.update.path=/write/modify
escidoc.pid.service.search.path=/read/search
escidoc.pid.gwdg.user.login=XXX_YOUR_USER_XXX
escidoc.pid.gwdg.user.password=XXX_YOUR_PASSWORD_XX
# must match <entry key="PIDManager:User"> in PidManager.properties
escidoc.pidcache.user.name=pid_manager
# must match <entry key="PIDManager:Password"> in PidManager.properties
escidoc.pidcache.user.password=XXX_SAME_PASSWORD_AS_IN_escodoc-core.properties_XXX

PidManager.properties

<?xml version="1.0" encoding="UTFUnicode Transformation Format-8"?> 
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> 
<properties> 
<comment>RESTRepresentational State Transfer Structure</comment> 
	<entry key="PIDManager:Port">8080</entry>
        <entry key="PIDManager:ServicePath">/handle</entry>

	<!-- enable/disable access restriction --> 
	<entry key="PIDManager:RestrictAccess">true</entry>
	<!-- change user and password -->
	<entry key="PIDManager:User">pid_manager</entry>
	<entry key="PIDManager:Password">XXX_SAME_PASSWORD_AS_IN_escodoc-core.properties_XXX</entry>
 
	<!-- services -->
	<entry key="Resources">gwdg</entry>

	<entry key="Resource:gwdg">gwdg.properties</entry>

	<!-- logging -->
	<entry key="PIDManager:LogConfigFile">log4j-pidmanager.xml</entry>

	<!-- Set path where static files accessible via HTTPHyperText Transfer Protocol -->
	<entry key="IdGenerator:Storage">SQLite</entry>
	<entry key="SQLite:DBFile">pidmanager.sqlite</entry>

	<!-- Unique Identifier creation via NOID -->
	<!-- entry key="PIDManager:NoidMinterURL">http://localhost/cgi-bin/minter/</entry -->
	<entry key="IdGenerator:NoidMinterURL">http://localhost/cgi-bin/noid/niodu_kt5</entry>

</properties>