Examples of Cloud


Examples of org.hibernate.ogm.backendtck.associations.collection.unidirectional.Cloud

    public Cloud createAndSave() {
      Session session = sessions.openSession();
      Transaction transaction = session.beginTransaction();

      Cloud cloud = new Cloud();
      cloud.setLength( length );

      for ( String description : producedSnowflakes ) {
        SnowFlake sf = new SnowFlake();
        sf.setDescription( description );
        session.save( sf );
        cloud.getProducedSnowFlakes().add( sf );
      }

      session.persist( cloud );

      transaction.commit();
View Full Code Here

Examples of org.hibernate.ogm.backendtck.associations.collection.unidirectional.Cloud

  public void removeCloudAndSnowflakes() {
    Session session = sessions.openSession();
    Transaction transaction = session.beginTransaction();

    if ( cloud != null ) {
      Cloud cloudToDelete = (Cloud) session.get( Cloud.class, cloud.getId() );
      for ( SnowFlake current : cloudToDelete.getProducedSnowFlakes() ) {
        session.delete( current );
      }
      for ( SnowFlake current : cloudToDelete.getBackupSnowFlakes() ) {
        session.delete( current );
      }
      session.delete( cloudToDelete );
    }
View Full Code Here

Examples of org.hibernate.ogm.backendtck.associations.collection.unidirectional.Cloud

    public Cloud createAndSave() {
      Session session = sessions.openSession();
      Transaction transaction = session.beginTransaction();

      Cloud cloud = new Cloud();
      cloud.setLength( length );

      for ( String description : producedSnowflakes ) {
        SnowFlake sf = new SnowFlake();
        sf.setDescription( description );
        session.save( sf );
        cloud.getProducedSnowFlakes().add( sf );
      }

      for ( String description : backupSnowflakes ) {
        SnowFlake sf = new SnowFlake();
        sf.setDescription( description );
        session.save( sf );
        cloud.getBackupSnowFlakes().add( sf );
      }

      session.persist( cloud );

      transaction.commit();
View Full Code Here

Examples of org.mcavallo.opencloud.Cloud

    if (parameters == null)
      parameters = new TagCloudConfiguration();

    try {
      Cloud cloud = new Cloud()// create cloud
      if (parameters.getCloudCase().equals("Case.LOWER"))
        cloud.setTagCase(Case.LOWER);
      else if (parameters.getCloudCase().equals("Case.UPPER"))
        cloud.setTagCase(Case.UPPER);
      else if (parameters.getCloudCase().equals("Case.CAPITALIZATION"))
        cloud.setTagCase(Case.CAPITALIZATION);
      else if (parameters.getCloudCase().equals("Case.PRESERVE_CASE"))
        cloud.setTagCase(Case.PRESERVE_CASE);
      else if (parameters.getCloudCase().equals("Case.CASE_SENSITIVE"))
        cloud.setTagCase(Case.CASE_SENSITIVE);
      cloud.setMaxWeight(Double.parseDouble(parameters.getFontTo()));   // max font size
      cloud.setMinWeight(Double.parseDouble(parameters.getFontFrom()));
      if (parameters.getTotalTags()==-1)
        cloud.setMaxTagsToDisplay(1000000);
      else
        cloud.setMaxTagsToDisplay(parameters.getTotalTags());
     
      for (String subject : data.keySet()){
        if (data.get(subject).intValue() > Integer.parseInt(parameters.getCuttingLevel())){
          for (int i=0; i<data.get(subject).intValue(); i++){
            Tag tag2 = new Tag(subject, ((HttpServletRequest) pageContext.getRequest()).getContextPath()+(scope!=null?scope:"")+(type.equals("0")?("/simple-search?filterquery="+URLEncoder.encode(subject,"UTF-8")+"&filtername="+index+"&filtertype=equals"):("/browse?type="+index+"&value="+subject)));
            cloud.addTag(tag2);
          }
        }
      }

      out.println("<div class=\"tagcloud\">");
      int counter = 0;

      List<Tag> tagList = cloud.tags(new Tag.NameComparatorAsc());
      if (parameters.getOrdering().equals("Tag.NameComparatorAsc"))
        tagList = cloud.tags(new Tag.NameComparatorAsc());
      else if (parameters.getOrdering().equals("Tag.NameComparatorDesc"))
        tagList = cloud.tags(new Tag.NameComparatorDesc());
      else if (parameters.getOrdering().equals("Tag.ScoreComparatorAsc"))
        tagList = cloud.tags(new Tag.ScoreComparatorAsc());
      else if (parameters.getOrdering().equals("Tag.ScoreComparatorDesc"))
        tagList = cloud.tags(new Tag.ScoreComparatorDesc());

      for (Tag tag : tagList) {

        String tagClass = "";
       
View Full Code Here

Examples of water.api.CloudHandler.Cloud

  //==========================
  // Custom adapters go here

  // Version&Schema-specific filling into the impl
  @Override public Cloud createImpl( ) {
    return new Cloud();                // No inputs
  }
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.