-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from jorizci/EE-504
EE-504 accessioning alpha application
- Loading branch information
Showing
166 changed files
with
4,879 additions
and
2,428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
*.class | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.ear | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
# IntelliJ files | ||
*.iml | ||
.idea | ||
|
||
# Maven target directory | ||
target | ||
/.project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
src/main/java/uk/ac/ebi/ega/accession/analysis/persistence/AnalysisEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* | ||
* Copyright 2018 EMBL - European Bioinformatics Institute | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
package uk.ac.ebi.ega.accession.analysis.persistence; | ||
|
||
import uk.ac.ebi.ampt2d.commons.accession.core.models.AccessionWrapper; | ||
import uk.ac.ebi.ampt2d.commons.accession.persistence.jpa.entities.AccessionedEntity; | ||
import uk.ac.ebi.ega.accession.analysis.model.Analysis; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
|
||
@Entity | ||
public class AnalysisEntity extends AccessionedEntity<Analysis, Long> implements Analysis { | ||
|
||
@Column(nullable = false) | ||
private String submissionAccount; | ||
|
||
@Column(nullable = false) | ||
private String alias; | ||
|
||
AnalysisEntity() { | ||
super(null, null, -1); | ||
} | ||
|
||
public AnalysisEntity(Analysis analysis, Long accession, String hashedMessage, int version) { | ||
super(hashedMessage, accession, version); | ||
this.submissionAccount = analysis.getSubmissionAccount(); | ||
this.alias = analysis.getAlias(); | ||
} | ||
|
||
public AnalysisEntity(AccessionWrapper<Analysis, String, Long> wrapper) { | ||
this(wrapper.getData(), wrapper.getAccession(), wrapper.getHash(), wrapper.getVersion()); | ||
} | ||
|
||
@Override | ||
public Analysis getModel() { | ||
return this; | ||
} | ||
|
||
@Override | ||
public String getSubmissionAccount() { | ||
return submissionAccount; | ||
} | ||
|
||
@Override | ||
public String getAlias() { | ||
return alias; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/uk/ac/ebi/ega/accession/analysis/persistence/AnalysisEntityRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* | ||
* Copyright 2018 EMBL - European Bioinformatics Institute | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
package uk.ac.ebi.ega.accession.analysis.persistence; | ||
|
||
import org.springframework.stereotype.Repository; | ||
import uk.ac.ebi.ampt2d.commons.accession.persistence.repositories.IAccessionedObjectRepository; | ||
|
||
@Repository | ||
public interface AnalysisEntityRepository extends IAccessionedObjectRepository<AnalysisEntity, Long> { | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/uk/ac/ebi/ega/accession/analysis/persistence/AnalysisEntityRepositoryImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* | ||
* Copyright 2018 EMBL - European Bioinformatics Institute | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
package uk.ac.ebi.ega.accession.analysis.persistence; | ||
|
||
import org.springframework.transaction.PlatformTransactionManager; | ||
import uk.ac.ebi.ampt2d.commons.accession.persistence.jpa.repositories.BasicJpaAccessionedObjectCustomRepositoryImpl; | ||
|
||
import javax.persistence.EntityManager; | ||
|
||
public class AnalysisEntityRepositoryImpl extends BasicJpaAccessionedObjectCustomRepositoryImpl<Long, AnalysisEntity> { | ||
|
||
public AnalysisEntityRepositoryImpl(PlatformTransactionManager platformTransactionManager, EntityManager entityManager) { | ||
super(AnalysisEntity.class, platformTransactionManager, entityManager); | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
src/main/java/uk/ac/ebi/ega/accession/analysis/persistence/HistoricAnalysisEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* | ||
* Copyright 2018 EMBL - European Bioinformatics Institute | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
package uk.ac.ebi.ega.accession.analysis.persistence; | ||
|
||
import uk.ac.ebi.ampt2d.commons.accession.persistence.jpa.entities.InactiveAccessionEntity; | ||
import uk.ac.ebi.ega.accession.analysis.model.Analysis; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
|
||
@Entity | ||
public class HistoricAnalysisEntity extends InactiveAccessionEntity<Analysis, Long> implements Analysis { | ||
|
||
@Column(nullable = false) | ||
private String submissionAccount; | ||
|
||
@Column(nullable = false) | ||
private String alias; | ||
|
||
HistoricAnalysisEntity() { | ||
super(); | ||
} | ||
|
||
public HistoricAnalysisEntity(AnalysisEntity entity) { | ||
super(entity); | ||
this.submissionAccount = entity.getSubmissionAccount(); | ||
this.alias = entity.getAlias(); | ||
} | ||
|
||
@Override | ||
public Analysis getModel() { | ||
return this; | ||
} | ||
|
||
@Override | ||
public String getSubmissionAccount() { | ||
return submissionAccount; | ||
} | ||
|
||
@Override | ||
public String getAlias() { | ||
return alias; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/uk/ac/ebi/ega/accession/analysis/persistence/HistoricAnalysisRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* | ||
* Copyright 2018 EMBL - European Bioinformatics Institute | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
package uk.ac.ebi.ega.accession.analysis.persistence; | ||
|
||
import org.springframework.stereotype.Repository; | ||
import uk.ac.ebi.ampt2d.commons.accession.persistence.jpa.repositories.InactiveAccessionRepository; | ||
|
||
@Repository | ||
public interface HistoricAnalysisRepository extends InactiveAccessionRepository<HistoricAnalysisEntity> { | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/uk/ac/ebi/ega/accession/analysis/persistence/HistoricLogAnalysisEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* | ||
* Copyright 2018 EMBL - European Bioinformatics Institute | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
package uk.ac.ebi.ega.accession.analysis.persistence; | ||
|
||
import uk.ac.ebi.ampt2d.commons.accession.persistence.jpa.entities.OperationEntity; | ||
|
||
import javax.persistence.Entity; | ||
|
||
@Entity | ||
public class HistoricLogAnalysisEntity extends OperationEntity<Long> { | ||
} |
26 changes: 26 additions & 0 deletions
26
...main/java/uk/ac/ebi/ega/accession/analysis/persistence/HistoricLogAnalysisRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* | ||
* Copyright 2018 EMBL - European Bioinformatics Institute | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
package uk.ac.ebi.ega.accession.analysis.persistence; | ||
|
||
import org.springframework.stereotype.Repository; | ||
import uk.ac.ebi.ampt2d.commons.accession.persistence.repositories.IHistoryRepository; | ||
|
||
@Repository | ||
public interface HistoricLogAnalysisRepository extends IHistoryRepository<Long, HistoricLogAnalysisEntity, Long> { | ||
|
||
} |
54 changes: 54 additions & 0 deletions
54
src/main/java/uk/ac/ebi/ega/accession/analysis/rest/AnalysisDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* | ||
* Copyright 2018 EMBL - European Bioinformatics Institute | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
package uk.ac.ebi.ega.accession.analysis.rest; | ||
|
||
import uk.ac.ebi.ega.accession.analysis.model.Analysis; | ||
|
||
import javax.persistence.Column; | ||
|
||
public class AnalysisDTO implements Analysis { | ||
|
||
@Column(nullable = false) | ||
private String submissionAccount; | ||
|
||
@Column(nullable = false) | ||
private String alias; | ||
|
||
AnalysisDTO(){ | ||
} | ||
|
||
public AnalysisDTO(Analysis analysis) { | ||
this(analysis.getSubmissionAccount(), analysis.getAlias()); | ||
} | ||
|
||
public AnalysisDTO(String submissionAccount, String alias) { | ||
this.submissionAccount = submissionAccount; | ||
this.alias = alias; | ||
} | ||
|
||
@Override | ||
public String getSubmissionAccount() { | ||
return submissionAccount; | ||
} | ||
|
||
@Override | ||
public String getAlias() { | ||
return alias; | ||
} | ||
|
||
} |
Oops, something went wrong.