Skip to content

Commit

Permalink
Merge pull request #354 from qbicsoftware/development
Browse files Browse the repository at this point in the history
Introduce minimal Schema for nanopore registration  (#350)
  • Loading branch information
Steffengreiner authored Feb 13, 2023
2 parents 0775f0e + 13365c3 commit bf0a815
Show file tree
Hide file tree
Showing 8 changed files with 1,437 additions and 205 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package life.qbic.datamodel.datasets.datastructure.files.nanopore

import life.qbic.datamodel.datasets.datastructure.files.DataFile

/**
* Unspecific OptionalFile used to store unexpected file in the nanopore registration
*
* The high variety of the nanopore datasets registered made an optional all-purpose Datafile structure necessary.
*
*/
class OptionalFile extends DataFile {

protected OptionalFile() {}

protected OptionalFile(String name, String relativePath, String fileType) {
super(name, relativePath, fileType)
}

/**
* Creates a new instance of a OptionalFile object
* @param name The name of the file
* @param relativePath The relative path of the file
* @param fileType The suffix specifying the file type of the file
* @return A new instance of a OptionalFile object
*/
static OptionalFile create(String name, String relativePath, String fileType) {
return new OptionalFile(name, relativePath, fileType)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package life.qbic.datamodel.datasets.datastructure.folders.nanopore

import life.qbic.datamodel.datasets.datastructure.folders.DataFolder

/**
* Unspecific Optional Folder used to store unexpected folders in the nanopore registration
*
* The high variety of the nanopore datasets registered made an optional all-purpose Datafolder structure necessary.
*
*/
class OptionalFolder extends DataFolder {

protected OptionalFolder() {}

protected OptionalFolder(String name, String relativePath, List children) {
super(name, relativePath, children)
}

/**
* Creates a new instance of a OptionalFolder object
* @param relativePath The relative path of the folder
* @param children A list with child elements of unknown type of the folder
* @return A new instance of a OptionalFolder object
*/
static OptionalFolder create(String name, String relativePath, List<?> children) {
new OptionalFolder(name, relativePath, children)
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package life.qbic.datamodel.instruments


/**
* Represents the Nanopore instrument output data structure schema.
*
* The original schema is defined in as resource and is
* referenced here, wrapped in a Groovy class for reference
* in applications that want to validate the instrument
* output structure against the schema.
*/
class OxfordNanoporeInstrumentOutputMinimal {

private static final String SCHEMA_PATH = "/schemas/nanopore-instrument-output_minimal_schema.json"

static InputStream getSchemaAsStream() {
return OxfordNanoporeInstrumentOutputMinimal.getResourceAsStream(SCHEMA_PATH)
}
}
Loading

0 comments on commit bf0a815

Please sign in to comment.