Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
388e7b91
Commit
388e7b91
authored
11 years ago
by
cramakri
Browse files
Options
Downloads
Patches
Plain Diff
CCS-35 SP-627 : Make yeastlab ipad app use new java infrastructure
SVN: 29173
parent
5a107be2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
plasmid/.classpath
+1
-0
1 addition, 0 deletions
plasmid/.classpath
plasmid/.project
+11
-11
11 additions, 11 deletions
plasmid/.project
plasmid/source/java/ch/ethz/bsse/cisd/yeastlab/ipad/v2/server/IpadYeastlabUtilities.java
+80
-0
80 additions, 0 deletions
...e/cisd/yeastlab/ipad/v2/server/IpadYeastlabUtilities.java
with
92 additions
and
11 deletions
plasmid/.classpath
+
1
−
0
View file @
388e7b91
...
@@ -17,5 +17,6 @@
...
@@ -17,5 +17,6 @@
<classpathentry
kind=
"lib"
path=
"/libraries/commons-lang/commons-lang.jar"
sourcepath=
"/libraries/commons-lang/src.zip"
/>
<classpathentry
kind=
"lib"
path=
"/libraries/commons-lang/commons-lang.jar"
sourcepath=
"/libraries/commons-lang/src.zip"
/>
<classpathentry
kind=
"lib"
path=
"/libraries/commons-io/commons-io.jar"
sourcepath=
"/libraries/commons-io/src.zip"
/>
<classpathentry
kind=
"lib"
path=
"/libraries/commons-io/commons-io.jar"
sourcepath=
"/libraries/commons-io/src.zip"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER"
/>
<classpathentry
combineaccessrules=
"false"
kind=
"src"
path=
"/openbis-ipad"
/>
<classpathentry
kind=
"output"
path=
"targets/classes"
/>
<classpathentry
kind=
"output"
path=
"targets/classes"
/>
</classpath>
</classpath>
This diff is collapsed.
Click to expand it.
plasmid/.project
+
11
−
11
View file @
388e7b91
...
@@ -14,15 +14,15 @@
...
@@ -14,15 +14,15 @@
<natures>
<natures>
<nature>
org.eclipse.jdt.core.javanature
</nature>
<nature>
org.eclipse.jdt.core.javanature
</nature>
</natures>
</natures>
<filteredResources>
<filteredResources>
<filter>
<filter>
<id>
1332321366607
</id>
<id>
1332321366607
</id>
<name></name>
<name></name>
<type>
26
</type>
<type>
26
</type>
<matcher>
<matcher>
<id>
org.eclipse.ui.ide.multiFilter
</id>
<id>
org.eclipse.ui.ide.multiFilter
</id>
<arguments>
1.0-name-matches-true-false-.git
</arguments>
<arguments>
1.0-name-matches-true-false-.git
</arguments>
</matcher>
</matcher>
</filter>
</filter>
</filteredResources>
</filteredResources>
</projectDescription>
</projectDescription>
This diff is collapsed.
Click to expand it.
plasmid/source/java/ch/ethz/bsse/cisd/yeastlab/ipad/v2/server/IpadYeastlabUtilities.java
0 → 100644
+
80
−
0
View file @
388e7b91
/*
* Copyright 2013 ETH Zuerich, CISD
*
* 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
ch.ethz.bsse.cisd.yeastlab.ipad.v2.server
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
ch.systemsx.cisd.etlserver.registrator.api.v1.ISample
;
import
ch.systemsx.cisd.openbis.ipad.v2.server.IpadServiceUtilities
;
/**
* @author cramakri
*/
public
class
IpadYeastlabUtilities
{
/**
* Return a collection of properties, ordered by display ordering, skipping propsToIgnore.
*/
public
static
List
<
String
>
orderedPropertiesForSampleIgnoring
(
ISample
sample
,
List
<
String
>
propsToIgnore
)
{
return
null
;
}
/**
* Convert a sample to a dictionary, ignoring the specified properties.
* <p>
* <ul>
* <li>Uses the NAME property to construct the summary.</li>
* <li>Returns empty children.</li>
* <li>Callers may need to modify the summary and children as well</li>
* </ul>
*/
public
static
Map
<
String
,
Object
>
samplToDictWithPropsIgnoring
(
ISample
sample
,
boolean
wantProps
,
List
<
String
>
propsToIgnore
)
{
HashMap
<
String
,
Object
>
sampleDict
=
new
HashMap
<
String
,
Object
>();
sampleDict
.
put
(
"SUMMARY_HEADER"
,
sample
.
getCode
());
String
name
=
sample
.
getPropertyValue
(
"NAME"
);
String
summary
=
(
null
!=
name
)
?
"Name: "
+
name
:
"??"
;
sampleDict
.
put
(
"SUMMARY"
,
summary
);
sampleDict
.
put
(
"IDENTIFIER"
,
sample
.
getSampleIdentifier
());
sampleDict
.
put
(
"PERM_ID"
,
sample
.
getPermId
());
HashMap
<
String
,
String
>
refconSample
=
new
HashMap
<
String
,
String
>();
refconSample
.
put
(
"code"
,
sample
.
getCode
());
refconSample
.
put
(
"entityKind"
,
"SAMPLE"
);
refconSample
.
put
(
"entityType"
,
sample
.
getSampleType
());
sampleDict
.
put
(
"REFCON"
,
IpadServiceUtilities
.
jsonEncodedValue
(
refconSample
));
sampleDict
.
put
(
"CATEGORY"
,
sample
.
getSampleType
());
sampleDict
.
put
(
"CHILDREN"
,
IpadServiceUtilities
.
jsonEncodedValue
(
Collections
.
emptyList
()));
if
(
wantProps
)
{
List
<
String
>
sampleProperties
=
orderedPropertiesForSampleIgnoring
(
sample
,
propsToIgnore
);
sampleDict
.
put
(
"PROPERTIES"
,
IpadServiceUtilities
.
jsonEncodedValue
(
sampleProperties
));
}
sampleDict
.
put
(
"ROOT_LEVEL"
,
false
);
return
sampleDict
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment