Examples of Collection


Examples of com.dbxml.db.core.Collection

   public int getCollectionType() throws dbXMLException {
      return col.getCollectionType();
   }

   public CollectionClient getParentCollection() throws dbXMLException {
      Collection pc = col.getParentCollection();
      if ( pc != null )
         return new CollectionClientImpl(client, pc);
      else
         throw new dbXMLException("No parent Collection");
   }
View Full Code Here

Examples of com.fogas.koll3ctions.core.bean.Collection

    return collections;
  }

  private void readCollections() throws FileNotFoundException, IOException {
    collections = new Collections();
    Collection collection = null;
    boolean inValue = false;
    boolean foundTime = false;
    boolean foundName = true;
    boolean foundItems = false;
    StringBuilder sb = new StringBuilder();
    String value;
    int size;
    char[] buff = new char[1048576];
    BufferedReader br = new BufferedReader(new FileReader(file));
    while ((size = br.read(buff)) != -1) {
      for (int i = 0; i < size; i++) {
        switch (buff[i]) {
          case '"':
            inValue = !inValue;
            if (!inValue) {
              value = sb.toString();
              sb.setLength(0);
              if ("lastAccess".equals(value)) {
                foundTime = true;
              } else if ("items".equals(value)) {
                foundItems = true;
              } else if (foundName) {
                foundName = false;
                collection = new Collection(value);
              } else if (foundItems) {
                collection.addItem(value);
              }
            }
            break;
          case '0': //$FALL-THROUGH$
          case '1': //$FALL-THROUGH$
          case '2': //$FALL-THROUGH$
          case '3': //$FALL-THROUGH$
          case '4': //$FALL-THROUGH$
          case '5': //$FALL-THROUGH$
          case '6': //$FALL-THROUGH$
          case '7': //$FALL-THROUGH$
          case '8': //$FALL-THROUGH$
          case '9':
            if (foundTime) {
              sb.append(buff[i]);
            }
            break;
          case '}': // block end
            if (foundTime) { // if end of the time
              value = sb.toString();
              sb.setLength(0);
              collection.setLastAccess(Long.parseLong(value));
              foundTime = false;
            }
            collections.add(collection);
            foundName = true;
            break;
View Full Code Here

Examples of com.pugh.sockso.music.Collection

     */

    @Inject
    public MusicTree( Database db  ) {

        super( new MusicTreeNode(new Collection()) );

        this.db = db;
       
    }
View Full Code Here

Examples of com.sun.syndication.propono.atom.common.Collection

                    // Create workspace to represent weblog
                    workspace = new Workspace(Utilities.removeHTML(perm.getWeblog().getName()), "text");
                    addWorkspace(workspace);

                    // Create collection for entries within that workspace
                    Collection entryCol = new Collection("Weblog Entries", "text", atomURL + "/" + weblog.getHandle() + "/entries");
                    entryCol.addAccept("application/atom+xml;type=entry");

                    // Add fixed categories using scheme that points to
                    // weblog because categories are weblog specific
                    weblog = perm.getWeblog();
                    Categories cats = new Categories();
                    cats.setFixed(true);
                    cats.setScheme(getWeblogCategoryScheme(weblog));
                    List rollerCats = roller.getWeblogEntryManager().getWeblogCategories(weblog, false);
                    for (Iterator it = rollerCats.iterator(); it.hasNext();) {
                        WeblogCategory rollerCat = (WeblogCategory) it.next();
                        Category cat = new Category();
                        cat.setTerm(rollerCat.getPath().substring(1));
                        cat.setLabel(rollerCat.getName());
                        cats.addCategory(cat);
                    }
                    entryCol.addCategories(cats);

                    // Add tags as free-form categories using scheme that points
                    // to site because tags can be considered site-wide
                    Categories tags = new Categories();
                    tags.setFixed(false);
                    entryCol.addCategories(tags);

                    workspace.addCollection(entryCol);
                } catch (Exception e) {
                    throw new AtomException("Creating weblog entry collection for service doc", e);
                }

                // And add one media collection for each of weblog's upload directories
                try {
                    MediaFileManager mgr = roller.getMediaFileManager();
                    List<MediaFileDirectory> dirs = mgr.getMediaFileDirectories(weblog);
                    for (MediaFileDirectory dir : dirs) {
                        Collection uploadSubCol = new Collection(
                            "Media Files: " + dir.getPath(), "text",
                            atomURL + "/" + weblog.getHandle() + "/resources/" + dir.getPath());
                        uploadSubCol.setAccepts(uploadAccepts);
                        workspace.addCollection(uploadSubCol);
                    }

                } catch (Exception e) {
                    throw new AtomException("Creating weblog entry collection for service doc", e);
View Full Code Here

Examples of edu.cmu.cs.stage3.alice.core.Collection

  protected void started( World world, double time ) {
    super.started( world, time );
        m_world = world;

        m_a.clear();
        Collection aCollection = a.getCollectionValue();
        for( int i=0; i<aCollection.values.size(); i++ ) {
            m_a.addElement( aCollection.values.get( i ) );
        }

        m_b.clear();
        Collection bCollection = b.getCollectionValue();
        for( int i=0; i<bCollection.values.size(); i++ ) {
            m_b.addElement( bCollection.values.get( i ) );
        }

        for( int i=0; i<m_a.size(); i++ ) {
View Full Code Here

Examples of edu.uga.galileo.voci.bo.Collection

    } else if ((command.getModifier() != null)
        && (command.getModifier().equals("history"))) {
      goToList = handleHistoryRequest(request, command, errors, user);
    }

    Collection collection = request.getAttribute("collection") == null ? null
        : (Collection) request.getAttribute("collection");

    // one last permissions check if we're on our way to the edit page
    if ((collection != null)
        && (!command.isViewCommand())
        && (errors.size() == 0)
        && (fieldMessages.size() == 0)
        && (!goToList)
        && (!workflowManager.canEdit(user, command.getProject(),
            command.getCommand(), collection.getCollectionId()))) {
      errors.add("You don't have permission to "
          + "work on the requested content.");
      goToList = true;
    }

    if (errors.size() > 0) {
      request.setAttribute("errorMessage", generateErrorMessage(errors));
    }

    if (fieldMessages.size() > 0) {
      request.setAttribute("fieldMessages", fieldMessages);
    }

    if (goToList) {
      // the request dispatcher's forward method strips anchors, so we
      // set page target here and let the ContentList.jsp handle it
      // in the body tag's onload event.
      if (collection != null) {
        request.setAttribute("jumpToTarget", "#node"
            + collection.getCollectionId());
      }

      if ((command.getModifier() == null)
          || (!command.getModifier().equals("search"))) {
        ArrayList<VBOTreeNodeWrapper> tree = TreeManager.getInstance()
            .getTreeNodeWrappers(
                command.getProject(),
                openNodes,
                command.isViewCommand() ? true : false,
                -1,
                (User) request.getSession()
                    .getAttribute("user"));
        request.setAttribute("tree", tree);
      }

      // if this is from a search, flag it as such for the ContentList.jsp
      // page
      if (request.getParameter("fs") != null) {
        command.setModifier("search");
        ArrayList<String> other = new ArrayList<String>();
        other.add("results");
        command.setOther(other);
      }

      try {
        request.getRequestDispatcher(
            response.encodeURL(contentListPage)).forward(request,
            response);
      } catch (ServletException e) {
        Logger.error("Couldn't forward request to " + contentListPage,
            e);
      } catch (IOException e) {
        Logger.error("Couldn't forward request to " + contentListPage,
            e);
      }
    } else {
      ArrayList<GUIElement> guiElements = collection.getGUIElements();
      String addToRepeatables = request.getParameter("addToRepeatables");
      if ((addToRepeatables != null)
          && (addToRepeatables.trim().length() > 0)) {
        for (GUIElement guiElem : guiElements) {
          if (guiElem.getName().equals(addToRepeatables)) {
            guiElem.setRepeatableElementsToAdd(3);
            request.setAttribute("isDirty", "t");
            break;
          }
        }
      }
      request.setAttribute("elements", guiElements);

      request.setAttribute(
          command.isViewCommand() ? "vbo" : "collection", collection);
      ArrayList<AuditLog> historyRecords = (new AuditLogManager())
          .getUpdateRecords(
              ((HashMap<String, Project>) getServletContext()
                  .getAttribute("projectMap")).get(
                  command.getProject()).getProjectId(),
              ContentType.COLLECTION, collection
                  .getCollectionId());
      if ((historyRecords != null) && (historyRecords.size() > 0)) {
        request.setAttribute("history", historyRecords);
      }
View Full Code Here

Examples of jade.util.leap.Collection

    while(rs.next()){
      id.addAddresses(rs.getString(1));
    }
   
    // AID resolvers
    Collection resolvers = getResolverAIDs(aidN);
    Iterator iter = resolvers.iterator();
    while (iter.hasNext()) {
      id.addResolvers(getAID((String)iter.next()));
    }
   
    // AID User defined slots
View Full Code Here

Examples of java.util.Collection

      QueryResolver.resolveCommand(command, md);
    }
   
        ValidatorReport repo = Validator.validate(command, md);

        Collection failures = new ArrayList();
        repo.collectInvalidObjects(failures);
        if (failures.size() > 0){
            fail("Exception during validation (" + repo); //$NON-NLS-1$
        }
       
    // rewrite
    command = QueryRewriter.rewrite(command, md, new CommandContext());
View Full Code Here

Examples of java.util.Collection

        for (int i = 0; i < expectedAtomic.length; i++) {
            final String sql = expectedAtomic[i];
            Command command;
            try {
                command = helpGetCommand(sql, md, null);
                Collection groups = GroupCollectorVisitor.getGroupsIgnoreInlineViews(command, false);
                final GroupSymbol symbol = (GroupSymbol)groups.iterator().next();
                Object modelId = md.getModelID(symbol.getMetadataID());
                boolean supportsGroupAliases = CapabilitiesUtil.supportsGroupAliases(modelId, md, capFinder);
                boolean supportsProjection = CapabilitiesUtil.supports(Capability.QUERY_SELECT_EXPRESSION, modelId, md, capFinder);
                command.acceptVisitor(new AliasGenerator(supportsGroupAliases, !supportsProjection));
                expectedQueries.add(command.toString());
View Full Code Here

Examples of java.util.Collection

       
            for (Iterator<Map.Entry<PlanNode, PlanNode>> joinSources = dependentNodes.entrySet().iterator(); joinSources.hasNext();) {
              Map.Entry<PlanNode, PlanNode> entry = joinSources.next();
                PlanNode joinSource = entry.getKey();
               
                Collection accessPatterns = (Collection)joinSource.getProperty(NodeConstants.Info.ACCESS_PATTERNS);
                for (Iterator i = accessPatterns.iterator(); i.hasNext();) {
                    AccessPattern ap = (AccessPattern)i.next();
                   
                    boolean foundGroups = true;
                    HashSet<GroupSymbol> allRequiredGroups = new HashSet<GroupSymbol>();
                    for (ElementSymbol symbol : ap.getUnsatisfied()) {
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.