Codota Logo
AbstractOnMatchFilter
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
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("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 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("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 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

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getContentResolver (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now