-
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
30 changed files
with
475 additions
and
52 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
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,21 @@ | ||
package ubic.gemma.core.analysis.service; | ||
|
||
import ubic.gemma.model.analysis.AnalysisResultSet; | ||
import ubic.gemma.model.analysis.AnalysisResultSetValueObject; | ||
import ubic.gemma.persistence.service.BaseVoEnabledService; | ||
|
||
/** | ||
* 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<O extends AnalysisResultSet, V extends AnalysisResultSetValueObject<O>> extends BaseVoEnabledService<O, V> { | ||
|
||
/** | ||
* | ||
* @param i | ||
* @return | ||
*/ | ||
V loadValueObjectsLimit( 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
13 changes: 13 additions & 0 deletions
13
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,13 @@ | ||
package ubic.gemma.model.analysis; | ||
|
||
import ubic.gemma.persistence.service.BaseVoEnabledDao; | ||
|
||
/** | ||
* Generic DAO for manipulating {@link AnalysisResultSet}. | ||
* | ||
* @param <O> | ||
* @param <VO> | ||
*/ | ||
public interface AnalysisResultSetDao<O extends AnalysisResultSet, VO extends AnalysisResultSetValueObject<O>> extends BaseVoEnabledDao<O, VO> { | ||
|
||
} |
45 changes: 45 additions & 0 deletions
45
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,45 @@ | ||
/* | ||
* 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; | ||
import java.util.stream.Collectors; | ||
|
||
/** | ||
* Exposes an {@link AnalysisResultSet} to the public API. | ||
* | ||
* @param <R> type of analysis result set this is wrapping. | ||
*/ | ||
public abstract class AnalysisResultSetValueObject<R extends AnalysisResultSet> extends IdentifiableValueObject<R> { | ||
|
||
private final Collection<AnalysisResultValueObject> analysisResults; | ||
|
||
public AnalysisResultSetValueObject( AnalysisResultSet<AnalysisResult> analysisResultSet ) { | ||
super( analysisResultSet.getId() ); | ||
this.analysisResults = analysisResultSet.getResults() | ||
.stream().map( AnalysisResultValueObject::new ) | ||
.collect( Collectors.toList() ); | ||
} | ||
|
||
public Collection<AnalysisResultValueObject> getAnalysisResults() { | ||
return analysisResults; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
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,28 @@ | ||
/* | ||
* 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; | ||
|
||
public 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
43 changes: 43 additions & 0 deletions
43
...gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultValueObject.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,43 @@ | ||
/* | ||
* The Gemma project | ||
* | ||
* Copyright (c) 2010 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.expression.diff; | ||
|
||
import ubic.gemma.model.IdentifiableValueObject; | ||
|
||
public class DifferentialExpressionAnalysisResultValueObject extends IdentifiableValueObject<DifferentialExpressionAnalysisResult> { | ||
|
||
private final Double pValue; | ||
private final Double correctedPvalue; | ||
private final Double rank; | ||
|
||
public DifferentialExpressionAnalysisResultValueObject( DifferentialExpressionAnalysisResult result ) { | ||
super( result.getId() ); | ||
this.pValue = result.getPvalue(); | ||
this.correctedPvalue = result.getCorrectedPvalue(); | ||
this.rank = result.getRank(); | ||
} | ||
|
||
public Double getPvalue() { | ||
return pValue; | ||
} | ||
|
||
public Double getCorrectedPvalue() { | ||
return correctedPvalue; | ||
} | ||
|
||
public Double getRank() { | ||
return rank; | ||
} | ||
} |
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.