congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
AbstractOnMatchFilter.saveToXML
Code IndexAdd Tabnine to your IDE (free)

How to use
saveToXML
method
in
com.norconex.importer.handler.filter.AbstractOnMatchFilter

Best Java code snippets using com.norconex.importer.handler.filter.AbstractOnMatchFilter.saveToXML (Showing top 3 results out of 315)

origin: com.norconex.collectors/norconex-importer

@Override
protected final void saveHandlerToXML(EnhancedXMLStreamWriter writer)
    throws XMLStreamException {
  onMatch.saveToXML(writer);
  saveFilterToXML(writer);
}
protected abstract void saveFilterToXML(EnhancedXMLStreamWriter writer)
origin: com.norconex.collectors/norconex-collector-core

@Override
public void saveToXML(Writer out) throws IOException {
  XMLOutputFactory factory = XMLOutputFactory.newInstance();
  try {
    XMLStreamWriter writer = factory.createXMLStreamWriter(out);
    writer.writeStartElement("filter");
    writer.writeAttribute("class", getClass().getCanonicalName());
    super.saveToXML(writer);
    writer.writeAttribute("caseSensitive", 
        Boolean.toString(caseSensitive));
    writer.writeCharacters(regex == null ? "" : regex);
    writer.writeEndElement();
    writer.flush();
    writer.close();
  } catch (XMLStreamException e) {
    throw new IOException("Cannot save as XML.", e);
  }
}
 
origin: com.norconex.collectors/norconex-collector-core

@Override
public void saveToXML(Writer out) throws IOException {
  XMLOutputFactory factory = XMLOutputFactory.newInstance();
  try {
    XMLStreamWriter writer = factory.createXMLStreamWriter(out);
    writer.writeStartElement("filter");
    writer.writeAttribute("class", getClass().getCanonicalName());
    super.saveToXML(writer);
    writer.writeAttribute("caseSensitive", 
        Boolean.toString(caseSensitive));
    writer.writeAttribute("field", field); 
    writer.writeCharacters(regex == null ? "" : regex);
    writer.writeEndElement();
    writer.flush();
    writer.close();
  } catch (XMLStreamException e) {
    throw new IOException("Cannot save as XML.", e);
  }
}
 
com.norconex.importer.handler.filterAbstractOnMatchFiltersaveToXML

Javadoc

Convenience method for subclasses to save the "onMatch" attribute to an XML file when XMLConfiguration is used.

Popular methods of AbstractOnMatchFilter

  • loadFromXML
    Convenience method for subclasses to load the "onMatch" attribute from an XML file when XMLConfigura
  • equals
  • getOnMatch
  • hashCode
  • setOnMatch
  • toString

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now