Mercurial > lada > lada-server
diff src/main/java/de/intevation/lada/data/importer/LAFFormat.java @ 366:567ce7697fc7 0.5
Code documentation.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 10 Sep 2013 15:55:54 +0200 |
parents | 5844d7457dde |
children | 183f8116d9a6 |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/data/importer/LAFFormat.java Tue Sep 10 10:17:32 2013 +0200 +++ b/src/main/java/de/intevation/lada/data/importer/LAFFormat.java Tue Sep 10 15:55:54 2013 +0200 @@ -13,11 +13,23 @@ import org.json.JSONException; import org.json.JSONObject; - +/** + * The LAFFormat reads the config file + * (https://bfs-intern.intevation.de/Server/Importer) and creates format + * objects for each entry. + * + * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> + */ public class LAFFormat { private JSONObject fileContent; + /** + * Reads the config file. + * + * @param fileName Path to the config file. + * @return success + */ public boolean readConfigFile(String fileName) { try { byte[] encoded = Files.readAllBytes(Paths.get(fileName)); @@ -35,6 +47,16 @@ } } + /** + * Returns a List of EntryFormat for the requested entity type. + * The Entity type can be one of: + * * "probe" + * * "messung" + * * "ort" + * + * @param dataType The entity type + * @return List of entry formats defined for the requested type. + */ public List<EntryFormat> getFormat(String dataType) { List<EntryFormat> formats = new LinkedList<EntryFormat>(); try {