Package org.exist.extensions.exquery.restxq.impl

Examples of org.exist.extensions.exquery.restxq.impl.ExistXqueryRegistry.findServices()


        try {
            if(isCalledAs(qnRegisterModule.getLocalName())) {
                final DocumentImpl module = getContext().getBroker().getResource(moduleUri, Permission.READ);
                if(xqueryRegistry.isXquery(module)) {
                    try {
                        final List<RestXqService> resourceFunctions = xqueryRegistry.findServices(getContext().getBroker(), module);
                        xqueryRegistry.registerServices(getContext().getBroker(), resourceFunctions);
                        result = (NodeValue)org.exist.extensions.exquery.restxq.impl.xquery.RegistryFunctions.serializeRestXqServices(context.getDocumentBuilder(), resourceFunctions).getDocumentElement();
                    } catch(final ExQueryException exqe) {
                        LOG.warn(exqe.getMessage(), exqe);
                        result = Sequence.EMPTY_SEQUENCE;
View Full Code Here


                }
            } else if(isCalledAs(qnFindResourceFunctions.getLocalName())) {
               final DocumentImpl module = getContext().getBroker().getResource(moduleUri, Permission.READ);
               if(xqueryRegistry.isXquery(module)) {               
                    try {
                        final List<RestXqService> resourceFunctions = xqueryRegistry.findServices(getContext().getBroker(), module);
                        xqueryRegistry.deregisterServices(getContext().getBroker(), moduleUri);
                        result = (NodeValue)org.exist.extensions.exquery.restxq.impl.xquery.RegistryFunctions.serializeRestXqServices(context.getDocumentBuilder(), resourceFunctions).getDocumentElement();
                    } catch(final ExQueryException exqe) {
                        LOG.warn(exqe.getMessage(), exqe);
                        result = Sequence.EMPTY_SEQUENCE;
View Full Code Here

               final DocumentImpl module = getContext().getBroker().getResource(moduleUri, Permission.READ);
               if(xqueryRegistry.isXquery(module)) {
                   final SignatureDetail signatureDetail = extractSignatureDetail(resourceFunctionIdentifier);
                   if(signatureDetail != null) {
                       try {
                         final RestXqService serviceToRegister = findService(xqueryRegistry.findServices(getContext().getBroker(), module).iterator(), signatureDetail);
                         if(serviceToRegister != null) {
                             xqueryRegistry.registerServices(context.getBroker(), Collections.singletonList(serviceToRegister));
                             result = BooleanValue.TRUE;
                         } else {
                             result = BooleanValue.FALSE;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.