Examples of listChildCollections()


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

        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test1", "test1");
        final UserManagementService ums = (UserManagementService) test.getService("UserManagementService", "1.0");

        ums.chmod("r-x------");

        test.listChildCollections();
    }

    @Test(expected=XMLDBException.class)
    public void cannotListCollectionSubCollectionsWithoutRead() throws XMLDBException {
        Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test1", "test1");
View Full Code Here

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

        ums.chmod("-wx-wx-wx");
        test.close();

        test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test1", "test1");

        test.listChildCollections();
    }

    @Test
    public void canReadXmlResourceWithOnlyExecutePermissionOnParentCollection() throws XMLDBException{
        Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test1", "test1");
View Full Code Here

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

            }

            final StringBuilder buffer = new StringBuilder();

            if( hasCollections ) {
                final String[] childCollections = base.listChildCollections();

                if( childCollections != null ) {
                    log( "Listing child collections", Project.MSG_DEBUG );
                    boolean isFirst = true;
View Full Code Here

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

        if(colConfigDb == null) {
            return;
        }
       
        boolean foundPubmedConfig = false;
        final String configCols[] = colConfigDb.listChildCollections();
        for(final String configCol : configCols) {
            if(configCol.equals(TEST_COLLECTION_NAME)) {
                foundPubmedConfig = true;
                break;
            }
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()

                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()

                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);
                    handler.endElement(URI, COLLECTION, QCOLLECTION);
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.