Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
DataBrowser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Gui
DataBrowser
Commits
c58c3334
Commit
c58c3334
authored
3 months ago
by
Raphael GIRARDOT
Browse files
Options
Downloads
Patches
Plain Diff
code readapted to changes in CometeTrend (CONTROLGUI-401)
parent
33a98a73
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
databrowser-plugins/tango-plugin/src/main/java/org/cdma/gui/databrowser/impl/tango/TangoFile.java
+47
-8
47 additions, 8 deletions
...n/java/org/cdma/gui/databrowser/impl/tango/TangoFile.java
with
47 additions
and
8 deletions
databrowser-plugins/tango-plugin/src/main/java/org/cdma/gui/databrowser/impl/tango/TangoFile.java
+
47
−
8
View file @
c58c3334
...
...
@@ -23,9 +23,11 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.concurrent.ConcurrentHashMap
;
import
org.cdma.gui.databrowser.interfaces.AxisType
;
import
fr.soleil.comete.bean.trend.controller.CometeTrendController
;
import
fr.soleil.comete.bean.trend.model.TrendFile
;
import
fr.soleil.comete.definition.widget.properties.ChartProperties
;
import
fr.soleil.comete.definition.widget.properties.PlotProperties
;
...
...
@@ -39,20 +41,25 @@ import fr.soleil.data.service.IKey;
public
class
TangoFile
{
private
final
List
<
IKey
>
simpleKeyList
=
new
ArrayList
<>()
;
private
final
List
<
HistoryKey
>
trendKeyList
=
new
ArrayList
<>()
;
private
final
List
<
IKey
>
simpleKeyList
;
private
final
List
<
HistoryKey
>
trendKeyList
;
private
BufferedReader
br
=
null
;
private
final
Map
<
IKey
,
PlotProperties
>
plotPropertiesMap
=
new
HashMap
<>();
private
final
Map
<
IKey
,
PlotProperties
>
plotPropertiesMap
;
private
final
Map
<
String
,
IKey
>
keyMap
;
private
final
ChartProperties
chartProperties
;
private
AxisType
axisType
;
private
TrendFile
trendFile
;
public
TangoFile
(
String
fileName
)
throws
IOException
{
simpleKeyList
=
new
ArrayList
<>();
trendKeyList
=
new
ArrayList
<>();
plotPropertiesMap
=
new
HashMap
<>();
keyMap
=
new
ConcurrentHashMap
<>();
// First test with ATKTrend
TrendFile
trendFile
=
new
TrendFile
(
fileName
);
trendFile
=
new
TrendFile
(
fileName
,
false
);
chartProperties
=
trendFile
.
getChartProperties
();
Collection
<
Entry
<
String
,
PlotProperties
>>
knownPlotProperties
=
trendFile
.
getKnownPlotProperties
();
...
...
@@ -62,9 +69,10 @@ public class TangoFile {
for
(
Entry
<
String
,
PlotProperties
>
entry
:
knownPlotProperties
)
{
String
key
=
entry
.
getKey
();
plotProperties
=
entry
.
getValue
();
IKey
hkey
=
trendFile
.
convertToKey
(
key
);
IKey
hkey
=
convertToKey
(
key
);
if
((
hkey
instanceof
HistoryKey
)
&&
(
plotProperties
.
getAxisChoice
()
!=
TrendFile
.
AXIS_NONE
))
{
trendKeyList
.
add
((
HistoryKey
)
hkey
);
HistoryKey
historyKey
=
(
HistoryKey
)
hkey
;
trendKeyList
.
add
(
historyKey
);
plotPropertiesMap
.
put
(
hkey
,
plotProperties
);
int
index
=
key
.
lastIndexOf
(
'/'
);
if
(
index
>
0
)
{
...
...
@@ -105,6 +113,7 @@ public class TangoFile {
TangoKeyTool
.
registerAttribute
(
tangoKey
,
deviceName
,
attributeName
);
TangoKeyTool
.
registerRefreshed
(
tangoKey
,
false
);
historyKey
=
new
HistoryKey
(
tangoKey
);
}
trendKeyList
.
add
(
historyKey
);
}
}
...
...
@@ -112,6 +121,36 @@ public class TangoFile {
}
}
protected
IKey
createTangoKey
(
String
attributeName
)
{
IKey
tangoKey
=
new
TangoKey
();
TangoKeyTool
.
registerAttribute
(
tangoKey
,
attributeName
);
TangoKeyTool
.
registerRefreshed
(
tangoKey
,
false
);
return
tangoKey
;
}
protected
IKey
convertToKey
(
String
value
)
{
IKey
key
;
if
(
value
==
null
)
{
key
=
null
;
}
else
{
key
=
keyMap
.
get
(
value
);
if
(
key
==
null
)
{
IKey
basicKey
=
null
;
String
completeAttributeName
=
CometeTrendController
.
parseAttributeCompleteName
(
value
);
if
((
value
!=
null
)
&&
!
value
.
trim
().
isEmpty
())
{
basicKey
=
createTangoKey
(
completeAttributeName
);
}
if
(
basicKey
!=
null
)
{
HistoryKey
hkey
=
new
HistoryKey
(
basicKey
);
hkey
.
setUseSuffix
(
false
);
key
=
hkey
;
}
if
(
key
!=
null
)
{
keyMap
.
put
(
value
,
key
);
}
}
}
return
key
;
}
public
void
close
()
{
...
...
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