Examples of listChildCollections()


Examples of org.xmldb.api.base.Collection.listChildCollections()

                handler.startDocument();
                handler.startPrefixMapping(PREFIX, URI);
                handler.startElement(URI, COLLECTIONS, QCOLLECTIONS, attributes);

                // Print child collections
                String[] collections = collection.listChildCollections();
                for (int i = 0; i < collections.length; i++) {
                    attributes.clear();
                    attributes.addAttribute("", NAME_ATTR, NAME_ATTR, CDATA, collections[i]);
                    handler.startElement(URI, COLLECTION,
                            QCOLLECTION, attributes);
View Full Code Here

Examples of org.xmldb.api.base.Collection.listChildCollections()

         col = DatabaseManager.getCollection( colstring );
         if ( col == null ) {
            System.out.println("ERROR : Collection not found!");
            return false;
         } else {
            colarray = col.listChildCollections();
           
            System.out.println();
           
            for ( int i=0 ; i < colarray.length ; i++ ) {
                System.out.println("\t" + colarray[i] );
View Full Code Here

Examples of org.xmldb.api.base.Collection.listChildCollections()

   }

   public String[] listCollections(String path)
         throws Exception {
      Collection col = DatabaseManager.getCollection(driver + "/" + path);
      return col.listChildCollections();
   }

   public int countCollections(String path)
         throws Exception {
      Collection col = DatabaseManager.getCollection(driver + "/" + path);
View Full Code Here

Examples of org.xmldb.api.base.Collection.listChildCollections()

                handler.startDocument();
                handler.startPrefixMapping(PREFIX, URI);
                handler.startElement(URI, COLLECTIONS, QCOLLECTIONS, attributes);

                // Print child collections
                String[] collections = collection.listChildCollections();
                for (int i = 0; i < collections.length; i++) {
                    attributes.clear();
                    attributes.addAttribute("", NAME_ATTR, NAME_ATTR, CDATA, collections[i]);
                    handler.startElement(URI, COLLECTION,
                            QCOLLECTION, attributes);
View Full Code Here

Examples of org.xmldb.api.base.Collection.listChildCollections()

                // log a debug message
                log.debug("Error fetching collection '" + colstring + "'");
                System.out.println("ERROR : Collection not found!");
                return false;
            } else {
                colarray = col.listChildCollections();

                System.out.println();

                for (int i = 0; i < colarray.length; i++) {
                    System.out.println("\t" + colarray[i]);
View Full Code Here

Examples of org.xmldb.api.base.Collection.listChildCollections()

        try {

            collection = getCollection("xmldb:xindice://localhost:8888/db/");
            //collection = getCollection("xmldb:xindice-embed:///db/");

            String[] childCollections = collection.listChildCollections();
            System.out.println("Children of collection [" + collection.getName() + "]");
            for (int i = 0; i < childCollections.length; i++) {

                System.out.println("\t" + (i + 1) + ". " + childCollections[i]);
            }
View Full Code Here

Examples of org.xmldb.api.base.Collection.listChildCollections()

    public String[] listCollections(String path) throws Exception {
        Collection col = DatabaseManager.getCollection(driver + "/" + path);
        if (col == null) {
            throw new XindiceException("DatabaseManager.getCollection(" + driver + "/" + path + ") returned null");
        }
        return col.listChildCollections();
    }

    public int countCollections(String path) throws Exception {
        Collection col = DatabaseManager.getCollection(driver + "/" + path);
        if (col == null) {
View Full Code Here

Examples of org.xmldb.api.base.Collection.listChildCollections()

        }
    }

    public void testListInitialCollections() throws Exception {
        Collection db = this.client.getCollection(XmlDbClientSetup.INSTANCE_NAME);
        String[] collections = db.listChildCollections();
        List collist = new Vector(Arrays.asList(collections));
        if (collections.length == 2) {
            assertTrue(collist.contains(XmlDbClientSetup.TEST_COLLECTION_NAME));
            assertTrue(collist.contains("system"));
        } else if (collections.length == 3) {
View Full Code Here

Examples of org.xmldb.api.base.Collection.listChildCollections()

    }

    public void testListCollections() throws Exception {
        Collection col = this.client.getCollection(TEST_COLLECTION_PATH);

        String[] collections = col.listChildCollections();
        assertEquals(0, collections.length);

        this.client.createCollection(TEST_COLLECTION_PATH, "child1");
        this.client.createCollection(TEST_COLLECTION_PATH, "child2");
View Full Code Here

Examples of org.xmldb.api.base.Collection.listChildCollections()

        assertEquals(0, collections.length);

        this.client.createCollection(TEST_COLLECTION_PATH, "child1");
        this.client.createCollection(TEST_COLLECTION_PATH, "child2");

        collections = col.listChildCollections();
        assertEquals(2, collections.length);
        List collist = new Vector(Arrays.asList(collections));
        assertTrue(collist.contains("child1"));
        assertTrue(collist.contains("child2"));
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.