Commit 985c1e14 authored by dmitry's avatar dmitry
Browse files

initial commit

parents
default:
tags:
- docker
variables:
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
# This template uses open-jdk 11 for verifying and deploying images
image: maven:3.8.5-openjdk-11-slim
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_NAME"'
cache:
paths:
- .m2/repository
# For merge requests do not `deploy` but only run `verify`.
# See https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
.verify: &verify
stage: test
script:
- 'mvn $MAVEN_CLI_OPTS verify'
except:
variables:
- $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# Verify merge requests using JDK11
verify:jdk11:
<<: *verify
deploy:jdk11:
stage: deploy
script:
- if [ ! -f settings.xml ];
then echo "CI settings missing\! If deploying to GitLab Maven Repository, please see https://docs.gitlab.com/ee/user/packages/maven_repository/index.html#create-maven-packages-with-gitlab-cicd for instructions.";
fi
- 'mvn $MAVEN_CLI_OPTS deploy -s settings.xml'
only:
variables:
- $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2022 Spanish National Bioinformatics Institute (INB) and
Barcelona Supercomputing Center
Modifications to the initial code base are copyright of their respective
authors, or their employers as appropriate.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301 USA
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>es.bsc.inb.ga4gh</groupId>
<artifactId>beacon-v2-bsc</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<artifactId>beacon-nosql-model</artifactId>
<packaging>jar</packaging>
<description>
Beacon NoSQL Data Model version 2.0.0
</description>
<organization>
<name>Barcelona Supercomputing Center</name>
<url>https://www.bsc.es/</url>
</organization>
<developers>
<developer>
<id>redmitry</id>
<name>Dmitry Repchevsky</name>
<email>redmitry@list.ru</email>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>es.bsc.inb.ga4gh</groupId>
<artifactId>beacon-data-model</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>jakarta.nosql.mapping</groupId>
<artifactId>mapping-core</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>jakarta.nosql.communication</groupId>
<artifactId>communication-document</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>${jakarta.json.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-api</artifactId>
<version>${jakarta.json.bind.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>gitlab-bsc-maven</id>
<url>https://inb.bsc.es/maven</url>
</repository>
<repository>
<id>jakarta.sonatype.org-snapshot</id>
<url>https://jakarta.oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>oss.sonatype.org-snapshot</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>gitlab-bsc-maven</id>
<url>https://inb.bsc.es/maven</url>
</repository>
<snapshotRepository>
<id>gitlab-bsc-maven</id>
<url>https://inb.bsc.es/maven</url>
</snapshotRepository>
</distributionManagement>
</project>
/**
* *****************************************************************************
* Copyright (C) 2022 ELIXIR ES, Spanish National Bioinformatics Institute (INB)
* and Barcelona Supercomputing Center (BSC)
*
* Modifications to the initial code base are copyright of their respective
* authors, or their employers as appropriate.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
* *****************************************************************************
*/
package es.bsc.inb.ga4gh.beacon.nosql;
import es.bsc.inb.ga4gh.beacon.model.v200.common.Age;
import jakarta.nosql.mapping.Column;
import jakarta.nosql.mapping.Entity;
/**
* @author Dmitry Repchevsky
*/
@Entity("Age")
public class AgeEntity implements Age {
@Column("iso8601duration")
private String iso8601duration;
@Override
public String getIso8601duration() {
return iso8601duration;
}
@Override
public void setIso8601duration(String iso8601duration) {
this.iso8601duration = iso8601duration;
}
}
/**
* *****************************************************************************
* Copyright (C) 2022 ELIXIR ES, Spanish National Bioinformatics Institute (INB)
* and Barcelona Supercomputing Center (BSC)
*
* Modifications to the initial code base are copyright of their respective
* authors, or their employers as appropriate.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
* *****************************************************************************
*/
package es.bsc.inb.ga4gh.beacon.nosql;
import es.bsc.inb.ga4gh.beacon.model.v200.common.AgeRange;
import jakarta.nosql.mapping.Column;
import jakarta.nosql.mapping.Entity;
/**
* @author Dmitry Repchevsky
*/
@Entity("AgeRange")
public class AgeRangeEntity implements AgeRange<AgeEntity> {
@Column("start")
private AgeEntity start;
@Column("end")
private AgeEntity end;
@Override
public AgeEntity getStart() {
return start;
}
@Override
public void setStart(AgeEntity start) {
this.start = start;
}
@Override
public AgeEntity getEnd() {
return end;
}
@Override
public void setEnd(AgeEntity end) {
this.end = end;
}
}
/**
* *****************************************************************************
* Copyright (C) 2022 ELIXIR ES, Spanish National Bioinformatics Institute (INB)
* and Barcelona Supercomputing Center (BSC)
*
* Modifications to the initial code base are copyright of their respective
* authors, or their employers as appropriate.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
* *****************************************************************************
*/
package es.bsc.inb.ga4gh.beacon.nosql;
import es.bsc.inb.ga4gh.beacon.model.v200.analysis.Analysis;
import jakarta.json.JsonObject;
import jakarta.nosql.mapping.Column;
import jakarta.nosql.mapping.Entity;
import jakarta.nosql.mapping.Id;
import java.time.LocalDate;
/**
* @author Dmitry Repchevsky
*/
@Entity("Analyses")
public class AnalysisEntity implements Analysis {
@Id
private String _id;
@Column("id")
private String id;
@Column("runId")
private String runId;
@Column("biosampleId")
private String biosampleId;
@Column("individualId")
private String individualId;
@Column("analysisDate")
private LocalDate analysisDate;
@Column("pipelineName")
private String pipelineName;
@Column("pipelineRef")
private String pipelineRef;
@Column("aligner")
private String aligner;
@Column("variantCaller")
private String variantCaller;
@Column("info")
private JsonObject info;
@Override
public String getId() {
return id;
}
@Override
public void setId(String id) {
this.id = id;
}
@Override
public String getRunId() {
return runId;
}
@Override
public void setRunId(String runId) {
this.runId = runId;
}
@Override
public String getBiosampleId() {
return biosampleId;
}
@Override
public void setBiosampleId(String biosampleId) {
this.biosampleId = biosampleId;
}
@Override
public String getIndividualId() {
return individualId;
}
@Override
public void setIndividualId(String individualId) {
this.individualId = individualId;
}
@Override
public LocalDate getAnalysisDate() {
return analysisDate;
}
@Override
public void setAnalysisDate(LocalDate analysisDate) {
this.analysisDate = analysisDate;
}
@Override
public String getPipelineName() {
return pipelineName;
}
@Override
public void setPipelineName(String pipelineName) {
this.pipelineName = pipelineName;
}
@Override
public String getPipelineRef() {
return pipelineRef;
}
@Override
public void setPipelineRef(String pipelineRef) {
this.pipelineRef = pipelineRef;
}
@Override
public String getAligner() {
return aligner;
}
@Override
public void setAligner(String aligner) {
this.aligner = aligner;
}
@Override
public String getVariantCaller() {
return variantCaller;
}
@Override
public void setVariantCaller(String variantCaller) {
this.variantCaller = variantCaller;
}
@Override
public JsonObject getInfo() {
return info;
}
@Override
public void setInfo(final JsonObject info) {
this.info = info;
}
}
/**
* *****************************************************************************
* Copyright (C) 2022 ELIXIR ES, Spanish National Bioinformatics Institute (INB)
* and Barcelona Supercomputing Center (BSC)
*
* Modifications to the initial code base are copyright of their respective
* authors, or their employers as appropriate.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
* *****************************************************************************
*/
package es.bsc.inb.ga4gh.beacon.nosql;
import es.bsc.inb.ga4gh.beacon.model.v200.biosample.Biosample;
import jakarta.json.JsonObject;
import jakarta.nosql.mapping.Column;
import jakarta.nosql.mapping.Entity;
import jakarta.nosql.mapping.Id;
import java.time.LocalDate;
import java.util.List;
/**
* @author Dmitry Repchevsky
*/
@Entity("Biosamples")
public class BiosampleEntity
implements Biosample<OntologyTermEntity, ProcedureEntity, PhenotypicFeatureEntity, MeasurementEntity> {
@Id
private String _id;
@Column("id")
private String id;
@Column("individualId")
private String individualId;
@Column("notes")
private String notes;
@Column("biosampleStatus")
private OntologyTermEntity biosampleStatus;
@Column("collectionDate")
private LocalDate collectionDate;
@Column("collectionMoment")
private String collectionMoment;
@Column("sampleOriginType")
private OntologyTermEntity sampleOriginType;
@Column("sampleOriginDetail")
private OntologyTermEntity sampleOriginDetail;
@Column("obtentionProcedure")
private ProcedureEntity obtentionProcedure;
@Column("tumorProgression")
private OntologyTermEntity tumorProgression;
@Column("tumorGrade")
private OntologyTermEntity tumorGrade;
@Column("pathologicalStage")
private OntologyTermEntity pathologicalStage;
@Column("pathologicalTnmFinding")
private OntologyTermEntity pathologicalTnmFinding;
@Column("histologicalDiagnosis")
private OntologyTermEntity histologicalDiagnosis;
@Column("diagnosticMarkers")
private OntologyTermEntity diagnosticMarkers;
@Column("phenotypicFeatures")
private List<PhenotypicFeatureEntity> phenotypicFeatures;
@Column("measurements")
private List<MeasurementEntity> measurements;
@Column("sampleProcessing")
private OntologyTermEntity sampleProcessing;
@Column("sampleStorage")
private OntologyTermEntity sampleStorage;
@Column("info")
private JsonObject info;
@Override
public String getId() {
return id;
}
@Override
public void setId(String id) {
this.id = id;
}
@Override
public String getIndividualId() {
return individualId;
}
@Override
public void setIndividualId(String individualId) {
this.individualId = individualId;
}
@Override
public String getNotes() {