org.jaxen.saxpath.SAXPathException Java Examples

The following examples show how to use org.jaxen.saxpath.SAXPathException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 6 votes vote down vote up
public void startNameStep(int axis, String nameSpace, String localName) throws SAXPathException
{
    switch (axis)
    {
    case Axis.CHILD:
        if (isAbsolutePath)
        {
            // addAbsolute(nameSpace, localName);
            // we can always do relative stuff
            addRelative(nameSpace, localName);
        }
        else
        {
            addRelative(nameSpace, localName);
        }
        break;
    default:
        throw new UnsupportedOperationException();
    }

}
 
Example #2
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 6 votes vote down vote up
public void startAllNodeStep(int axis) throws SAXPathException
{
    switch (axis)
    {
    case Axis.CHILD:
        if (isAbsolutePath)
        {
            // addAbsolute(null, null);
            // We can always do relative stuff
            addRelative(null, null);
        }
        else
        {
            addRelative(null, null);
        }
        break;
    case Axis.DESCENDANT_OR_SELF:
        query.appendQuery(getArrayList(new DescendantAndSelfStructuredFieldPosition(), new DescendantAndSelfStructuredFieldPosition()));
        break;
    case Axis.SELF:
        query.appendQuery(getArrayList(new SelfAxisStructuredFieldPosition(), new SelfAxisStructuredFieldPosition()));
        break;
    default:
        throw new UnsupportedOperationException();
    }
}
 
Example #3
Source File: IndexInfo.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
static Query getPathQuery(String path) throws SAXPathException
{
    ApplicationContext ac = ApplicationContextHelper.getApplicationContext();
    XPathReader reader = new XPathReader();
    LuceneXPathHandler handler = new LuceneXPathHandler();
    handler.setNamespacePrefixResolver((NamespaceService) ac.getBean("namespaceService"));
    handler.setDictionaryService((DictionaryService) ac.getBean("dictionaryService"));
    reader.setXPathHandler(handler);
    reader.parse(path);
    PathQuery pathQuery = handler.getQuery();
    pathQuery.setRepeats(false);
    return pathQuery;
}
 
Example #4
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void startAbsoluteLocationPath() throws SAXPathException
{
    if (!isAbsolutePath)
    {
        throw new IllegalStateException();
    }

}
 
Example #5
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void endRelationalExpr(int op) throws SAXPathException
{
    switch (op)
    {
    case Operator.NO_OP:
        break;
    case Operator.GREATER_THAN:
    case Operator.GREATER_THAN_EQUALS:
    case Operator.LESS_THAN:
    case Operator.LESS_THAN_EQUALS:
        throw new UnsupportedOperationException();
    default:
        throw new UnsupportedOperationException("Unknown operation " + op);
    }
}
 
Example #6
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void endUnionExpr(boolean create) throws SAXPathException
{
    if (create)
    {
        throw new UnsupportedOperationException();
    }
}
 
Example #7
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void endUnaryExpr(int op) throws SAXPathException
{
    switch (op)
    {
    case Operator.NO_OP:
        break;
    case Operator.NEGATIVE:
        throw new UnsupportedOperationException();
    default:
        throw new UnsupportedOperationException("Unknown operation " + op);
    }
}
 
Example #8
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void endOrExpr(boolean create) throws SAXPathException
{
    if (create)
    {
        throw new UnsupportedOperationException();
    }
}
 
Example #9
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void endMultiplicativeExpr(int op) throws SAXPathException
{
    switch (op)
    {
    case Operator.NO_OP:
        break;
    case Operator.MULTIPLY:
    case Operator.DIV:
    case Operator.MOD:
        throw new UnsupportedOperationException();
    default:
        throw new UnsupportedOperationException("Unknown operation " + op);
    }
}
 
Example #10
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void endEqualityExpr(int op) throws SAXPathException
{
    switch (op)
    {
    case Operator.NO_OP:
        break;
    case Operator.EQUALS:
    case Operator.NOT_EQUALS:
        throw new UnsupportedOperationException();
    default:
        throw new UnsupportedOperationException("Unknown operation " + op);
    }
}
 
Example #11
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void endAndExpr(boolean create) throws SAXPathException
{
    if (create)
    {
        throw new UnsupportedOperationException();
    }
}
 
Example #12
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void endAdditiveExpr(int op) throws SAXPathException
{
    switch (op)
    {
    case Operator.NO_OP:
        break;
    case Operator.ADD:
    case Operator.SUBTRACT:
        throw new UnsupportedOperationException();
    default:
        throw new UnsupportedOperationException("Unknown operation " + op);
    }
}
 
Example #13
Source File: DebugXPathHandler.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * @param args String[]
 * @throws SAXPathException
 */
public static void main(String[] args) throws SAXPathException
{
    XPathReader reader = new XPathReader();
    reader.setXPathHandler(new DebugXPathHandler());
    reader
            .parse("/ns:one[@woof='dog']/two/./../two[functionTest(@a, @b, $woof:woof)]/three/*/four//*/five/six[@exists1 and @exists2]");
}
 
Example #14
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void startAdditiveExpr() throws SAXPathException
{
    // Do nothing at the moment
}
 
Example #15
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void startUnaryExpr() throws SAXPathException
{
    // Do nothing for now
}
 
Example #16
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void endFilterExpr() throws SAXPathException
{
    // TODO Auto-generated method stub
    throw new UnsupportedOperationException();
}
 
Example #17
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void endXPath() throws SAXPathException
{
    // Do nothing at the moment
}
 
Example #18
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void startEqualityExpr() throws SAXPathException
{
    // Do nothing
}
 
Example #19
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void endCommentNodeStep() throws SAXPathException
{
    // TODO Auto-generated method stub
    throw new UnsupportedOperationException();
}
 
Example #20
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void startRelationalExpr() throws SAXPathException
{
    // Do nothing at the moment
}
 
Example #21
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void endAllNodeStep() throws SAXPathException
{
    // Nothing to do
    // Todo: Predicates
}
 
Example #22
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void startFunction(String arg0, String arg1) throws SAXPathException
{
    // TODO Auto-generated method stub
    throw new UnsupportedOperationException();
}
 
Example #23
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void endAbsoluteLocationPath() throws SAXPathException
{
    // No action
}
 
Example #24
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void startMultiplicativeExpr() throws SAXPathException
{
    // Do nothing at the moment
}
 
Example #25
Source File: DebugXPathHandler.java    From alfresco-repository with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void variableReference(String arg0, String arg1) throws SAXPathException
{
    System.out.println("Variable Reference arg0 = < " + arg0 + " > arg1 = < " + arg1);
}
 
Example #26
Source File: DebugXPathHandler.java    From alfresco-repository with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void startXPath() throws SAXPathException
{
    System.out.println("Start XPath");
}
 
Example #27
Source File: DebugXPathHandler.java    From alfresco-repository with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void startUnionExpr() throws SAXPathException
{
    System.out.println("Start Union Expression");
}
 
Example #28
Source File: DebugXPathHandler.java    From alfresco-repository with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void startUnaryExpr() throws SAXPathException
{
    System.out.println("Start Unary Expression");
}
 
Example #29
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void startPathExpr() throws SAXPathException
{
    // Just need one!
}
 
Example #30
Source File: SolrXPathHandler.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void startTextNodeStep(int arg0) throws SAXPathException
{
    // TODO Auto-generated method stub
    throw new UnsupportedOperationException();
}