-
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.
Add skeleton for querying result sets
- Loading branch information
Showing
32 changed files
with
598 additions
and
56 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
gemma-core/src/main/java/ubic/gemma/core/analysis/service/AnalysisResultSetService.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,29 @@ | ||
package ubic.gemma.core.analysis.service; | ||
|
||
import ubic.gemma.model.analysis.AnalysisResult; | ||
import ubic.gemma.model.analysis.AnalysisResultSet; | ||
import ubic.gemma.model.analysis.AnalysisResultSetValueObject; | ||
import ubic.gemma.model.analysis.expression.diff.ExpressionAnalysisResultSet; | ||
import ubic.gemma.model.expression.bioAssay.BioAssay; | ||
import ubic.gemma.persistence.service.BaseVoEnabledService; | ||
|
||
import java.util.Collection; | ||
|
||
/** | ||
* Interface for services providing {@link AnalysisResultSet}. | ||
* | ||
* @param <O> the type of result set | ||
* @param <V> a value object type to expose result sets | ||
*/ | ||
public interface AnalysisResultSetService<K extends AnalysisResult, O extends AnalysisResultSet<K>, V extends AnalysisResultSetValueObject<K, O>> extends BaseVoEnabledService<O, V> { | ||
|
||
/** | ||
* | ||
* | ||
* @param datasets | ||
* @param externalIds | ||
* @param i | ||
* @return | ||
*/ | ||
Collection<O> findByDatasetInAndExternalIdsLimit( Collection<BioAssay> datasets, Collection<String> externalIds, int i ); | ||
} |
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
10 changes: 10 additions & 0 deletions
10
gemma-core/src/main/java/ubic/gemma/model/analysis/AnalysisResult.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,10 @@ | ||
package ubic.gemma.model.analysis; | ||
|
||
import ubic.gemma.model.common.Identifiable; | ||
|
||
/** | ||
* Abstract class representing a single result from an {@link Analysis} and a typical part of an {@link AnalysisResultSet}. | ||
*/ | ||
public abstract class AnalysisResult implements Identifiable { | ||
|
||
} |
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
26 changes: 26 additions & 0 deletions
26
gemma-core/src/main/java/ubic/gemma/model/analysis/AnalysisResultSetDao.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 @@ | ||
package ubic.gemma.model.analysis; | ||
|
||
import ubic.gemma.model.analysis.expression.diff.ExpressionAnalysisResultSet; | ||
import ubic.gemma.model.expression.bioAssay.BioAssay; | ||
import ubic.gemma.persistence.service.BaseVoEnabledDao; | ||
|
||
import java.util.Collection; | ||
|
||
/** | ||
* Generic DAO for manipulating {@link AnalysisResultSet}. | ||
* | ||
* @param <O> | ||
* @param <VO> | ||
*/ | ||
public interface AnalysisResultSetDao<K extends AnalysisResult, O extends AnalysisResultSet<K>, VO extends AnalysisResultSetValueObject<K, O>> extends BaseVoEnabledDao<O, VO> { | ||
|
||
/** | ||
* Retrieve result sets associated to a set of {@link BioAssay} and external identifiers. | ||
* | ||
* @param bioAssayIds related {@link BioAssay}, or any if null | ||
* @param externalIds related external identifier associated to the {@link BioAssay}, or any if null | ||
* @param limit maximum number of results to return | ||
* @return | ||
*/ | ||
Collection<ExpressionAnalysisResultSet> findByDatasetInAndExternalIdsLimit( Collection<BioAssay> bioAssayIds, Collection<String> externalIds, int limit ); | ||
} |
38 changes: 38 additions & 0 deletions
38
gemma-core/src/main/java/ubic/gemma/model/analysis/AnalysisResultSetValueObject.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,38 @@ | ||
/* | ||
* The Gemma project | ||
* | ||
* Copyright (c) 2006 University of British Columbia | ||
* | ||
* 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 ubic.gemma.model.analysis; | ||
|
||
import ubic.gemma.model.IdentifiableValueObject; | ||
|
||
import java.util.Collection; | ||
|
||
/** | ||
* Exposes an {@link AnalysisResultSet} to the public API. | ||
* | ||
* @param <K> underlying type of analysis result in the set | ||
* @param <R> type of analysis result set this is wrapping. | ||
*/ | ||
public abstract class AnalysisResultSetValueObject<K extends AnalysisResult, R extends AnalysisResultSet<K>> extends IdentifiableValueObject<R> { | ||
|
||
protected AnalysisResultSetValueObject( R analysisResultSet ) { | ||
super( analysisResultSet.getId() ); | ||
} | ||
|
||
public abstract Collection<AnalysisResultValueObject<K>> getAnalysisResults(); | ||
} |
33 changes: 33 additions & 0 deletions
33
gemma-core/src/main/java/ubic/gemma/model/analysis/AnalysisResultValueObject.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,33 @@ | ||
/* | ||
* The Gemma project | ||
* | ||
* Copyright (c) 2006 University of British Columbia | ||
* | ||
* 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 ubic.gemma.model.analysis; | ||
|
||
import ubic.gemma.model.IdentifiableValueObject; | ||
|
||
/** | ||
* Wraps an {@link AnalysisResult} to expose it on the public API. | ||
* | ||
* @param <A> type of {@link AnalysisResult} being wrapped by this value object | ||
*/ | ||
public abstract class AnalysisResultValueObject<A extends AnalysisResult> extends IdentifiableValueObject<A> { | ||
|
||
public AnalysisResultValueObject( AnalysisResult analysisResult ) { | ||
super( analysisResult.getId() ); | ||
} | ||
} |
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
Oops, something went wrong.