Package org.exist.memtree

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


                if (lastSeparatorPosition >= 0) {
                    relDir = relPath.substring(0, lastSeparatorPosition);
                    relDir = relDir.replace(File.separatorChar, '/');
                }

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

                builder.addAttribute(new QName("name", null, null), file.getName());

                Long sizeLong = file.length();
                String sizeString = Long.toString(sizeLong);
View Full Code Here



        MemTreeBuilder builder = context.getDocumentBuilder();

        builder.startDocument();
        builder.startElement(new QName("list", null, null), null);

        for (File entry : scannedFiles) {
            if (logger.isDebugEnabled()) {
                logger.debug("Found: " + entry.getAbsolutePath());
            }
View Full Code Here

            } else if(entry.isDirectory()){
                entryType="directory";
            }

            builder.startElement(new QName(entryType, NAMESPACE_URI, PREFIX), null);

            builder.addAttribute(new QName("name", null, null), entry.getName());

            if(entry.isFile()){
                Long sizeLong = entry.length();
View Full Code Here

            properties.setProperty("document", doc1.getURI().toString());
            properties.setProperty("revision", "");
            properties.setProperty("date", new DateTimeValue(new Date()).getStringValue());
            properties.setProperty("user", context.getUser().getName());

            int nodeNr = builder.startElement(VersioningTrigger.ELEMENT_VERSION, null);
            VersioningTrigger.writeProperties(receiver, properties);

            Diff diff = new StandardDiff(context.getBroker());
            diff.diff(doc1, doc2);
            diff.diff2XML(receiver);
View Full Code Here

       
        if(resultSetPos != 0) {
          // iterate through the result set building an XML document
          builder.startDocument();
           
          builder.startElement(new QName("result", OracleModule.NAMESPACE_URI, OracleModule.PREFIX), null);
          builder.addAttribute(new QName("count", null, null), String.valueOf(-1 ));
           
          resultSet = (ResultSet)statement.getObject(resultSetPos);
           
          ResultSetMetaData rsmd = resultSet.getMetaData();
View Full Code Here

          ResultSetMetaData rsmd = resultSet.getMetaData();
          int iColumns = rsmd.getColumnCount();
           
          while (resultSet.next())
          {
            builder.startElement(new QName("row", OracleModule.NAMESPACE_URI, OracleModule.PREFIX), null);
                builder.addAttribute(new QName("index", null, null), String.valueOf(resultSet.getRow()));

            // get each tuple in the row
            for(int i = 0; i < iColumns; i++)
            {
View Full Code Here

                   */
                   
                  colElement = SQLUtils.escapeXmlAttr(columnName.replace(' ', '_'));
                }
               
                builder.startElement(new QName(colElement, OracleModule.NAMESPACE_URI, OracleModule.PREFIX ), null);
               
                if(!((BooleanValue)args[4].itemAt(0)).effectiveBooleanValue() || columnName.length() <= 0)
                {
                  String name;
                 
View Full Code Here

   
    final MemTreeBuilder builder = context.getDocumentBuilder();
    final AttributesImpl attribs = new AttributesImpl();
    attribs.addAttribute("", "name", "name", "CDATA", qname.getStringValue());
    attribs.addAttribute("", "module", "module", "CDATA", uri);
    final int nodeNr = builder.startElement("", "function", "function", attribs);
   
    FunctionSignature signature;
    final Module module = context.getModule(uri);
    if(module != null) {
      final Iterator<FunctionSignature> i = module.getSignaturesForFunction(qname);
View Full Code Here

     */
    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());
        builder.endElement();

View Full Code Here

        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());
        builder.endElement();

        if(context.getRealUser().getId() != context.getEffectiveUser().getId()) {
            builder.startElement(new QName("effective", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
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.