Examples of CollectionDao


Examples of com.esri.gpt.catalog.management.CollectionDao

* @throws Exception if an exception occurs
*/
@Override
protected void onPrepareView(final RequestContext context) throws Exception {

  CollectionDao colDao = new CollectionDao(context);
  this._useCollections = colDao.getUseCollections();
  if (this._useCollections) {
    this.prepareCollections(context);
  }
 
  // build the selectable list of publishers
View Full Code Here

Examples of com.esri.gpt.catalog.management.CollectionDao

   * Builds the list of collections.
   * @param context the active request context
   */
  public void buildAll(RequestContext context) throws Exception {
    _list.clear();
    CollectionDao colDao = new CollectionDao(context);
    List<String[]> collections = colDao.queryCollections();
    for (String[] col: collections) {
      _list.add(new SelectItem(col[0],col[1]));
    }
  }
View Full Code Here

Examples of com.esri.gpt.catalog.management.CollectionDao

      MetadataAcl acl = new MetadataAcl(this.context);
      boolean bCheckAcl = !acl.isPolicyUnrestricted();
     
      // determine if collections are being used
      List<String[]> collections = null;
      CollectionDao colDao = new CollectionDao(this.context);
      boolean hasCollections = false;
      boolean useCollections = colDao.getUseCollections();
      String sColMemberTable = colDao.getCollectionMemberTableName();
      String sqlCol = "SELECT COLUUID FROM "+sColMemberTable+" WHERE DOCUUID=?";
      if (useCollections) {
        collections = colDao.queryCollections();
        hasCollections = (collections.size() > 0);
      }
     
      // initialize index related variables
      boolean bCheckIndex = (info.numOriginallyIndexed > 0);
View Full Code Here

Examples of com.esri.gpt.catalog.management.CollectionDao

      String s = Val.chkStr(params.getValue("lucene.alwaysStoreXmlInIndex"));
      boolean alwaysStoreXmlInIndex = !s.equalsIgnoreCase("false");
     
      // determine if collections are being used
      List<String[]> collections = null;
      CollectionDao colDao = new CollectionDao(this.getRequestContext());
      boolean hasCollections = false;
      boolean useCollections = colDao.getUseCollections();
      String sColMemberTable = colDao.getCollectionMemberTableName();
      String sqlCol = "SELECT COLUUID FROM "+sColMemberTable+" WHERE DOCUUID=?";
      if (useCollections) {
        collections = colDao.queryCollections();
        hasCollections = (collections.size() > 0);
      }
     
      // determine the storeables
      Document document = new Document();   
View Full Code Here

Examples of net.sf.archimede.model.collection.CollectionDao

        }
        return this.exists.booleanValue();
    }
   
    private Collection getGroupInRepository() throws TransactionException {
        CollectionDao collectionDao = CollectionDao.createInstance();
        Collection rootCollection = collectionDao.getRootCollection();
       
        List collections = rootCollection.getCollections();
        //Community
        for (Iterator collIt = collections.iterator(); collIt.hasNext(); ){
            Collection currentCollection = (Collection) collIt.next();
View Full Code Here

Examples of net.sf.archimede.model.collection.CollectionDao

            throw new IllegalStateException("Cannot insert folder: Folder already exists.");
        }
       
        Collection groupCollection = getGroupInRepository();
        if (groupCollection == null) {
            CollectionDao collectionDao = CollectionDao.createInstance();
            Collection rootCollection = collectionDao.getRootCollection();
            groupCollection = new CollectionImpl();
            groupCollection.setName(this.oldFolder.getGroupName());
            groupCollection.setParent(rootCollection);
           
            if (groupCollection.getReadUsers() == null) {
              groupCollection.setReadUsers(new ArrayList());
            }
            groupCollection.getReadUsers().add(new UserImpl("anonymous", ""));
           
            if (rootCollection.getCollections() != null) {
                rootCollection.getCollections().add(groupCollection);
            } else {
                List collections = new ArrayList();
                collections.add(groupCollection);
                rootCollection.setCollections(collections);
            }
           
            collectionDao.save(groupCollection);
        }
           
        Collection seriesCollection = getSeriesInRepository(groupCollection);
        if (seriesCollection == null) {
            CollectionDao collectionDao = CollectionDao.createInstance();
            seriesCollection = new CollectionImpl();
            seriesCollection.setName(this.oldFolder.getSeriesName());
            seriesCollection.setParent(groupCollection);
           
            if (seriesCollection.getReadUsers() == null) {
              seriesCollection.setReadUsers(new ArrayList());
            }
            seriesCollection.getReadUsers().add(new UserImpl("anonymous", ""));
           
            if (groupCollection.getCollections() != null) {
                groupCollection.getCollections().add(seriesCollection);
            } else {
                List collections = new ArrayList();
                collections.add(seriesCollection);
                groupCollection.setCollections(collections);
            }
            collectionDao.save(seriesCollection);
           
        }
        Folder folder = getFolderInRepository(seriesCollection);
        if (folder == null) {
            folder = new FolderImpl();
View Full Code Here

Examples of net.sf.archimede.model.collection.CollectionDao

        }
        thesisFolder.setStoredFiles(storedFiles);
    }
   
    private Collection createOrGetThesisCollection(ThesisMetadata thesisMetadata) throws ObjectLockedException, ObjectExistsException {
        CollectionDao collectionDao = CollectionDao.createInstance();
        Collection rootCollection = collectionDao.getRootCollection();
       
        Collection thesisCollection = this.createOrGetCollection(rootCollection, this.thesesCollectionName);
       
        String classification = thesisMetadata.getClassification();
        Collection classificationCollection = this.createOrGetCollection(thesisCollection, classification);
View Full Code Here

Examples of net.sf.archimede.model.collection.CollectionDao

        this.limitPerRequest = Integer.parseInt((String) properties.get("Archimede.limitPerRequest"));
    }
   
    private List listCollections() {
        DatabaseUtil.getSingleton().beginTransaction(new CredentialsWrapper(this.username, this.password));
        CollectionDao collectionDao = CollectionDao.createInstance();
        List collections = collectionDao.list();
        return collections;
    }
View Full Code Here

Examples of net.sf.archimede.model.collection.CollectionDao

   
    private ViewFolder selectedFolder;
    private ViewCollection currentCollection;
   
    public WorkspaceBean() {
        CollectionDao collectionDao = CollectionDao.createInstance();
        this.currentCollection = new ViewCollection(collectionDao.getRootCollection());
    }
View Full Code Here

Examples of net.sf.archimede.model.collection.CollectionDao

    return this.treeModel;
  }

  private TreeNode getTreeNode() {

    CollectionDao collectionDao = CollectionDao.createInstance();
    Collection collection = collectionDao.getRootCollection();
    if (collection == null) {
      CustomTreeNode treeData = new CustomTreeNode("root", " ", false);
      return treeData;
    }
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.