Examples of createCollection()


Examples of org.exist.xmldb.CollectionManagementServiceImpl.createCollection()

                    errorln("could not parse collection name into a valid URI: "+e.getMessage());
                    return false;
                }
                final CollectionManagementServiceImpl mgtService = (CollectionManagementServiceImpl) current
                        .getService("CollectionManagementService", "1.0");
                final Collection newCollection = mgtService.createCollection(collUri);
                if (newCollection == null) {
                    messageln("could not create collection.");
                } else {
                    messageln("created collection.");
                }
View Full Code Here

Examples of org.exist.xmldb.CollectionManagementServiceImpl.createCollection()

                if (files[i].isDirectory()) {
                    messageln("entering directory " + files[i].getAbsolutePath());
                    c = collection.getChildCollection(files[i].getName());
                    if (c == null) {
                        mgtService = (CollectionManagementServiceImpl) collection.getService("CollectionManagementService", "1.0");
                        c = mgtService.createCollection(URIUtils.encodeXmldbUriFor(files[i].getName()));
                    }
                   
                    if (c instanceof Observable && verbose) {
                        final ProgressObserver observer = new ProgressObserver();
                        ((Observable) c).addObserver(observer);
View Full Code Here

Examples of org.exist.xmldb.CollectionManagementServiceImpl.createCollection()

                if (files[i].isDirectory()) {
                    messageln("entering directory " + files[i].getAbsolutePath());
                    c = collection.getChildCollection(files[i].getName());
                    if (c == null) {
                        mgtService = (CollectionManagementServiceImpl) collection.getService("CollectionManagementService", "1.0");
                        c = mgtService.createCollection(URIUtils.encodeXmldbUriFor(files[i].getName()));
                    }
                    if (c instanceof Observable && verbose) {
                        final ProgressObserver observer = new ProgressObserver();
                        ((Observable) c).addObserver(observer);
                    }
View Full Code Here

Examples of org.exist.xmldb.CollectionManagementServiceImpl.createCollection()

                    base=current;
                    for(int i=0;i<pathSteps.length-1;i++) {
                        Collection c = base.getChildCollection(pathSteps[i]);
                        if (c == null) {
                            final CollectionManagementServiceImpl mgtService = (CollectionManagementServiceImpl) base.getService("CollectionManagementService","1.0");
                            c = mgtService.createCollection(URIUtils.encodeXmldbUriFor(pathSteps[i]));
                        }
                        base=c;
                    }
                    if (base instanceof Observable && verbose) {
                        final ProgressObserver observer = new ProgressObserver();
View Full Code Here

Examples of org.exist.xmldb.CollectionManagementServiceImpl.createCollection()

            Collection c=null;
            try {
                c = collection.getChildCollection(filenameUri.toString());
                if(c == null) {
                    final CollectionManagementServiceImpl mgtService = (CollectionManagementServiceImpl) collection.getService("CollectionManagementService","1.0");
                    c = mgtService.createCollection(filenameUri);
                }
            } catch (final XMLDBException e) {
                upload.showMessage("Impossible to create a collection " + file.getAbsolutePath() + ": " + e.getMessage());
            }
           
View Full Code Here

Examples of org.exist.xmldb.CollectionManagementServiceImpl.createCollection()

        for(int i=1;i<segments.length;i++) {
            p = p.append(segments[i]);
            final Collection c = DatabaseManager.getCollection(properties.getProperty("uri") + p, properties.getProperty("user"), properties.getProperty("password"));
            if (c == null) {
                final CollectionManagementServiceImpl mgtService = (CollectionManagementServiceImpl) current.getService("CollectionManagementService", "1.0");
                current = mgtService.createCollection(segments[i]);
            } else {
                current = c;
            }
        }
        path = p;
View Full Code Here

Examples of org.exist.xmldb.CollectionManagementServiceImpl.createCollection()

            final XmldbURI xmldbURI = dbUri.resolveCollectionPath(p);
            CollectionImpl c = (CollectionImpl)DatabaseManager.getCollection(xmldbURI.toString(), dbUsername, dbPassword);
            if(c == null) {
              current.setTriggersEnabled(false);
                final CollectionManagementServiceImpl mgtService = (CollectionManagementServiceImpl)current.getService("CollectionManagementService", "1.0");
                c = (CollectionImpl)mgtService.createCollection(segment, created);
                current.setTriggersEnabled(true);
            }
            current = c;
        }
       
View Full Code Here

Examples of org.hibernate.hql.internal.ast.tree.FromElementFactory.createCollection()

                fromClause, origin,
                attributeName, classAlias, columns, false
            );
            final QueryableCollection queryableCollection = walker.getSessionFactoryHelper()
                .requireQueryableCollection( collectionType.getRole() );
            fromElement = fromElementFactory.createCollection(
                queryableCollection, collectionType.getRole(), JoinType.LEFT_OUTER_JOIN, true, false
            );
          }
        }
View Full Code Here

Examples of org.jahia.services.content.JCRNodeWrapper.createCollection()

                        filename = filename.substring(endIndex + 1);
                    }
                    JCRNodeWrapper target = ensureDir(parentName, currentUserSession);

                    if (zipentry.isDirectory()) {
                        target.createCollection(JCRContentUtils.escapeLocalNodeName(filename));
                    } else {
                        String contentType = JahiaContextLoaderListener.getServletContext().getMimeType(filename);
                        target.uploadFile(filename, zis, contentType);
                    }
                    result = true;
View Full Code Here

Examples of org.jahia.services.content.JCRNodeWrapper.createCollection()

                }
                JCRNodeWrapper parentDir = ensureDir(path.substring(0, endIndex), currentUserSession);
                if (parentDir == null) {
                    return null;
                }
                return parentDir.createCollection(JCRContentUtils.escapeLocalNodeName(path.substring(path.lastIndexOf('/') + 1)));
            } else {
                throw e;
            }
        }
    }
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.