Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SASC
sentinel-legacy
Commits
903c2182
Commit
903c2182
authored
Jul 06, 2015
by
bow
Browse files
Define JSON formats in main RunsProcessor definition
parent
f38ada1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/scala/nl/lumc/sasc/sentinel/processors/RunsProcessor.scala
View file @
903c2182
...
...
@@ -17,24 +17,27 @@
package
nl.lumc.sasc.sentinel.processors
import
java.io.ByteArrayInputStream
import
scala.util.Try
import
com.mongodb.casbah.Imports._
import
com.mongodb.casbah.gridfs.GridFSDBFile
import
com.novus.salat._
import
com.novus.salat.global._
import
org.scalatra.servlet.FileItem
import
nl.lumc.sasc.sentinel.Pipeline
import
nl.lumc.sasc.sentinel.db.MongodbAccessObject
import
nl.lumc.sasc.sentinel.models.
{
PipelineStats
,
BaseRunRecord
,
User
}
import
nl.lumc.sasc.sentinel.utils.
{
DuplicateFileException
,
calcMd5
,
getUtcTimeNow
}
import
org.scalatra.servlet.FileItem
import
scala.util.Try
import
nl.lumc.sasc.sentinel.utils.
{
DuplicateFileException
,
SentinelJsonFormats
,
calcMd5
,
getUtcTimeNow
}
/**
* Base class for processing run summary files.
*/
abstract
class
RunsProcessor
(
protected
val
mongo
:
MongodbAccessObject
)
extends
Processor
{
/** JSON formats used by this processor. */
implicit
val
formats
=
SentinelJsonFormats
/**
* Processes and stores the given uploaded file to the run records collection.
*
...
...
src/main/scala/nl/lumc/sasc/sentinel/processors/gentrap/GentrapV04RunsProcessor.scala
View file @
903c2182
...
...
@@ -30,7 +30,7 @@ import scalaz.{ Failure => _, _ }, Scalaz._
import
nl.lumc.sasc.sentinel.Pipeline
import
nl.lumc.sasc.sentinel.db._
import
nl.lumc.sasc.sentinel.models._
import
nl.lumc.sasc.sentinel.utils.
{
SentinelJsonFormats
,
calcMd5
,
getUtcTimeNow
}
import
nl.lumc.sasc.sentinel.utils.
{
calcMd5
,
getUtcTimeNow
}
import
nl.lumc.sasc.sentinel.utils.implicits._
import
nl.lumc.sasc.sentinel.validation.ValidationAdapter
...
...
@@ -46,9 +46,6 @@ class GentrapV04RunsProcessor(mongo: MongodbAccessObject)
with
ReferencesAdapter
with
AnnotationsAdapter
{
/** JSON formats used by this processor. */
implicit
val
formats
=
SentinelJsonFormats
/** Extracts a reference record from a Gentrap summary. */
private
[
processors
]
def
extractReference
(
runJson
:
JValue
)
:
ReferenceRecord
=
{
val
refJson
=
runJson
\
"gentrap"
\
"settings"
\
"reference"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment