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

How to use
RuleSet
in
org.apache.commons.digester

Best Java code snippets using org.apache.commons.digester.RuleSet (Showing top 5 results out of 315)

origin: commons-digester/commons-digester

/**
 * Register a set of Rule instances defined in a RuleSet.
 *
 * @param ruleSet The RuleSet instance to configure from
 */
public void addRuleSet(RuleSet ruleSet) {
  String oldNamespaceURI = getRuleNamespaceURI();
  String newNamespaceURI = ruleSet.getNamespaceURI();
  if (log.isDebugEnabled()) {
    if (newNamespaceURI == null) {
      log.debug("addRuleSet() with no namespace URI");
    } else {
      log.debug("addRuleSet() with namespace URI " + newNamespaceURI);
    }
  }
  setRuleNamespaceURI(newNamespaceURI);
  ruleSet.addRuleInstances(this);
  setRuleNamespaceURI(oldNamespaceURI);
}
origin: commons-digester/commons-digester

/**
 * Add rules to an already created Digester instance, analyzing the digester
 * annotations in the target class.
 *
 * @param target the class has to be analyzed.
 * @param digester the Digester instance reference.
 */
public void addRules(final Class<?> target, final Digester digester) {
  RuleSet ruleSet = getRuleSet(target);
  ruleSet.addRuleInstances(digester);
}
origin: commons-chain/commons-chain

/**
 * <p>Return the <code>Digester</code> instance to be used for
 * parsing, creating one if necessary.</p>
 * @return A Digester instance.
 */
public Digester getDigester() {
  if (digester == null) {
    digester = new Digester();
    RuleSet ruleSet = getRuleSet();
    digester.setNamespaceAware(ruleSet.getNamespaceURI() != null);
    digester.setUseContextClassLoader(getUseContextClassLoader());
    digester.setValidating(false);
    digester.addRuleSet(ruleSet);
  }
  return (digester);
}
origin: org.apache.shale/shale-tiger

/**
 * <p>Return a fully configured <code>Digester</code> instance.</p>
 */
private Digester digester() {
  // Return any previously created instance
  if (digester != null) {
    return digester;
  }
  // Create and configure a new Digester instance
  digester = new Digester();
  digester.setNamespaceAware(false);
  digester.setUseContextClassLoader(true);
  digester.setValidating(isValidating());
  // Register our local copy of DTDs we recognize
  for (int i = 0; i < REGISTRATIONS.length; i += 2) {
    URL url = this.getClass().getResource(REGISTRATIONS[i + 1]);
    digester.register(REGISTRATIONS[i], url.toString());
  }
  // Configure processing rules
  RuleSet ruleSet = null;
  ruleSet = new ManagedBeansRuleSet();
  ruleSet.addRuleInstances(digester);
  // Return the configured instance
  return digester;
}
origin: com.alibaba.citrus.tool/antx-autoexpand

/**
 * Register a set of Rule instances defined in a RuleSet.
 *
 * @param ruleSet The RuleSet instance to configure from
 */
public void addRuleSet(RuleSet ruleSet) {
  String oldNamespaceURI = getRuleNamespaceURI();
  String newNamespaceURI = ruleSet.getNamespaceURI();
  if (log.isDebugEnabled()) {
    if (newNamespaceURI == null) {
      log.debug("addRuleSet() with no namespace URI");
    } else {
      log.debug("addRuleSet() with namespace URI " + newNamespaceURI);
    }
  }
  setRuleNamespaceURI(newNamespaceURI);
  ruleSet.addRuleInstances(this);
  setRuleNamespaceURI(oldNamespaceURI);
}
org.apache.commons.digesterRuleSet

Javadoc

Public interface defining a shorthand means of configuring a complete set of related Rule definitions, possibly associated with a particular namespace URI, in one operation. To use an instance of a class that imlements this interface:

  • Create a concrete implementation of this interface.
  • Optionally, you can configure a RuleSet to be relevant only for a particular namespace URI by configuring the value to be returned by getNamespaceURI().
  • As you are configuring your Digester instance, call digester.addRuleSet() and pass the RuleSet instance.
  • Digester will call the addRuleInstances() method of your RuleSet to configure the necessary rules.

Most used methods

  • addRuleInstances
    Add the set of Rule instances defined in this RuleSet to the specified Digester instance, associati
  • getNamespaceURI
    Return the namespace URI that will be applied to all Rule instances created from this RuleSet.

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • BoxLayout (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 12 Jupyter Notebook extensions
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