Commit 01a59122 authored by Maurice's avatar Maurice
Browse files

Delete DataPathConfigParserNew.java

parent c5b74092
Pipeline #101654 failed with stages
in 11 minutes and 41 seconds
#
#
# ******************************************************************************
# MontiCAR Modeling Family, www.se-rwth.de
# Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
# All rights reserved.
#
# This project is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3.0 of the License, or (at your option) any later version.
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this project. If not, see <http://www.gnu.org/licenses/>.
# *******************************************************************************
#
#configuration chaniautomation
VGG16= ./target/data/VGG16/
Alexnet= ./target/data/Alexnet/
\ No newline at end of file
package de.monticore.lang.monticar.cnnarch.mxnetgenerator;
package de.monticore.lang.monticar.emadl.generator;
import java.io.*;
import java.net.URL;
import java.util.Objects;
import java.util.Properties;
public class DataPathConfigParser{
private String configTargetPath;
private String configFileName;
public DataPathConfigParser(String configPath) {
setConfigPath(configPath);
}
public String getConfigPath() {
if (configTargetPath.charAt(configTargetPath.length() - 1) != '/') {
this.configTargetPath = configTargetPath + "/";
}
return configTargetPath;
}
public void setConfigPath(String configTargetPath){
this.configTargetPath = configTargetPath;
}
public String getDataPath(String modelName) {
Properties properties = new Properties();
try
{
properties.load(new FileInputStream(configTargetPath));
}catch(IOException e)
{
e.printStackTrace();
}
for (String key: properties.stringPropertyNames())
{
if (key == modelName)
return properties.getProperty(key);
}
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment