Due to a scheduled upgrade to version 14.10, GitLab will be unavailabe on Monday 30.05., from 19:00 until 20:00.

Commit b5b622aa authored by Günter Hipler's avatar Günter Hipler
Browse files

next step in refactoring

parent e302c018
Pipeline #23444 failed with stage
in 2 minutes and 11 seconds
......@@ -25,7 +25,6 @@ package controllers
import javax.inject.Inject
import modules.OaiRepository
import org.swissbib.memobase.oai.common.validation.OaiQueryParameterChecker
import org.swissbib.memobase.oai.request.BaseUserRequest
import org.swissbib.memobase.oai.runner.OaiRunner
import play.api.Configuration
import play.api.mvc.{AbstractController, Action, AnyContent, ControllerComponents, Rendering}
......@@ -60,14 +59,6 @@ class OaiController @Inject()(cc: ControllerComponents)
configuration = config).checkQueryParameter
val response = runner.run().createResponse.toString()
//val response = userRequest.createResponse(config, repository)
/*
todo: make Writable for Node[Seq] so toString isn't necessary
[info] Compiling 4 Scala sources to /home/swissbib/environment/code/swissbib.repositories/memoriav/gitlab/services/oai/target/scala-2.13/classes ...
[error] /home/swissbib/environment/code/swissbib.repositories/memoriav/gitlab/services/oai/app/controllers/OaiController.scala:44:9: Cannot write an instance of Seq[scala.xml.Node] to HTTP response. Try to define a Writeable[Seq[scala.xml.Node]]
[error] Ok(response.createResponse).as("text/xml")
*/
Ok(response).as("text/xml")
}
......
......@@ -23,7 +23,6 @@
package org.swissbib.memobase.oai.common.validation
import org.swissbib.memobase.oai.request.{BadArgumentsReq, BaseUserRequest, IdentifyReq}
import org.swissbib.memobase.oai.runner.{BadArgumentsErrorRunner, IdentifyRunner, OaiRunner}
object IdentifyValidation extends ParameterValidationFunction {
......@@ -49,22 +48,17 @@ object IdentifyValidation extends ParameterValidationFunction {
val diffSetParams = checkParameterByName(allParameter, AllowedParameter.identify)
if (diffSetParams.nonEmpty) {
BadArgumentsErrorRunner(BadArgumentsParameter(verb.get, diffSetParams.map(key => (key, key)).toMap, allParameter ))
//BadArgumentsReq(BadArgumentsParameter(verb.get, diffSetParams.map(key => (key, key)).toMap, allParameter))
} else {
IdentifyRunner(CheckedIdentifyParameter(verb.get, allParameter))
//IdentifyReq(CheckedIdentifyParameter(verb.get, allParameter))
}
case OaiCheckedVerbWithParameter(verb, _, _, _, _, _, _, allParameter, configuration) =>
val diffSetParams = checkParameterByName(allParameter, AllowedParameter.identify)
if (diffSetParams.nonEmpty) {
BadArgumentsErrorRunner(BadArgumentsParameter(verb.get, diffSetParams.map(key => (key, key)).toMap, allParameter ))
//BadArgumentsReq(BadArgumentsParameter(verb.get, diffSetParams.map(key => (key, key)).toMap, allParameter))
} else {
IdentifyRunner(CheckedIdentifyParameter(verb.get, allParameter))
}
}
}
}
}
\ No newline at end of file
......@@ -23,8 +23,7 @@
package org.swissbib.memobase.oai.common.validation
import org.swissbib.memobase.oai.common.util.ESResumptionTokenHelper
import org.swissbib.memobase.oai.request.{BadArgumentsReq, BaseUserRequest, ListIdentifiersReq, ListIdentifiersReqExclusive}
import org.swissbib.memobase.oai.runner.{BadArgumentsErrorRunner, ListIdentifiersRunner, OaiRunner}
import org.swissbib.memobase.oai.runner.{BadArgumentsErrorRunner, ListIdentifiersExclusiveRunner, ListIdentifiersRunner, OaiRunner}
import scala.util.{Failure, Success}
......@@ -73,10 +72,9 @@ object ListIdentifiersValidation extends ParameterValidationFunction {
ESResumptionTokenHelper.createResumptionTokenFromOaiToken(resumptionToken) match {
case Success(rt) =>
checkParameterByName(allParameter, AllowedParameter.listIdentifiersResumption) match {
case Seq() => ???
//ListIdentifiersReqExclusive(CheckedListIdentifiersParameterExclusive(verb.get
//,rt
//,allParameter))
case Seq() => ListIdentifiersExclusiveRunner(CheckedListIdentifiersParameterExclusive(verb.get
,rt
,allParameter))
case setWithIllegalItems => BadArgumentsErrorRunner(BadArgumentsParameter(verb.get
,setWithIllegalItems.map(key => (key, key)).toMap
,allParameter))
......
......@@ -23,7 +23,6 @@
package org.swissbib.memobase.oai.common.validation
import org.swissbib.memobase.oai.request.{BadArgumentsReq, BaseUserRequest, ListMetadataFormatsReq}
import org.swissbib.memobase.oai.runner.{BadArgumentsErrorRunner, ListMetadataFormatsRunner, OaiRunner}
......
......@@ -24,8 +24,7 @@
package org.swissbib.memobase.oai.common.validation
import org.swissbib.memobase.oai.common.util.ESResumptionTokenHelper
import org.swissbib.memobase.oai.request.{BadArgumentsReq, BaseUserRequest, ListRecordsReq, ListRecordsReqExclusive}
import org.swissbib.memobase.oai.runner.{ListRecordsRunner, OaiRunner}
import org.swissbib.memobase.oai.runner.{BadArgumentsErrorRunner, ListRecordsExclusiveRunner, ListRecordsRunner, OaiRunner}
import scala.util.{Failure, Success}
......@@ -73,26 +72,26 @@ object ListRecordsValidation extends ParameterValidationFunction {
ListRecordsRunner(CheckedListRecordsParameter(verb.get,metadataPrefix, from, until, set
,allParameter))
//only resumption token with nothing else is possible
case OaiCheckedVerbWithParameter(verb, None, None, None, None, None, resumptionToken, allParameter, configuration) => ???
case OaiCheckedVerbWithParameter(verb, None, None, None, None, None, resumptionToken, allParameter, configuration) =>
/*
ESResumptionTokenHelper.createResumptionTokenFromOaiToken(resumptionToken.get) match {
case Success(rt) =>
checkParameterByName(allParameter, AllowedParameter.listRecordResumption) match {
case Seq() => ListRecordsReqExclusive(CheckedListRecordsParameterExclusive(verb.get, rt
case Seq() => ListRecordsExclusiveRunner(CheckedListRecordsParameterExclusive(verb.get, rt
, allParameter))
case setWithIllegalItems => BadArgumentsReq(BadArgumentsParameter(verb.get
case setWithIllegalItems => BadArgumentsErrorRunner(BadArgumentsParameter(verb.get
, setWithIllegalItems.map(key => (key, key)).toMap
, allParameter))
}
case Failure(exceptionRT) =>
BadArgumentsReq(BadArgumentsParameter(verb.get,
BadArgumentsErrorRunner(BadArgumentsParameter(verb.get,
Map("resumptionToken" -> exceptionRT.getMessage),
allParameter))
}
*/
case OaiCheckedVerbWithParameter(verb, _, _, _, _, _, _, allParameter, configuration) => ???
......
......@@ -22,7 +22,6 @@
package org.swissbib.memobase.oai.common.validation
import org.swissbib.memobase.oai.request.{BadArgumentsReq, BaseUserRequest, ListSetsReq}
import org.swissbib.memobase.oai.runner.{BadArgumentsErrorRunner, ListSetsRunner, OaiRunner}
/*
......@@ -43,6 +42,11 @@ object ListSetsValidation extends ParameterValidationFunction {
override def apply(v1: OaiCheckedVerbWithParameter): OaiRunner =
v1 match {
//possible valid combination
//todo: wir haben noch den Fall ListSetsExclusiveRunner abgedeckt
// spielt bei uns im Moment aber keine Rolle, da unsere Liste der sets noch beschränkt ist
// es braucht dafür aber ein Konzept
case OaiCheckedVerbWithParameter(verb, None, None, None, None, None, None, allParameter, configuration) =>
checkParameterByName(allParameter, AllowedParameter.listSetsAllowed) match {
......
......@@ -24,7 +24,6 @@ package org.swissbib.memobase.oai.common.validation
import org.swissbib.memobase.oai.common.verb.OaiVerb
import org.swissbib.memobase.oai.common.verb.OaiVerb.OaiVerb
import org.swissbib.memobase.oai.request.{BadArgumentsReq, BaseUserRequest, SystemErrorReq}
import org.swissbib.memobase.oai.runner.{BadArgumentsErrorRunner, OaiRunner}
import scala.util.{Failure, Success}
......
......@@ -23,7 +23,7 @@
package org.swissbib.memobase.oai.common.validation
import org.swissbib.memobase.oai.common.util.ResumptionToken
import org.swissbib.memobase.oai.common.validation.OAIErrorCode.OAIErrorCode
import org.swissbib.memobase.oai.common.verb.OaiVerb.{GetRecord, Identify, ListIdentifiers, ListMetadataFormats, ListRecords, ListSets, OaiVerb}
import scala.util.Try
......
......@@ -23,7 +23,6 @@
package org.swissbib.memobase.oai.common.validation
import org.swissbib.memobase.oai.request.BaseUserRequest
import org.swissbib.memobase.oai.runner.OaiRunner
private object AllowedParameter {
......
/*
* generic OAI Server - agnostic in relation to the data repository
* initially created for memobase project
*
* Copyright (C) 2021 UB Basel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
package org.swissbib.memobase.oai.request
import modules.OaiRepository
import org.swissbib.memobase.oai.common.validation.{BadArgumentsParameter, CheckedGetRecordParameter
, CheckedIdentifyParameter, CheckedListIdentifiersParameter, CheckedListIdentifiersParameterExclusive
, CheckedListMetadaFormatsParameter, CheckedListRecordsParameter, CheckedListRecordsParameterExclusive
, CheckedListSetsParameter, CheckedListSetsParameterExclusive, NoContentForQueryParameter, OaiParameterBase}
import org.swissbib.memobase.oai.runner.{BadArgumentsErrorRunner, GetRecordRunner, IdentifyRunner
, ListIdentifiersExclusiveRunner, ListIdentifiersRunner, ListMetadataFormatsRunner, ListRecordsExclusiveRunner
, ListRecordsRunner, ListSetsRunner, NoContentForQueryRunner}
import play.api.Configuration
sealed abstract class BaseUserRequest {
//todo: does it makes sense to create a more specific type?
// actually OaiResponse returns a Seq[Node] which seems not be a useful type for controllers (because too much xml related)
def createResponse(config: Configuration, repository:OaiRepository): String
def parameterBase: OaiParameterBase
}
/*
sealed abstract class UserRequest(val verb:Option[OaiVerb],
val allQueryParameter: Map[String, Seq[String]]) {
def getRunner(config: Configuration, repository:OaiRepository): OaiRequestRunner
}
*/
case class ListSetsReq(parameter: CheckedListSetsParameter) extends BaseUserRequest {
override def createResponse(config: Configuration, repository: OaiRepository): String = ???
//ListSetsRunner(config,repository,this).run().createResponse.toString()
override def parameterBase: OaiParameterBase = parameter
}
case class ListSetsReqExclusive(parameter: CheckedListSetsParameterExclusive) extends BaseUserRequest {
//todo: use a bad argument request
override def createResponse(config: Configuration, repository: OaiRepository): String = ???
override def parameterBase: OaiParameterBase = parameter
}
case class ListRecordsReq(parameter: CheckedListRecordsParameter) extends BaseUserRequest {
override def createResponse(config: Configuration, repository: OaiRepository): String = ???
// ListRecordsRunner(config,repository,this).run().createResponse.toString()
override def parameterBase: OaiParameterBase = parameter
}
case class ListRecordsReqExclusive(parameter: CheckedListRecordsParameterExclusive) extends BaseUserRequest {
override def createResponse(config: Configuration, repository: OaiRepository): String =
ListRecordsExclusiveRunner(config,repository,this).run().createResponse.toString()
override def parameterBase: OaiParameterBase = parameter
}
case class ListMetadataFormatsReq(parameter: CheckedListMetadaFormatsParameter) extends BaseUserRequest {
override def createResponse(config: Configuration, repository: OaiRepository): String = ???
//ListMetadataFormatsRunner(config,repository,this).run().createResponse.toString()
override def parameterBase: OaiParameterBase = parameter
}
case class ListIdentifiersReq(parameter: CheckedListIdentifiersParameter) extends BaseUserRequest {
override def createResponse(config: Configuration, repository: OaiRepository): String = ???
//ListIdentifiersRunner(config,repository,this).run().createResponse.toString()
override def parameterBase: OaiParameterBase = parameter
}
case class ListIdentifiersReqExclusive(parameter: CheckedListIdentifiersParameterExclusive) extends BaseUserRequest {
override def createResponse(config: Configuration, repository: OaiRepository): String =
ListIdentifiersExclusiveRunner(config,repository,this).run().createResponse.toString()
override def parameterBase: OaiParameterBase = parameter
}
case class GetRecordReq(parameter: CheckedGetRecordParameter) extends BaseUserRequest {
override def createResponse(config: Configuration, repository: OaiRepository): String = ???
//GetRecordRunner(config,repository,this).run().createResponse.toString()
override def parameterBase: OaiParameterBase = parameter
}
case class IdentifyReq(parameter: CheckedIdentifyParameter) extends BaseUserRequest {
override def createResponse(config: Configuration, repository: OaiRepository): String = ???
//IdentifyRunner(config,repository,this).run().createResponse.toString()
override def parameterBase: OaiParameterBase = parameter
}
case class BadArgumentsReq(parameter: BadArgumentsParameter) extends BaseUserRequest {
override def createResponse(config: Configuration, repository: OaiRepository): String = ???
//BadArgumentsErrorRunner(config,repository,this).run().createResponse.toString()
override def parameterBase: OaiParameterBase = parameter
}
case class NoContentForQueryReq(config: Configuration, repository: OaiRepository
, parameter: NoContentForQueryParameter) extends BaseUserRequest {
override def createResponse(config: Configuration, repository: OaiRepository): String =
NoContentForQueryRunner(config,repository,this).run().createResponse.toString
override def parameterBase: OaiParameterBase = parameter
}
case class SystemErrorReq(parameter: Throwable) extends BaseUserRequest {
override def createResponse(config: Configuration, repository: OaiRepository): String = ???
//todo how to mamke this???
override def parameterBase: OaiParameterBase = ???
}
......@@ -28,7 +28,7 @@ import com.typesafe.config.{ConfigObject, ConfigValue}
import modules.{OAIContent, OaiRepository}
import org.swissbib.memobase.oai.common.util.OaiConfig
import org.swissbib.memobase.oai.common.validation.{BadArgumentsParameter, OaiParameterBase}
import org.swissbib.memobase.oai.runner.{BadArgumentsErrorRunner, GetRecordRunner, IdentifyRunner, OaiRequestRunner, ResultList}
import org.swissbib.memobase.oai.runner.ResultList
import play.api.Configuration
import scala.collection.immutable
......@@ -36,7 +36,7 @@ import scala.xml.transform.{RewriteRule, RuleTransformer}
import scala.xml.{Elem, MetaData, Node, Null, Text, TopScope, UnprefixedAttribute, XML}
sealed abstract class OaiResponse1 (oaiConfig: OaiConfig
sealed abstract class OaiResponse (oaiConfig: OaiConfig
,parameter: OaiParameterBase) {
def makeHeader(del: Boolean = false,
......@@ -116,81 +116,11 @@ sealed abstract class OaiResponse1 (oaiConfig: OaiConfig
}
sealed abstract class OaiResponse (runner: OaiRequestRunner) {
def makeHeader (del:Boolean = false,
set: String = "memobaseSet",
datestamp: Instant = Instant.now(),
identifier: String):Elem =
<header status={if (del) Some(Text("deleted")) else None}>
<identifier>{identifier}</identifier>
<datestamp>{datestamp}</datestamp>
<setSpec>{set}</setSpec>
</header>
def createRequestTag: Elem = {
//completely scala xml voodoo...
//https://stackoverflow.com/questions/43751677/how-to-create-xml-attributes-dynamic-via-map-in-scala
//take some time to understand this...
val seed: MetaData = Null
val meta: MetaData = runner.request.parameterBase.allQueryParameter.toList.foldLeft(seed) {
case (acc, (s1, s2)) =>
new UnprefixedAttribute(
//filter out characters used for multiple parameter
key = s1.replaceAll("""[\[\]]""",""),
value = s2.mkString(","),
next = acc
)
}
//first try
//<request verb={runner.request.parameter.verb.toString}>{runner.repository.oaiConfig.identify.baseUrl}</request>
//noinspection ScalaStyle
Elem(
prefix = null,
label = "request",
attributes = meta,
scope = TopScope,
minimizeEmpty = false,
child = Text(runner.repository.oaiConfig.identify.baseUrl)
)
}
protected def createOaiFrame: Elem = {
/*
val oaiFrame =
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
<responseDate>{Instant.now()}</responseDate>
{createRequestTag}
</OAI-PMH>
*/
val oaiFrame =
//noinspection ScalaStyle
<OAI-PMH xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd" xmlns="http://www.openarchives.org/OAI/2.0/" >
<responseDate>{Instant.now()}</responseDate>
{createRequestTag}
</OAI-PMH>
oaiFrame
}
def createResponse:Seq[Node]
override def toString: String = s"Ich bin eine OAI response mit Header für : $getVerb} "
def getVerb:String = ???
}
case class GetRecordResponse(config: Configuration
,repository: OaiRepository
,result: OAIContent
,parameter: OaiParameterBase) extends OaiResponse1(repository.oaiConfig, parameter) {
,parameter: OaiParameterBase) extends OaiResponse(repository.oaiConfig, parameter) {
override def toString: String = s"Ich bin eine GetRecord response mit Header für : GetRecord "
......@@ -226,7 +156,7 @@ case class GetRecordResponse(config: Configuration
case class IdentifyResponse(config: Configuration
,repository: OaiRepository
,parameter: OaiParameterBase) extends OaiResponse1 (repository.oaiConfig,parameter) {
,parameter: OaiParameterBase) extends OaiResponse (repository.oaiConfig,parameter) {
override def toString: String = s"Ich bin eine Identify response mit Header für : Identify "
......@@ -266,7 +196,7 @@ case class IdentifyResponse(config: Configuration
case class ListIdentifiersResponse( config: Configuration
,repository: OaiRepository
,resultList: ResultList
,parameter: OaiParameterBase) extends OaiResponse1 (repository.oaiConfig,parameter) {
,parameter: OaiParameterBase) extends OaiResponse (repository.oaiConfig,parameter) {
override def toString: String = s"Ich bin eine ListIdentifiers response mit Header für : ListIdentifiers"
......@@ -303,7 +233,7 @@ case class ListIdentifiersResponse( config: Configuration
case class ListMetadaFormatsResponse( config: Configuration
,repository: OaiRepository
,parameter: OaiParameterBase) extends OaiResponse1 (repository.oaiConfig,parameter) {
,parameter: OaiParameterBase) extends OaiResponse (repository.oaiConfig,parameter) {
override def toString: String = s"Ich bin eine ListMetadaFormats response mit Header für : ListMetadaFormats "
......@@ -340,7 +270,7 @@ case class ListMetadaFormatsResponse( config: Configuration
case class ListRecordsResponse(config: Configuration
,repository: OaiRepository
,resultList: ResultList
,parameter: OaiParameterBase) extends OaiResponse1 (repository.oaiConfig,parameter) {
,parameter: OaiParameterBase) extends OaiResponse (repository.oaiConfig,parameter) {
override def toString: String = s"Ich bin eine ListRecords response mit Header für : ListRecords "
......@@ -388,7 +318,7 @@ case class ListRecordsResponse(config: Configuration
case class ListSetsResponse(config: Configuration
,repository: OaiRepository
,parameter: OaiParameterBase) extends OaiResponse1 (repository.oaiConfig,parameter) {
,parameter: OaiParameterBase) extends OaiResponse (repository.oaiConfig,parameter) {
override def toString: String = s"Ich bin eine ListSets response mit Header für : ListSets "
......@@ -421,7 +351,7 @@ case class ListSetsResponse(config: Configuration
case class BadArgumentsResponse(config: Configuration
,repository: OaiRepository
,parameter: BadArgumentsParameter) extends OaiResponse1 (repository.oaiConfig,parameter) {
,parameter: BadArgumentsParameter) extends OaiResponse (repository.oaiConfig,parameter) {
override def toString: String = s"Ich bin eine BadArguments response "
......
......@@ -23,9 +23,12 @@
package org.swissbib.memobase.oai.runner
import modules.OaiRepository
import org.swissbib.memobase.oai.common.validation.{BadArgumentsParameter, CheckedGetRecordParameter, CheckedIdentifyParameter, CheckedListIdentifiersParameter, CheckedListMetadaFormatsParameter, CheckedListRecordsParameter, CheckedListSetsParameter, NoContentForQueryParameter, OAIErrorCode, OaiParameterBase}
import org.swissbib.memobase.oai.request.{BadArgumentsReq, BaseUserRequest, GetRecordReq, IdentifyReq, ListIdentifiersReq, ListIdentifiersReqExclusive, ListMetadataFormatsReq, ListRecordsReq, ListRecordsReqExclusive, ListSetsReq, ListSetsReqExclusive, NoContentForQueryReq}
import org.swissbib.memobase.oai.response.{BadArgumentsResponse, GetRecordResponse, IdentifyResponse, ListIdentifiersResponse, ListMetadaFormatsResponse, ListRecordsResponse, ListSetsResponse, OaiResponse, OaiResponse1}
import org.swissbib.memobase.oai.common.validation.{BadArgumentsParameter, CheckedGetRecordParameter
, CheckedIdentifyParameter, CheckedListIdentifiersParameter, CheckedListIdentifiersParameterExclusive
, CheckedListMetadaFormatsParameter, CheckedListRecordsParameter, CheckedListRecordsParameterExclusive
, CheckedListSetsParameter, CheckedListSetsParameterExclusive, NoContentForQueryParameter}
import org.swissbib.memobase.oai.response.{BadArgumentsResponse, GetRecordResponse, IdentifyResponse
, ListIdentifiersResponse, ListMetadaFormatsResponse, ListRecordsResponse, ListSetsResponse, OaiResponse}
import play.api.Configuration
import scala.util.{Failure, Success}
......@@ -33,23 +36,17 @@ import scala.xml.Node
sealed abstract class OaiRunner {
def run()(implicit config: Configuration, repository: OaiRepository): OaiResponse1
def run()(implicit config: Configuration, repository: OaiRepository): OaiResponse
}
sealed abstract class OaiRequestRunner {
def run(): OaiResponse
val config: Configuration
val repository: OaiRepository
val request: BaseUserRequest
}
//todo: this is wrong!
case class IdentifyRunner(parameter: CheckedIdentifyParameter) extends OaiRunner {
override def run()(implicit config: Configuration, repository: OaiRepository): OaiResponse1 = {
override def run()(implicit config: Configuration, repository: OaiRepository): OaiResponse = {
//Identify doesn't need any action on repository
IdentifyResponse(config,repository, parameter)
......@@ -57,14 +54,12 @@ case class IdentifyRunner(parameter: CheckedIdentifyParameter) extends OaiRunner
}
case class GetRecordRunner(parameter: CheckedGetRecordParameter) extends OaiRunner {
override def run()(implicit config: Configuration, repository: OaiRepository): OaiResponse1 = {
override def run()(implicit config: Configuration, repository: OaiRepository): OaiResponse = {
repository.getRecord(parameter.identifier,parameter.metadataPrefix) match {
case Success(result) =>
//config,repository,repositoryRequestResult, repository.oaiConfig,parameter
GetRecordResponse(config, repository, result,parameter)
//todo: handle null
case Failure(exception) => ???
//GetRecordResponse(this,null)
/*
......@@ -85,7 +80,7 @@ case class GetRecordRunner(parameter: CheckedGetRecordParameter) extends OaiRunn
//CheckedListIdentifiersParameter
case class ListIdentifiersRunner(parameter: CheckedListIdentifiersParameter) extends OaiRunner {
override def run()(implicit config: Configuration, repository: OaiRepository): OaiResponse1 = {
override def run()(implicit config: Configuration, repository: OaiRepository): OaiResponse = {
repository.listIdentiers(
from = parameter.from,
......@@ -98,28 +93,29 @@ case class ListIdentifiersRunner(parameter: CheckedListIdentifiersParameter) ext
case Failure(exception) => ???
//ListRecordsResponse(config,repository,null, repository.oaiConfig,parameter)
/*
case Success(value) =>
ListIdentifiersResponse(this,value)
//todo: handle null
case Failure(exception) =>
ListIdentifiersResponse(this,null)
*/
}
}