+ private String getLocationField() throws GeneratorException {
+ String locationString = location.getText();
+ if (locationString.length() < 1) {
+ return "";
+ }
+ if (locationString.contains("\n")) {
+ throw new GeneratorException(
+ "Location should not contain \\n characters.");
+ }
+ return "LOCATION:" + locationString + "\r\n";
+ }
+
+ private String getDescriptionField() throws GeneratorException {
+ String descriptionString = description.getText();
+ if (descriptionString.length() < 1) {
+ return "";
+ }
+ if (descriptionString.contains("\n")) {
+ throw new GeneratorException(
+ "Description should not contain \\n characters.");
+ }
+ return "DESCRIPTION:" + descriptionString + "\r\n";
+ }
+