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

How to use
SAXPathException
in
org.jaxen.saxpath

Best Java code snippets using org.jaxen.saxpath.SAXPathException (Showing top 20 results out of 315)

origin: jaxen/jaxen

  throw new SAXPathException( "Class [" + className 
   + "] does not implement the org.jaxen.saxpath.XPathReader interface." );
throw new SAXPathException( e );
throw new SAXPathException( e );
throw new SAXPathException( e );
origin: jaxen/jaxen

/** Print this exception's stack trace, followed by the
 *  source exception's stack trace, if any.
 *
 * @param s the writer on which to print the stack trace
 */
public void printStackTrace ( PrintWriter s )
{
  super.printStackTrace( s );
  if (javaVersion < 1.4 && getCause() != null) {
    s.print( "Caused by: " );
    getCause().printStackTrace( s );
  }
}
origin: jaxen/jaxen

/**
 * Create a new SAXPathException with the specified detail message
 * and root cause.
 * 
 * @param message the detail message
 * @param cause the cause of this exception
 */
public SAXPathException(String message, Throwable cause) {
  super( message );
  initCause(cause);
}

origin: org.dom4j/dom4j

public XPathPattern(String text) {
  this.text = text;
  this.context = new Context(getContextSupport());
  try {
    this.pattern = PatternParser.parse(text);
  } catch (SAXPathException e) {
    throw new InvalidXPathException(text, e.getMessage());
  } catch (RuntimeException e) {
    throw new InvalidXPathException(text);
  }
}
origin: jaxen/jaxen

  public static List evaluate (Context context, Object arg)
    throws FunctionCallException
  {
    List contextNodes = context.getNodeSet();
    
    if (contextNodes.size() == 0)
      return Collections.EMPTY_LIST;
   
    Navigator nav = context.getNavigator();

    String xpathString;
    if ( arg instanceof String )
      xpathString = (String)arg;
    else
      xpathString = StringFunction.evaluate(arg, nav);

    try {
      XPath xpath = nav.parseXPath(xpathString);
      ContextSupport support = context.getContextSupport();
      xpath.setVariableContext( support.getVariableContext() );
      xpath.setFunctionContext( support.getFunctionContext() );
      xpath.setNamespaceContext( support.getNamespaceContext() );
      return xpath.selectNodes( context.duplicate() );
    }
    catch ( org.jaxen.saxpath.SAXPathException e ) {
      throw new FunctionCallException(e.toString());
    }
  }
}
origin: dom4j/dom4j

public XPathPattern(String text) {
  this.text = text;
  this.context = new Context(getContextSupport());
  try {
    this.pattern = PatternParser.parse(text);
  } catch (SAXPathException e) {
    throw new InvalidXPathException(text, e.getMessage());
  } catch (RuntimeException e) {
    throw new InvalidXPathException(text);
  }
}
origin: smooks/smooks

  public static String getNamespace(String nsPrefix, Properties namespaces) throws SAXPathException {
    String namespace = namespaces.getProperty(nsPrefix);

    if(namespace == null) {
      namespace = Namespace.SMOOKS_PREFIX_MAPPINGS.getProperty(nsPrefix);
      if(namespace == null) {
        throw new SAXPathException("Unknown namespace prefix '" + nsPrefix + "'.  You must define the namespace prefix-to-uri mappings in the Smooks <core:namespaces> configuration section.");
      }
    }
    return namespace;
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j

public XPathPattern(String text) {
  this.text = text;
  this.context = new Context(getContextSupport());
  try {
    this.pattern = PatternParser.parse(text);
  } catch (SAXPathException e) {
    throw new InvalidXPathException(text, e.getMessage());
  } catch (Throwable t) {
    throw new InvalidXPathException(text, t);
  }
}
origin: jaxen/jaxen

/** Create a new SAXPathException based on another exception
 *
 *  @param cause the error source
 */
public SAXPathException(Throwable cause)
{
  super ( cause.getMessage() );
  initCause(cause);
}
origin: jaxen/jaxen

/** Print this exception's stack trace, followed by the
 *  source exception's trace, if any.
 *
 * @param s the stream on which to print the stack trace
 */
public void printStackTrace ( PrintStream s )
{
  super.printStackTrace ( s );
  if (javaVersion < 1.4 && getCause() != null) {
    s.print( "Caused by: " );
    getCause().printStackTrace( s );
  }
}
origin: org.virtuslab/milyn-smooks-core

  public static String getNamespace(String nsPrefix, Properties namespaces) throws SAXPathException {
    String namespace = namespaces.getProperty(nsPrefix);

    if(namespace == null) {
      namespace = Namespace.SMOOKS_PREFIX_MAPPINGS.getProperty(nsPrefix);
      if(namespace == null) {
        throw new SAXPathException("Unknown namespace prefix '" + nsPrefix + "'.  You must define the namespace prefix-to-uri mappings in the Smooks <core:namespaces> configuration section.");
      }
    }
    return namespace;
  }
}
origin: org.dom4j/com.springsource.org.dom4j

public XPathPattern(String text) {
  this.text = text;
  this.context = new Context(getContextSupport());
  try {
    this.pattern = PatternParser.parse(text);
  } catch (SAXPathException e) {
    throw new InvalidXPathException(text, e.getMessage());
  } catch (Throwable t) {
    throw new InvalidXPathException(text, t);
  }
}
origin: org.dhatim/milyn-smooks-core

  public static String getNamespace(String nsPrefix, Properties namespaces) throws SAXPathException {
    String namespace = namespaces.getProperty(nsPrefix);

    if(namespace == null) {
      namespace = Namespace.SMOOKS_PREFIX_MAPPINGS.getProperty(nsPrefix);
      if(namespace == null) {
        throw new SAXPathException("Unknown namespace prefix '" + nsPrefix + "'.  You must define the namespace prefix-to-uri mappings in the Smooks <core:namespaces> configuration section.");
      }
    }
    return namespace;
  }
}
origin: com.alibaba.citrus.tool/antx-autoexpand

public XPathPattern(String text) {
  this.text = text;
  this.context = new Context(getContextSupport());
  try {
    this.pattern = PatternParser.parse(text);
  } catch (SAXPathException e) {
    throw new InvalidXPathException(text, e.getMessage());
  } catch (Throwable t) {
    throw new InvalidXPathException(text, t);
  }
}
origin: org.milyn/milyn-smooks-all

  public static String getNamespace(String nsPrefix, Properties namespaces) throws SAXPathException {
    String namespace = namespaces.getProperty(nsPrefix);

    if(namespace == null) {
      namespace = Namespace.SMOOKS_PREFIX_MAPPINGS.getProperty(nsPrefix);
      if(namespace == null) {
        throw new SAXPathException("Unknown namespace prefix '" + nsPrefix + "'.  You must define the namespace prefix-to-uri mappings in the Smooks <core:namespaces> configuration section.");
      }
    }
    return namespace;
  }
}
origin: org.dom4j/org.motechproject.org.dom4j

public XPathPattern(String text) {
  this.text = text;
  this.context = new Context(getContextSupport());
  try {
    this.pattern = PatternParser.parse(text);
  } catch (SAXPathException e) {
    throw new InvalidXPathException(text, e.getMessage());
  } catch (Throwable t) {
    throw new InvalidXPathException(text, t);
  }
}
origin: org.milyn/milyn-smooks-core

  public static String getNamespace(String nsPrefix, Properties namespaces) throws SAXPathException {
    String namespace = namespaces.getProperty(nsPrefix);

    if(namespace == null) {
      namespace = Namespace.SMOOKS_PREFIX_MAPPINGS.getProperty(nsPrefix);
      if(namespace == null) {
        throw new SAXPathException("Unknown namespace prefix '" + nsPrefix + "'.  You must define the namespace prefix-to-uri mappings in the Smooks <core:namespaces> configuration section.");
      }
    }
    return namespace;
  }
}
origin: maven/dom4j

public XPathPattern(String text) {
  this.text = text;
  this.context = new Context(getContextSupport());
  try {
    this.pattern = PatternParser.parse(text);
  } catch (SAXPathException e) {
    throw new InvalidXPathException(text, e.getMessage());
  } catch (Throwable t) {
    throw new InvalidXPathException(text, t);
  }
}
origin: org.milyn/milyn-smooks-all

/**
 * Set the namespaces on the specified set of selector steps.
 * @param steps The selector steps.
 * @param namespaces The set of selector steps to be updated.
 * @return The set of selector steps (as passed in the 'steps' argument).
 * @throws org.jaxen.saxpath.SAXPathException Error setting namespaces
 */
public static SelectorStep[] setNamespaces(SelectorStep[] steps, Properties namespaces) throws SAXPathException {
  AssertArgument.isNotNull(steps, "steps");
  AssertArgument.isNotNull(namespaces, "namespaces");
  for(int i = 0; i < steps.length; i++) {
    SelectorStep step = steps[i];
    try {
      step.buildPredicatesEvaluator(namespaces);
    } catch (SAXPathException e) {
      throw e;
    } catch (Exception e) {
      throw new SAXPathException("Error compiling PredicatesEvaluator.", e);
    }
    //
    if(i < steps.length - 1 && step.accessesText()) {
      throw new SAXPathException("Unsupported XPath selector expression '" + step.getXPathExpression() + "'.  XPath 'text()' tokens are only supported in the last step.");
    }
  }
  return steps;
}
origin: org.jenkins-ci.dom4j/dom4j

public XPathPattern(String text) {
  this.text = text;
  this.context = new Context(getContextSupport());
  try {
    this.pattern = PatternParser.parse(text);
  } catch (SAXPathException e) {
    throw new InvalidXPathException(text, e.getMessage());
  } catch (Throwable t) {
    throw new InvalidXPathException(text, t);
  }
}
org.jaxen.saxpathSAXPathException

Javadoc

Base of all SAXPath exceptions.

Most used methods

  • getMessage
  • <init>
    Create a new SAXPathException based on another exception
  • getCause
    Returns the exception that caused this exception. This is necessary to implement Java 1.4 chained ex
  • initCause
    Sets the exception that caused this exception. This is necessary to implement Java 1.4 chained excep
  • toString

Popular in Java

  • Updating database using SQL prepared statement
  • runOnUiThread (Activity)
  • getResourceAsStream (ClassLoader)
  • compareTo (BigDecimal)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Github Copilot alternatives
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