Package org.exist.source

Examples of org.exist.source.Source


            else
                {serializer.serializeToReceiver(memtreeDoc, false);}
        } else {
            // process the xpointer or the stored XQuery
            try {
                Source source;
                if (xpointer == null)
                    {source = new DBSource(serializer.broker, (BinaryDocument) doc, true);}
                else {
                    xpointer = checkNamespaces(xpointer);
                    source = new StringSource(xpointer);
View Full Code Here


   * @param the database broker
   *
   * @return the Source for the XQuery
   */
  private Source getQuerySource(DBBroker broker) {
    Source querySource = null;
   
    //try and get the XQuery from a URL
    if(urlQuery != null) {
      try {
        querySource = SourceFactory.getSource(broker, null, urlQuery, false);
View Full Code Here

 
  private void prepare(int event, DBBroker broker, Txn transaction,
      XmldbURI src, XmldbURI dst, boolean isCollection) throws TriggerException {
   
    //get the query
    final Source query = getQuerySource(broker);
    if(query == null)
      {return;}       
                       
    // avoid infinite recursion by allowing just one trigger per thread   
    if(!TriggerStatePerThread.verifyUniqueTriggerPerThreadBeforePrepare(this, src)) {
View Full Code Here

    }
   
  private void finish(int event, DBBroker broker, Txn transaction, XmldbURI src, XmldbURI dst, boolean isCollection) {
   
      //get the query
      final Source query = getQuerySource(broker);
    if (query == null)
      {return;}
     
    // avoid infinite recursion by allowing just one trigger per thread
    if(!TriggerStatePerThread.verifyUniqueTriggerPerThreadBeforeFinish(this, src))
View Full Code Here

  }

  private CompiledXQuery getScript(boolean isBefore, DBBroker broker, Txn transaction, XmldbURI src) throws TriggerException {
   
    //get the query
    final Source query = getQuerySource(broker);
    if(query == null)
      {return null;}       
                       
    // avoid infinite recursion by allowing just one trigger per thread   
    if(isBefore && !TriggerStatePerThread.verifyUniqueTriggerPerThreadBeforePrepare(this, src)) {
View Full Code Here

            broker = brokerPool.get(user);
            final DocumentImpl resource = broker.getResource(new XmldbURI(uri), Permission.READ | Permission.EXECUTE);
            if(resource == null) {
                throw new XMLDBException(ErrorCodes.INVALID_URI, "No stored XQuery exists at: " + uri);
            }
            final Source xquerySource = new DBSource(broker, (BinaryDocument)resource, false);
            return execute(xquerySource);
        } catch(final EXistException ee) {
            throw new XMLDBException(ErrorCodes.VENDOR_ERROR, ee.getMessage(), ee);
        } catch(final PermissionDeniedException pde) {
            throw new XMLDBException(ErrorCodes.VENDOR_ERROR, pde.getMessage(), pde);
View Full Code Here

TOP

Related Classes of org.exist.source.Source

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.