Package edu.berkeley.cs.db.yfilterplus.queryparser

Examples of edu.berkeley.cs.db.yfilterplus.queryparser.Query


    protected void setUp() throws Exception {
        super.setUp();
    }

    protected Integer addQuery(String queryText) throws Exception {
        Query query = parseQuery(queryText);
        return new Integer(filter.addQuery(query));
    }
View Full Code Here


        java_cup.runtime.Symbol s = p.parse();
        if (s == null) {
            throw new Exception("Failed to parse: " + queryText);
        }
        PathQuery parsedQuery = (PathQuery)s.value;
        Query query = XPQueryParser.compile(parsedQuery);
        return query;
    }
View Full Code Here

    */
   public void remove( Object id )
   throws ResourceException
   {
      LOG.info( "removeSubscription : " + id );
      Query q = (Query) queriesBack.get( id );
      yfilter.deleteQuery( q,
                           q.getQueryId(  ) );

      //TODO remove from Hashmap
      super.remove( id );
   }
View Full Code Here

   private void addSubscription( Subscription s )
   {
      try
      {
         c++;
         Query query = XPQuery.parseQuery( (String) s.getFilter(  ).getExpression(  ), c );
         LOG.info( "addSubscription " + s.getID(  ) + " query :" + query );
         yfilter.addQuery( query );
         add( s );
         queriesBack.put( s.getID(  ),
                          query );
View Full Code Here

        Integer yFilterIdObj = xPathToYFilterId.get(xpathExpression);
        int yFilterId = -1;
        if (yFilterIdObj != null) {
            yFilterId = yFilterIdObj.intValue();
        } else {
            Query query = XPQuery.parseQuery(xpathExpression, index);
            if (query == null) {
                throw new RuntimeException("Invalid XPath expression:" + xpathExpression);
            }
            if (WSMGParameter.debugYFilter)
                logger.debug("addSubscription " + xpathExpression + " query :" + query);
View Full Code Here

            return 0;
        }
        int currentConsumerCount = consumerListmanager.getConsumerListByToken(xPath).size();
        if (currentConsumerCount == 0) {
            Integer yFilterId = xPathToYFilterId.get(xPath);
            Query q = yFilterIdToQuery.get(yFilterId);
            yfilter.deleteQuery(q, q.getQueryId());
            yFilterIdToQuery.remove(yFilterId);
        }
        counter--;
        return result;
    }
View Full Code Here

*/

    private void addSubscription(Subscription s){
        try{
            c++;
            Query query = XPQuery.parseQuery((String)s.getFilter().getExpression(),c);
            LOG.info("addSubscription "+s.getID()+" query :"+query);
            yfilter.addQuery(query);

            add(s.getResourceKey(),s);
            queriesBack.put(s.getID(),query);
View Full Code Here

     * @throws RemoveNotSupportedException if remove operation is not supported.
     * @throws ResourceException           if any other error occurs.
     */
    public void remove( ResourceKey key ) throws ResourceException {
        LOG.info("removeSubscription : "+key.getValue());
        Query q=(Query)queriesBack.get(key.getValue());
        yfilter.deleteQuery(q,q.getQueryId());
        //TODO remove from Hashmap
        super.remove(key);
    }
View Full Code Here

    */
   public void remove( Object id )
   throws ResourceException
   {
      LOG.info( "removeSubscription : " + id );
      Query q = (Query) queriesBack.get( id );
      yfilter.deleteQuery( q,
                           q.getQueryId(  ) );

      //TODO remove from Hashmap
      super.remove( id );
   }
View Full Code Here

   private void addSubscription( Subscription s )
   {
      try
      {
         c++;
         Query query = XPQuery.parseQuery( (String) s.getFilter(  ).getExpression(  ), c );
         LOG.info( "addSubscription " + s.getID(  ) + " query :" + query );
         yfilter.addQuery( query );
         add( s );
         queriesBack.put( s.getID(  ),
                          query );
View Full Code Here

TOP

Related Classes of edu.berkeley.cs.db.yfilterplus.queryparser.Query

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.