Esempio n. 1
0
 /**
  * Checks whether all content within the given HTML element should be discarded instead of
  * including it in the parse output. Subclasses can override this method to customize the set of
  * discarded elements.
  *
  * @param name HTML element name (upper case)
  * @return <code>true</code> if content inside the named element should be ignored, <code>false
  *     </code> otherwise
  * @since Apache Tika 0.5
  * @deprecated Use the {@link HtmlMapper} mechanism to customize the HTML mapping. This method
  *     will be removed in Tika 1.0.
  */
 protected boolean isDiscardElement(String name) {
   return DefaultHtmlMapper.INSTANCE.isDiscardElement(name);
 }
Esempio n. 2
0
 /**
  * @deprecated Use the {@link HtmlMapper} mechanism to customize the HTML mapping. This method
  *     will be removed in Tika 1.0.
  */
 public String mapSafeAttribute(String elementName, String attributeName) {
   return DefaultHtmlMapper.INSTANCE.mapSafeAttribute(elementName, attributeName);
 }
Esempio n. 3
0
 /**
  * Maps "safe" HTML element names to semantic XHTML equivalents. If the given element is unknown
  * or deemed unsafe for inclusion in the parse output, then this method returns <code>null</code>
  * and the element will be ignored but the content inside it is still processed. See the {@link
  * #isDiscardElement(String)} method for a way to discard the entire contents of an element.
  *
  * <p>Subclasses can override this method to customize the default mapping.
  *
  * @param name HTML element name (upper case)
  * @return XHTML element name (lower case), or <code>null</code> if the element is unsafe
  * @since Apache Tika 0.5
  * @deprecated Use the {@link HtmlMapper} mechanism to customize the HTML mapping. This method
  *     will be removed in Tika 1.0.
  */
 protected String mapSafeElement(String name) {
   return DefaultHtmlMapper.INSTANCE.mapSafeElement(name);
 }