Examples of createCollection()


Examples of com.bradmcevoy.http.MakeCollectionableResource.createCollection()

        log.debug( "mkdir: " + this.path );
        if( parent != null ) {
            if( parent instanceof MakeCollectionableResource ) {
                MakeCollectionableResource mcr = (MakeCollectionableResource) parent;
                try {
                    r = mcr.createCollection( path.getName() );
                    return true;
                } catch( NotAuthorizedException ex ) {
                    log.debug( "no authorised" );
                    return false;
                } catch( BadRequestException ex ) {
View Full Code Here

Examples of com.bradmcevoy.http.MakeCollectionableResource.createCollection()

                    log.debug( "has child" );
                    errNumber = 101;
                } else {
                    if( target instanceof MakeCollectionableResource ) {
                        MakeCollectionableResource mk = (MakeCollectionableResource) target;
                        CollectionResource f = mk.createCollection( newFolderName );
                    } else {
                        throw new BadRequestException( target, "Folder does not allow creating subfolders" );
                    }
                    log.debug( "add new child ok" );
                    errNumber = 0;
View Full Code Here

Examples of com.bradmcevoy.http.MakeCollectionableResource.createCollection()

        target = (CollectionResource) wrappedResource.child( "uploads" );
        if( target == null ) {
            try {
                if( wrappedResource instanceof MakeCollectionableResource ) {
                    MakeCollectionableResource mk = (MakeCollectionableResource) wrappedResource;
                    target = mk.createCollection( "uploads" );
                } else {
                    throw new BadRequestException( target, "Cant create subfolder" );
                }
            } catch( ConflictException ex ) {
                throw new RuntimeException( ex );
View Full Code Here

Examples of com.mongodb.DB.createCollection()

            // Get an instance of Mongo
            Mongo m = new Mongo("localhost", 27017);
            DB db = m.getDB("personDB");
            personCollection = db.getCollection("persons");
            if (personCollection == null) {
                personCollection = db.createCollection("persons", null);
            }
        } catch (UnknownHostException ex) {
            Logger.getLogger(PersonSessionBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
View Full Code Here

Examples of edu.indiana.extreme.xbaya.mylead.MyLeadAgentStub.createCollection()

        workflowTemplatesMetadata.setResourceId("Unknown");
        LEADresourceDocument leadResourceDoc;

    leadResourceDoc = LEADresourceDocument.Factory.parse(workflowTemplatesMetadata.toString());

        String workflowTemplatesCollectionID = stub.createCollection(
                FAKE_USER_ID, leadResourceDoc.getLEADresource(), projectID,
                true);
        logger.info("workflowTemplatesCollectionID: "
                + workflowTemplatesCollectionID);
       
View Full Code Here

Examples of org.apache.cocoon.components.source.ModifiableTraversableSource.createCollection()

                ((RestrictableSource)source).setSourceCredential(new SourceCredential(principal, password));

            if (source instanceof ModifiableTraversableSource) {
                ModifiableTraversableSource modifiabletraversablesource = (ModifiableTraversableSource)source;

                modifiabletraversablesource.createCollection(collectionname);

            } else
                throw new ProcessingException("Source isn't writeable");

        } catch (SourceException se) {
View Full Code Here

Examples of org.apache.xindice.client.xmldb.services.CollectionManager.createCollection()

              filEle.setAttribute("maxkeysize", (String)table.get(XMLTools.MAX_KEY_SIZE) );
           }
          
           colEle.appendChild(filEle);
          
           tempcol = colman.createCollection(newcol, doc);
       

            System.out.println("Created : " + table.get(XMLTools.COLLECTION) + "/" + newcol);
         } else {
            System.out.println("ERROR : Collection Context and New Collection name required");
View Full Code Here

Examples of org.apache.xindice.client.xmldb.services.CollectionManager.createCollection()

      CollectionManager service = (CollectionManager) col.getService("CollectionManager", "1.0");

      String collectionConfig = "<collection compressed=\"true\" name=\"" + name + "\">" +
            "   <filer class=\"org.apache.xindice.core.filer.BTreeFiler\" gzip=\"true\"/>" +
            "</collection>";
      return service.createCollection(name, DOMParser.toDocument(collectionConfig));
   }

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

Examples of org.apache.xindice.client.xmldb.services.CollectionManager.createCollection()

          + COLLECTION_NAME
          + "\">"
          + "   <filer class=\"org.apache.xindice.core.filer.BTreeFiler\" gzip=\"true\"/>"
          + "</collection>";

      service.createCollection(COLLECTION_NAME, DOMParser.toDocument(collectionConfig));

      System.out.println("Collection " + COLLECTION_NAME + " created.");
    }
    catch (XMLDBException e) {
      System.err.println("XML:DB Exception occured " + e.errorCode + " " + e.getMessage());
View Full Code Here

Examples of org.apache.xindice.client.xmldb.services.CollectionManager.createCollection()

        Collection col = DatabaseManager.getCollection(driver + "/" + parent);
        if (col == null) {
            throw new XindiceException("DatabaseManager.getCollection(" + driver + "/" + parent + ") returned null");
        }
        CollectionManager service = (CollectionManager) col.getService("CollectionManager", "1.0");
        return service.createCollection(path, configuration);
    }

    public Collection getCollection(String path) throws Exception {
        return DatabaseManager.getCollection(driver + "/" + path);
    }
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.