Examples of openCollection()


Examples of org.exist.storage.DBBroker.openCollection()

   
    private String createId(XmldbURI collUri) throws EXistException, PermissionDeniedException {
        final DBBroker broker = factory.getBrokerPool().get(user);
        Collection collection = null;
        try {
            collection = broker.openCollection(collUri, Lock.READ_LOCK);
            if (collection == null)
                {throw new EXistException("collection " + collUri + " not found!");}
            XmldbURI id;
            final Random rand = new Random();
            boolean ok;
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

    @Override
    public boolean existsAndCanOpenCollection(final String collectionUri) throws EXistException, PermissionDeniedException {
        final DBBroker broker = factory.getBrokerPool().get(user);
        Collection collection = null;
        try {          
            collection = broker.openCollection(XmldbURI.xmldbUriFor(collectionUri), Lock.READ_LOCK);
            if(collection == null) {
                return false;
            }
           
            return true;
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

     */
    private HashMap<String, Object> getCollectionDesc(final XmldbURI rootUri) throws Exception {
        final DBBroker broker = factory.getBrokerPool().get(user);
        Collection collection = null;
        try {          
            collection = broker.openCollection(rootUri, Lock.READ_LOCK);
            if (collection == null) {
                throw new EXistException("collection " + rootUri + " not found!");
            }
            final HashMap<String, Object> desc = new HashMap<String, Object>();
            final Vector<Map<String, Object>> docs = new Vector<Map<String, Object>>();
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

    private HashMap<String, Object> describeCollection(final XmldbURI collUri)
    throws Exception {
        final DBBroker broker = factory.getBrokerPool().get(user);
        Collection collection = null;
        try {
            collection = broker.openCollection(collUri, Lock.READ_LOCK);
            if (collection == null) {
                throw new EXistException("collection " + collUri + " not found!");
            }
            final HashMap<String, Object> desc = new HashMap<String, Object>();
            final List<String> collections = new ArrayList<String>();
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

       
        Collection collection = null;
        DocumentImpl doc = null;
        try {
            broker = factory.getBrokerPool().get(user);
            collection = broker.openCollection(docUri.removeLastSegment(), Lock.READ_LOCK);
            if (collection == null) {
                LOG.debug("collection " + docUri.removeLastSegment() + " not found!");
                return null;
            }
            if(!collection.getPermissionsNoLock().validate(user, Permission.READ)) {
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

      DocumentImpl doc = null;
      DBBroker broker = null;
      try {
            broker = factory.getBrokerPool().get(user);
            final XmldbURI docURI = XmldbURI.xmldbUriFor(docName)
            collection = broker.openCollection(docURI.removeLastSegment(), Lock.READ_LOCK);
            if (collection == null) {
                LOG.debug("collection " + docURI.removeLastSegment() + " not found!");
                throw new EXistException("Collection " + docURI.removeLastSegment() + " not found!");
            }
            //if(!collection.getPermissions().validate(user, Permission.READ)) {
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

    private Vector<String> getCollectionListing(final XmldbURI collUri) throws EXistException, PermissionDeniedException {
        DBBroker broker = null;
        Collection collection = null;
        try {
            broker = factory.getBrokerPool().get(user);
            collection = broker.openCollection(collUri, Lock.READ_LOCK);
            final Vector<String> vec = new Vector<String>();
            if (collection == null) {
              if (LOG.isDebugEnabled()) {
                LOG.debug("collection " + collUri + " not found.");
                }
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

    throws EXistException, PermissionDeniedException {
        DBBroker broker = null;
        Collection collection = null;
        try {
            broker = factory.getBrokerPool().get(user);
            collection = broker.openCollection(collUri, Lock.READ_LOCK);
            final Vector<String> vec = new Vector<String>();
            if (collection == null) {
              if (LOG.isDebugEnabled()) {
                LOG.debug("collection " + collUri + " not found.");
                }
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

    throws EXistException, PermissionDeniedException {
        DBBroker broker = null;
        Collection collection = null;
        try {
            broker = factory.getBrokerPool().get(user);
            collection = broker.openCollection(collUri, Lock.READ_LOCK);
            return collection.getDocumentCount(broker);
        } finally {
            if(collection != null)
                {collection.release(Lock.READ_LOCK);}
            factory.getBrokerPool().release(broker);
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

    private String createResourceId(XmldbURI collUri) throws EXistException, PermissionDeniedException {
        DBBroker broker = null;
        Collection collection = null;
        try {
            broker = factory.getBrokerPool().get(user);
            collection = broker.openCollection(collUri, Lock.READ_LOCK);
            XmldbURI id;
            final Random rand = new Random();
            boolean ok;
            do {
                ok = true;
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.