Skip to content
Permalink
Browse files

Ensure the vocabulary is reset in between running action sets.

  • Loading branch information
chrisala committed Nov 16, 2017
1 parent 765d685 commit 3188f6af29015efa1b4c1fde46c0ec3bf44da4cd
@@ -30,6 +30,7 @@
import au.org.ala.delta.rtf.RTFUtils;
import au.org.ala.delta.translation.IterativeTranslator;
import au.org.ala.delta.translation.PrintFile;
import au.org.ala.delta.translation.Words;
import au.org.ala.delta.util.Functor;

import java.io.PrintStream;
@@ -184,6 +185,7 @@ public Object invoke(DeltaContext context) {
return sdf.format(new Date());
}
});
Words.initialise();

_dataSet = dataSet;
_maxNumberOfItems = dataSet.getMaximumNumberOfItems();
@@ -20,12 +20,22 @@
OR, TO, AND, VARIABLE, UNKNOWN, NOT_APPLICABLE, VARIANT, NOT_CODED, NEVER, MINIMUM,
MAXIMUM, UP_TO, OR_MORE, FULL_STOP, COMMA, ALTERNATE_COMMA, SEMICOLON, FULL_STOP_AGAIN, RANGE};

private static String[] _vwords = {

private static String[] _defaults = {
"or", "to", "and", "variable", "unknown", "not applicable", "(variant)", "not coded",
"never", "minimum", "maximum", "up to", "or more", ".", ",", ",", ";", ".", "-"};



private static String[] _vwords;

public static void initialise() {
_vwords = new String[_defaults.length];
System.arraycopy(_defaults, 0, _vwords, 0, _defaults.length);
}

static {
initialise();
}

public static String word(Word word) {
return _vwords[word.ordinal()];
}

0 comments on commit 3188f6a

Please sign in to comment.
You can’t perform that action at this time.