Package org.exist.memtree

Examples of org.exist.memtree.MemTreeBuilder.startDocument()


     *
     * @return An in-memory document describing the accounts
     */
    private org.exist.memtree.DocumentImpl functionId() throws XPathException {
        final MemTreeBuilder builder = context.getDocumentBuilder();
        builder.startDocument();

        builder.startElement(new QName("id", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
       
        builder.startElement(new QName("real", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
        subjectToXml(builder, context.getRealUser());
View Full Code Here


     */
    public Element generateXMLReport(String errcode, String categories[]) {
        final MemTreeBuilder builder = new MemTreeBuilder();

        try {
            builder.startDocument();

            builder.startElement(JMX_ELEMENT, null);
            builder.addAttribute(VERSION_ATTR, Integer.toString(VERSION));
            if (url != null) {
                builder.addAttribute(JMX_CONNECTION_ATTR, url.toString());
View Full Code Here

                Object result = conn.invoke(name, operation, params, types);

                final MemTreeBuilder builder = new MemTreeBuilder();

                try {
                    builder.startDocument();

                    builder.startElement(JMX_ELEMENT, null);
                    builder.addAttribute(VERSION_ATTR, Integer.toString(VERSION));
                    if (url != null) {
                        builder.addAttribute(JMX_CONNECTION_ATTR, url.toString());
View Full Code Here

    }

    @Override
    public Sequence eval(final Sequence[] args, final Sequence contextSequence) throws XPathException {
        final MemTreeBuilder builder = new MemTreeBuilder(context);
        builder.startDocument();
        builder.startElement(new QName("analyze-string-result", Function.BUILTIN_FUNCTION_NS), null);
        String input = "";
        if (!args[0].isEmpty()) {
            input = args[0].itemAt(0).getStringValue();
        }
View Full Code Here

       */
      private org.exist.memtree.DocumentImpl describeWebService(Module modXQWS, XmldbURI xqwsFileUri, HttpServletRequest request, String path, String functionName, Sequence functionResult) throws XPathException,SAXException
      {
        final FunctionSignature[] xqwsFunctions = modXQWS.listFunctions();
            final MemTreeBuilder builderWebserviceDoc = new MemTreeBuilder(broker.getXQueryService().newContext(AccessContext.REST));
        builderWebserviceDoc.startDocument();
        builderWebserviceDoc.startElement(new QName("webservice", null, null), null);
        builderWebserviceDoc.startElement(new QName("name", null, null), null);
        builderWebserviceDoc.characters(xqwsFileUri.toString().substring(0, xqwsFileUri.toString().indexOf(WEBSERVICE_MODULE_EXTENSION)));
        builderWebserviceDoc.endElement();
        builderWebserviceDoc.startElement(new QName("description", null, null), null);
View Full Code Here

        return permissions;
    }

    private org.exist.memtree.DocumentImpl permissionsToXml(final Permission permission) {
        final MemTreeBuilder builder = context.getDocumentBuilder();
        builder.startDocument();

        builder.startElement(new QName("permission", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
        builder.addAttribute(new QName("owner"), permission.getOwner().getName());
        builder.addAttribute(new QName("group"), permission.getGroup().getName());
        builder.addAttribute(new QName("mode"), permission.toString());
View Full Code Here

            throw( new XPathException( this, "Permission denied, calling user '" + context.getSubject().getName() + "' must be a DBA to get the list of running xqueries" ) );
        }

        final MemTreeBuilder builder = context.getDocumentBuilder();

        builder.startDocument();
        builder.startElement( new QName( "jobs", NAMESPACE_URI, PREFIX ), null );

        final BrokerPool brokerPool = context.getBroker().getBrokerPool();
    final ProcessMonitor monitor = brokerPool.getProcessMonitor();
        final ProcessMonitor.JobInfo[] jobs = monitor.runningJobs();
View Full Code Here

        }
       
        final Item a = args[0].itemAt(0);
       
        final MemTreeBuilder builder = new MemTreeBuilder(context);
        builder.startDocument();
        final DocumentBuilderReceiver receiver = new DocumentBuilderReceiver(builder);
       
        try {
            final Properties props = new Properties();
            a.toSAX(context.getBroker(), receiver, props);
View Full Code Here

        String adminPassAfter = null;
        if (args[2].hasOne())
                {adminPassAfter = args[2].getStringValue();}

        final MemTreeBuilder builder = context.getDocumentBuilder();
        builder.startDocument();
        builder.startElement(RESTORE_ELEMENT, null);
       
        try {
            final org.exist.backup.Restore restore = new org.exist.backup.Restore();
            final RestoreListener listener = new XMLRestoreListener(builder);
View Full Code Here

  {
    Sequence    xmlResponse     = null;
       
        final MemTreeBuilder builder = context.getDocumentBuilder();
       
        builder.startDocument();
        builder.startElement( new QName( "xqueries", NAMESPACE_URI, PREFIX ), null );
       
        //Add all the running xqueries
        final XQueryWatchDog watchdogs[] = getContext().getBroker().getBrokerPool().getProcessMonitor().getRunningXQueries();
        for (int i = 0; i < watchdogs.length; i++) {
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.