MCPcopy Create free account
hub / github.com/apache/nutch / getFields

Method getFields

src/java/org/apache/nutch/parse/ParserFactory.java:208–223  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

206 }
207
208 public Collection<WebPage.Field> getFields() {
209 Set<WebPage.Field> columns = new HashSet<WebPage.Field>();
210 Extension[] extensions = this.extensionPoint.getExtensions();
211 for (Extension ext : extensions) {
212 try {
213 Parser parser = (Parser) ext.getExtensionInstance();
214 Collection<WebPage.Field> pluginFields = parser.getFields();
215 if (pluginFields != null) {
216 columns.addAll(pluginFields);
217 }
218 } catch (PluginRuntimeException e) {
219 LOG.error("PluginRuntimeException", e);
220 }
221 }
222 return columns;
223 }
224
225 /**
226 * Finds the best-suited parse plugin for a given contentType.

Callers 1

getFieldsMethod · 0.95

Calls 4

getExtensionInstanceMethod · 0.80
errorMethod · 0.80
getFieldsMethod · 0.65
getExtensionsMethod · 0.45

Tested by

no test coverage detected