public class DependencyExtractorManager extends Object
DependencyExtractor
instances responsible for reading all of the different dependency parsing
output formats. This class provides access to a default DependencyExtractor, which is the set either explicitly, or is set when the
first DependencyExtractor is added. This class also provides access
to DependencyExtractor instances by name in the event than a user
should need to process a format generated by a specific parser.| Modifier and Type | Method and Description |
|---|---|
static void |
addExtractor(String name,
DependencyExtractor extractor)
Adds the provided
DependencyExtractor to the set of available
extractors. |
static void |
addExtractor(String name,
DependencyExtractor extractor,
boolean isDefault)
Adds the provided
DependencyExtractor to the set of available
extractors, optionally setting the extractor as the default. |
static DependencyExtractor |
getDefaultExtractor()
Returns the default extractor used by this manager.
|
static DependencyExtractor |
getExtractor(String name)
Returns the extractor with the specified name.
|
public static void addExtractor(String name, DependencyExtractor extractor)
DependencyExtractor to the set of available
extractors. If an existing extractor has the same name, the existing
extactor is overwritten. If no extractors have been added, the provided
extractor becomes the default extractor.name - the name of the parser that generated the parse trees.extractor - the an extractor instanceNullPointerException - if either name or extractor
are null.public static void addExtractor(String name, DependencyExtractor extractor, boolean isDefault)
DependencyExtractor to the set of available
extractors, optionally setting the extractor as the default. If an
existing extractor has the same name, the existing extactor is
overwritten.name - the name of the parser that generated the parse trees.extractor - the extractor instanceisDefault - true if this extractor should be the default
returned by this classNullPointerException - if either name or extractor
are null.public static DependencyExtractor getExtractor(String name)
name - the name associated with an extractor.IllegalArgumentException - if no extractor is known for the namepublic static DependencyExtractor getDefaultExtractor()
IllegalStateException - if no default extractor has been setCopyright © 2012. All Rights Reserved.