Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
languages
CNNArchLang
Commits
80f7c878
Commit
80f7c878
authored
Jan 31, 2019
by
Hoda Anvari Kazemabad
Browse files
New DataPathConfigParser
parent
fe4fc081
Pipeline
#101569
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/cnnarch/DataPathConfigParsernew.java
0 → 100644
View file @
80f7c878
package
de.monticore.lang.monticar.cnnarch.mxnetgenerator
;
import
de.monticore.lang.monticar.cnntrain._symboltable.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
class
DataPathConfigParser
{
private
String
configTargetPath
;
ConfigurationSymbol
configuration
;
private
String
configFileName
;
public
DataPathConfigParser
(
ConfigurationSymbol
configuration
,
String
configPath
)
{
this
.
configuration
=
configuration
;
setConfigPath
(
configPath
);
setConfigFileName
(
"ConfigChainAutomation"
);
}
public
String
getConfigFileName
()
{
return
configFileName
;
}
public
void
setConfigFileName
(
String
configFileName
){
this
.
configFileName
=
configFileName
+
".cnnt"
;
}
public
String
getConfigPath
()
{
if
(
configTargetPath
.
charAt
(
configTargetPath
.
length
()
-
1
)
!=
'/'
)
{
this
.
configTargetPath
=
configTargetPath
+
"/"
;
}
return
configTargetPath
;
}
public
void
setConfigPath
(
String
configTargetPath
){
this
.
configTargetPath
=
configTargetPath
+
getConfigFileName
;
}
public
ConfigurationSymbol
getConfiguration
()
{
return
configuration
;
}
public
String
getDataPath
(
String
modelName
)
{
if
(!
getConfiguration
().
getEntryMap
().
containsKey
(
modelName
))
{
return
null
;
}
return
String
.
valueOf
(
getConfiguration
().
getEntry
(
modelName
).
getValue
());
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment