Tabnine Logo
Digester.push
Code IndexAdd Tabnine to your IDE (free)

How to use
push
method
in
org.apache.commons.digester.Digester

Best Java code snippets using org.apache.commons.digester.Digester.push (Showing top 20 results out of 711)

origin: jenkinsci/jenkins

@Override
public void begin(String namespace, String name, Attributes attributes) throws Exception {
  Object instance = clazz.newInstance();
  digester.push(instance);
}
origin: commons-digester/commons-digester

/**
 * Process the beginning of this element.
 *
 * @param attributes The attribute list of this element
 */
@Override
public void begin(Attributes attributes) throws Exception {
  // Identify the name of the class to instantiate
  String realClassName = className;
  if (attributeName != null) {
    String value = attributes.getValue(attributeName);
    if (value != null) {
      realClassName = value;
    }
  }
  if (digester.log.isDebugEnabled()) {
    digester.log.debug("[ObjectCreateRule]{" + digester.match +
        "}New " + realClassName);
  }
  // Instantiate the new object and push it on the context stack
  Class<?> clazz = digester.getClassLoader().loadClass(realClassName);
  Object instance = clazz.newInstance();
  digester.push(instance);
}
origin: commons-digester/commons-digester

        instance.getClass().getName()));
  digester.push(instance);
  exceptionIgnoredStack.push(Boolean.FALSE);
      instance.getClass().getName()));
digester.push(instance);
origin: commons-digester/commons-digester

Digester digester = new Digester();
digester.addRuleSet(includedSet);
digester.push(DigesterRuleParser.this);
digester.parse(fileName);
includedFiles.remove(fileName);
origin: commons-validator/commons-validator

/**
 * Create a ValidatorResources object from an InputStream.
 *
 * @param streams An array of InputStreams to several validation.xml
 * configuration files that will be read in order and merged into this object.
 * It's the client's responsibility to close these streams.
 * @throws SAXException if the validation XML files are not valid or well
 * formed.
 * @throws IOException if an I/O error occurs processing the XML files
 * @since Validator 1.1
 */
public ValidatorResources(InputStream[] streams)
    throws IOException, SAXException {
  super();
  Digester digester = initDigester();
  for (int i = 0; i < streams.length; i++) {
    if (streams[i] == null) {
      throw new IllegalArgumentException("Stream[" + i + "] is null");
    }
    digester.push(this);
    digester.parse(streams[i]);
  }
  this.process();
}
origin: commons-validator/commons-validator

/**
 * Create a ValidatorResources object from several uris
 *
 * @param uris An array of uris to several validation.xml
 * configuration files that will be read in order and merged into this object.
 * @throws SAXException if the validation XML files are not valid or well
 * formed.
 * @throws IOException if an I/O error occurs processing the XML files
 * @since Validator 1.2
 */
public ValidatorResources(String[] uris)
    throws IOException, SAXException {
  super();
  Digester digester = initDigester();
  for (int i = 0; i < uris.length; i++) {
    digester.push(this);
    digester.parse(uris[i]);
  }
  this.process();
}
origin: commons-validator/commons-validator

/**
 * Create a ValidatorResources object from several URL.
 *
 * @param urls An array of URL to several validation.xml
 * configuration files that will be read in order and merged into this object.
 * @throws SAXException if the validation XML files are not valid or well
 * formed.
 * @throws IOException if an I/O error occurs processing the XML files
 * @since Validator 1.3.1
 */
public ValidatorResources(URL[] urls)
    throws IOException, SAXException {
  super();
  Digester digester = initDigester();
  for (int i = 0; i < urls.length; i++) {
    digester.push(this);
    digester.parse(urls[i]);
  }
  this.process();
}
origin: commons-digester/commons-digester

rulesDigester.push(parser);
origin: commons-digester/commons-digester

/**
 * Checks whether control needs to be returned to Digester.
 * 
 * @param namespaceURI the namespace URI
 * @param localName the local name
 * @param qName the qualified (prefixed) name
 * @throws SAXException if the DOM implementation throws an exception
 */
@Override
public void endElement(String namespaceURI, String localName,
            String qName)
  throws SAXException {
  
  addTextIfPresent();
  try {
    if (depth == 0) {
      getDigester().setCustomContentHandler(oldContentHandler);
      getDigester().push(root);
      getDigester().endElement(namespaceURI, localName, qName);
    }
    top = top.getParentNode();
    depth--;
  } catch (DOMException e) {
    throw new SAXException(e.getMessage());
  }
}
origin: shopizer-ecommerce/shopizer

digester.push(parsed);
digester.addCallMethod(
    "RatingServiceSelectionResponse/Response/Error",
origin: commons-digester/commons-digester

/**
 * Given the digester rules XML file, a class loader, and an input stream,
 * this method parses the input into Java objects. The class loader
 * is used by the digester to create the Java objects.
 * @param digesterRules URL to the XML document defining the digester rules
 * @param classLoader the ClassLoader to register with the digester
 * @param input InputStream over the XML file to parse into Java objects
 * @param rootObject an Object to push onto the digester's stack, prior
 * to parsing the input
 * @return an Object which is the root of the network of Java objects
 * created by digesting fileURL
 */
public static Object load(URL digesterRules, ClassLoader classLoader,
             InputStream input, Object rootObject) throws IOException, SAXException,
    DigesterLoadingException {
  Digester digester = createDigester(digesterRules);
  digester.setClassLoader(classLoader);
  digester.push(rootObject);
  try {
    return digester.parse(input);
  } catch (XmlLoadException ex) {
    // This is a runtime exception that can be thrown by
    // FromXmlRuleSet#addRuleInstances, which is called by the Digester
    // before it parses the file.
    throw new DigesterLoadingException(ex.getMessage(), ex);
  }
}

origin: shopizer-ecommerce/shopizer

digester.push(parsed);
origin: commons-digester/commons-digester

getDigester().push(instance);
if (debug) {
  log.debug(
origin: commons-digester/commons-digester

Digester digester = createDigester(digesterRules);
digester.setClassLoader(classLoader);
digester.push(rootObject);
try {
  return digester.parse(input);
origin: geotools/geotools

configDto.setBaseSchemasUrl(dataStoreConfigUrl.toExternalForm());
digester.push(configDto);
origin: org.jenkins-ci.main/jenkins-core

@Override
public void begin(String namespace, String name, Attributes attributes) throws Exception {
  Object instance = clazz.newInstance();
  digester.push(instance);
}
origin: com.threerings/nenya-tools

/**
 * Parses the XML file on the supplied input stream into a scene model instance.
 */
public SimpleMisoSceneModel parseScene (InputStream in)
  throws IOException, SAXException
{
  _model = null;
  _digester.push(this);
  _digester.parse(in);
  return _model;
}
origin: org.apache.myfaces.test/myfaces-test22

public void begin(String namespace, String name, Attributes attributes)
{
  RenderKitFactory factory = (RenderKitFactory) FactoryFinder
      .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
  getDigester().push(
      factory.getRenderKit(null,
          RenderKitFactory.HTML_BASIC_RENDER_KIT));
}
origin: org.bitbucket.askllc.fermenter/fermenter-mda

private void loadMetadataFile(InputStream stream) throws Exception {
  TrackErrorsErrorHandler handler = new TrackErrorsErrorHandler(log);
  
  Digester digester = XmlUtils.getNewDigester(handler);
  digester.push(this);
  initialize(digester);
  digester.parse(stream);
  
  if (handler.haveErrorsOccurred()) {
    throw new RuntimeException("XML parsing error(s) encountered; check log for details");
  }
}
 
origin: com.alibaba.citrus.tool/antx-autoexpand

private void readApplicationXml(InputStream istream) throws IOException, SAXException {
  Digester digester = new Digester();
  digester.addCallMethod("application/module/ejb", "add", 1);
  digester.addCallParam("application/module/ejb", 0);
  digester.push(ejbJars);
  digester.parse(istream);
}
org.apache.commons.digesterDigesterpush

Javadoc

Push a new object onto the top of the object stack.

Popular methods of Digester

  • parse
    Parse the content of the specified input source using this Digester. Returns the root element from t
  • addObjectCreate
    Add an "object create" rule for the specified parameters.
  • <init>
    Construct a new Digester, allowing an XMLReader to be passed in. This allows Digester to be used in
  • addSetNext
    Add a "set next" rule for the specified parameters.
  • addSetProperties
    Add a "set properties" rule with overridden parameters. See SetPropertiesRule#SetPropertiesRule(Stri
  • addCallMethod
    Add an "call method" rule for the specified parameters. If paramCount is set to zero the rule will u
  • setValidating
    Set the validating parser flag. This must be called beforeparse() is called the first time.
  • addCallParam
    Add a "call parameter" rule. This will either take a parameter from the stack or from the current el
  • addRule
    Register a new Rule matching the specified pattern. This method sets the Digester property on the r
  • peek
    Gets the top object from the stack with the given name. This method does not remove the object from
  • setNamespaceAware
    Set the "namespace aware" flag for parsers we create.
  • addBeanPropertySetter
    Add a "bean property setter" rule for the specified parameters.
  • setNamespaceAware,
  • addBeanPropertySetter,
  • setClassLoader,
  • setUseContextClassLoader,
  • register,
  • addRuleSet,
  • setEntityResolver,
  • pop,
  • setErrorHandler

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Best IntelliJ 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