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

Method match

src/java/org/apache/nutch/parse/ParserFactory.java:410–415  ·  view source on GitHub ↗
(Extension extension, String id, String type)

Source from the content-addressed store, hash-verified

408 }
409
410 private boolean match(Extension extension, String id, String type) {
411 return (id.equals(extension.getId()))
412 && (extension.getAttribute("contentType").equals("*")
413 || type.matches(escapeContentType(extension
414 .getAttribute("contentType"))) || type.equals(DEFAULT_PLUGIN));
415 }
416
417 /** Get an extension from its id and supported content-type. */
418 private Extension getExtension(Extension[] list, String id, String type) {

Callers 1

getExtensionMethod · 0.95

Calls 5

escapeContentTypeMethod · 0.95
equalsMethod · 0.45
getIdMethod · 0.45
getAttributeMethod · 0.45
matchesMethod · 0.45

Tested by

no test coverage detected