public class PathExtractorImpl extends Object implements PathExtractor
com.sun.speech.freetts.interpretCartPaths - default false com.sun.speech.freetts.lazyCartCompile - default truecom.sun.speech.freetts.interpretCartPaths Instances of this class will optionally pre-compile the paths. Pre-compiling paths reduces the processing time and objects needed to extract a feature or an item based upon a path.
Modifier and Type | Field and Description |
---|---|
private Object[] |
compiledPath |
private String |
feature |
private static boolean |
INTERPRET_PATHS |
static String |
INTERPRET_PATHS_PROPERTY
If this system property is set to true, paths will
not be compiled.
|
private static boolean |
LAZY_COMPILE |
static String |
LAZY_COMPILE_PROPERTY
If this system property is set to true, CART feature/item
paths will only be compiled as needed.
|
private static Logger |
LOGGER
Logger instance.
|
private String |
path |
private String |
pathAndFeature |
private boolean |
wantFeature |
Constructor and Description |
---|
PathExtractorImpl(String pathAndFeature,
boolean wantFeature)
Creates a path for the given feature.
|
Modifier and Type | Method and Description |
---|---|
private Object[] |
compile(String path)
Compiles the given path into the compiled form
|
Object |
findFeature(Item item)
Finds the feature associated with this Path.
|
Item |
findItem(Item item)
Finds the item associated with this Path.
|
String |
toString() |
public static final String INTERPRET_PATHS_PROPERTY
public static final String LAZY_COMPILE_PROPERTY
private static final boolean INTERPRET_PATHS
private static final boolean LAZY_COMPILE
private String pathAndFeature
private Object[] compiledPath
private boolean wantFeature
public PathExtractorImpl(String pathAndFeature, boolean wantFeature)
public Item findItem(Item item)
findItem
in interface PathExtractor
item
- the item to start atpublic Object findFeature(Item item)
findFeature
in interface PathExtractor
item
- the item to start atprivate Object[] compile(String path)
path
- the path to compileWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses