Tabnine Logo
AbstractOnMatchFilter
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: com.norconex.collectors/norconex-importer

@Override
protected final void loadHandlerFromXML(
    XMLConfiguration xml) throws IOException {
  onMatch.loadFromXML(xml);
  loadFilterFromXML(xml);
}
protected abstract void loadFilterFromXML(
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-importer

@Override
public OnMatch getOnMatch() {
  return onMatch.getOnMatch();
}
origin: com.norconex.collectors/norconex-collector-core

@Override
public int hashCode() {
  return new HashCodeBuilder()
    .appendSuper(super.hashCode())
    .append(caseSensitive)
    .append(regex)
    .toHashCode();
}
 
origin: com.norconex.collectors/norconex-collector-core

@Override
public String toString() {
  return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
    .appendSuper(super.toString())
    .append("caseSensitive", caseSensitive)
    .append("regex", regex)
    .toString();
}
origin: com.norconex.collectors/norconex-collector-core

@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (!(obj instanceof RegexMetadataFilter)) {
    return false;
  }
  RegexMetadataFilter other = (RegexMetadataFilter) obj;
  return new EqualsBuilder()
    .appendSuper(super.equals(obj))
    .append(caseSensitive, other.caseSensitive)
    .append(field, other.field)
    .append(regex, other.regex)
    .isEquals();
}
 
origin: com.norconex.collectors/norconex-importer

public final void setOnMatch(OnMatch onMatch) {
  this.onMatch.setOnMatch(onMatch);
}
origin: com.norconex.collectors/norconex-collector-core

  @Override
  public int hashCode() {
    return new HashCodeBuilder()
      .appendSuper(super.hashCode())
      .append(caseSensitive)
      .append(field)
      .append(regex)
      .toHashCode();
  }
}
origin: com.norconex.collectors/norconex-collector-core

@Override
public String toString() {
  return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
    .appendSuper(super.toString())
    .append("extensions", extensions)
    .append("caseSensitive", caseSensitive)
    .toString();
}
@Override
origin: com.norconex.collectors/norconex-collector-core

  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    if (!(obj instanceof ExtensionReferenceFilter)) {
      return false;
    }
    ExtensionReferenceFilter other = (ExtensionReferenceFilter) obj;
    return new EqualsBuilder()
      .appendSuper(super.equals(obj))
      .append(caseSensitive, other.caseSensitive)
      .append(extensions, other.extensions)
      .isEquals();
  }
}
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 loadFromXML(Reader in) {
  XMLConfiguration xml = XMLConfigurationUtil.newXMLConfiguration(in);
  setRegex(xml.getString(""));
  super.loadFromXML(xml);
  setCaseSensitive(xml.getBoolean("[@caseSensitive]", false));
}
@Override
origin: com.norconex.collectors/norconex-collector-core

@Override
public int hashCode() {
  return new HashCodeBuilder()
    .appendSuper(super.hashCode())
    .append(caseSensitive)
    .append(extensions)
    .toHashCode();
}
@Override
origin: com.norconex.collectors/norconex-collector-core

@Override
public String toString() {
  return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
    .appendSuper(super.toString())
    .append("caseSensitive", caseSensitive)
    .append("field", field)
    .append("regex", regex)
    .toString();
}
 
origin: com.norconex.collectors/norconex-collector-core

  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    if (!(obj instanceof RegexReferenceFilter)) {
      return false;
    }
    RegexReferenceFilter other = (RegexReferenceFilter) obj;
    return new EqualsBuilder()
      .appendSuper(super.equals(obj))
      .append(caseSensitive, other.caseSensitive)
      .append(regex, other.regex)
      .isEquals();
  }
}
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);
  }
}
 
origin: com.norconex.collectors/norconex-collector-core

@Override
public void loadFromXML(Reader in) {
  XMLConfiguration xml = XMLConfigurationUtil.newXMLConfiguration(in);
  setField(xml.getString("[@field]"));
  setRegex(xml.getString(""));
  super.loadFromXML(xml);
  setCaseSensitive(xml.getBoolean("[@caseSensitive]", false));
}
@Override
com.norconex.importer.handler.filterAbstractOnMatchFilter

Javadoc

Convenience base class for implementing filters offering the include/exclude "onmatch" option. Default behavior on match is to include.

Most used methods

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

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • notifyDataSetChanged (ArrayAdapter)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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