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
5fb554ed
Commit
5fb554ed
authored
13 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
dead code
SVN: 21829
parent
85eb79cc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/PropertyTypeModel.java
+0
-72
0 additions, 72 deletions
...lient/web/client/application/model/PropertyTypeModel.java
with
0 additions
and
72 deletions
openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/PropertyTypeModel.java
deleted
100644 → 0
+
0
−
72
View file @
85eb79cc
/*
* Copyright 2008 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.systemsx.cisd.openbis.generic.client.web.client.application.model
;
import
com.extjs.gxt.ui.client.data.ModelData
;
import
com.google.gwt.user.client.DOM
;
import
com.google.gwt.user.client.Element
;
import
ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.framework.IColumnDefinitionKind
;
import
ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.specific.PropertyTypeColDefKind
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.GridRowModel
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.PropertyType
;
/**
* {@link ModelData} for {@link PropertyType}.
*
* @author Izabela Adamczyk
* @author Tomasz Pylak
*/
public
class
PropertyTypeModel
extends
BaseEntityModel
<
PropertyType
>
{
private
static
final
long
serialVersionUID
=
1L
;
public
PropertyTypeModel
(
GridRowModel
<
PropertyType
>
entity
,
IColumnDefinitionKind
<
PropertyType
>[]
colDefKinds
)
{
super
(
entity
,
colDefKinds
);
overwriteTypes
(
PropertyTypeColDefKind
.
EXPERIMENT_TYPES
);
overwriteTypes
(
PropertyTypeColDefKind
.
MATERIAL_TYPES
);
overwriteTypes
(
PropertyTypeColDefKind
.
SAMPLE_TYPES
);
}
// changes the column value from the export format to the display format
private
void
overwriteTypes
(
PropertyTypeColDefKind
columnKind
)
{
String
columnId
=
columnKind
.
id
();
String
commaValues
=
get
(
columnId
);
String
newValue
=
rerenderTypes
(
commaValues
);
set
(
columnId
,
newValue
);
}
// transforms comma separated value list by replacing each comma with a div element. It results
// in one item displayed per line.
private
static
String
rerenderTypes
(
String
commaValues
)
{
String
[]
tokens
=
commaValues
.
split
(
","
);
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
tokens
.
length
;
i
++)
{
final
Element
div
=
DOM
.
createDiv
();
div
.
setInnerText
(
tokens
[
i
].
trim
());
sb
.
append
(
div
.
getString
());
}
String
newValue
=
sb
.
toString
();
return
newValue
;
}
}
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