Examples of Folder


Examples of com.google.sitebricks.mail.imap.Folder

    System.out.println("CAPS: " + capabilities);

    final ListenableFuture<FolderStatus> fStatus =
        client.statusOf("[Gmail]/All Mail");
    ListenableFuture<Folder> future = client.open("[Gmail]/All Mail");
    final Folder allMail = future.get();
    final FolderStatus folderStatus = fStatus.get();
    System.out
        .println("Folder opened: " + allMail.getName() + " with count " + folderStatus.getMessages());

    future.addListener(new Runnable() {
      @Override
      public void run() {
        ListenableFuture<List<Message>> messages = client.fetch(allMail, 80034, 80084);
View Full Code Here

Examples of com.googlecode.libkml.Folder

  }

  public static void main(String[] args) throws InterruptedException {
    KmlFactory factory = KmlFactory.GetFactory();

    Folder folder = factory.CreateFolder();
    folder.set_name("foo");

    Placemark p0 = factory.CreatePlacemark();
    p0.set_name("placemark 0");
    p0.set_id("p0");

    folder.add_feature(p0);

    System.out.println("folder size: " + folder.get_feature_array_size());

    System.out.println("name: " + folder.get_name());

    Feature f = folder.get_feature_array_at(0);

    Placemark p = kmldom.AsPlacemark(f);

    System.out.println("placemark name: " + p.get_name());
View Full Code Here

Examples of com.nirvanix.sdk.session.Folder

    protected CloudStoreObject[ ] fetchDirectoryContents(
                CloudStoreDirectory dir )
      throws NirvanixException, SDKException, IOException
    {
  ArrayList<CloudStoreObject> output = new ArrayList<CloudStoreObject>( );
  Folder folder;
 
  int numProcessed = 0;
  do
  {
      folder = _session.getFolder(
           dir.getPath( ).getAbsolutePath( ),
           1,
           MAX_PAGE_SIZE,
           FolderSortCode.Name,
           true );
     
      for ( Folder childFolder : folder.getFolders( ) )
      {
    CloudStoreDirectory outputDir =
      getDirectory(
      getPathNormalizer( )
      .normalizeToCloudStorePath( childFolder.getPath( ),
                true ).getAbsolutePath( )
      );
    CloudStoreObjectMetadata metadata = new CloudStoreObjectMetadata( );
    metadata.setLastModifiedDate( childFolder.getCreatedDate( ) );
    outputDir.setMetadata( metadata );
    output.add( outputDir );
    numProcessed++;
      }
      for ( File childFile : folder.getFiles( ) )
      {
    CloudStoreFile outputFile =
      getFile(
      getPathNormalizer( )
      .normalizeToCloudStorePath( childFile.getPath( ), false )
      .getAbsolutePath( )
      );
    CloudStoreObjectMetadata metadata = new CloudStoreObjectMetadata( );
    MetadataInfo[ ] nirvanixMetadata = childFile.getMetadata( );
    for ( MetadataInfo info : nirvanixMetadata )
    {
        metadata.setCustomTag( info.getType( ), info.getValue( ) );
        if ( info.getType( ).equals( "MD5" ) )
        {
      metadata.setETag( info.getValue( ) );
        }
    }
    metadata.setContentLengthInBytes( childFile.getSizeBytes( ) );
    metadata.setLastModifiedDate( childFile.getCreatedDate( ) );
    metadata.isComplete( );
    outputFile.setMetadata( metadata );
    output.add( outputFile );
    numProcessed++;
      }
  }
  while ( folder.getTotalFileCount( ) + folder.getTotalFolderCount( ) < numProcessed );
 
  return output.toArray( new CloudStoreObject[ output.size( ) ] );
    }
View Full Code Here

Examples of com.openkm.ws.client.Folder

        }
    }

    private void getRootFolder() throws OKMException {
        try {
            Folder folder = okmRepository.getRootFolder(token);
            FolderNodeBean folderNode = new FolderNodeBean();
            folderNode.setFolder(folder);
            folderNode.setIcon(imageUtil.selectImage(folder));
            DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(folderNode);
            rootModel = new DefaultTreeModel(rootNode);
View Full Code Here

Examples of com.starbase.starteam.Folder

     *                   if the root folder cannot be found in the repository
     */
    private final Folder configureRootStarteamFolder()
        throws BuildException
    {
        Folder starteamrootfolder = null;
        try {
            // no root local mapping has been specified.
            View snapshot = openView();

            // find the starteam folder specified to be the root of the
View Full Code Here

Examples of com.vmware.vim.binding.vim.Folder

   /**
    * Returns all virtual machines in the data center.
    */
   public static List<VirtualMachine> getVirtualMachines(Datacenter dc) throws Exception {
      Folder vmFolder = MoUtil.getManagedObject(dc.getVmFolder());
      List<VirtualMachine> list = MoUtil.getChildEntity(vmFolder, VirtualMachine.class);
      return list;
   }
View Full Code Here

Examples of com.vmware.vim25.mo.Folder

        /* Check the specified datastore exists and available with the host. */
        Datastore datastore = getAvailableDatastore(datastoreName, host);
        assert datastore != null;
       
        /* create spec */
        Folder vmFolder = null;
        OvfCreateImportSpecParams importSpecParams
            = new OvfCreateImportSpecParams();
        String ovfDescriptor = "";

        vmFolder = (Folder) host.getVms()[0].getParent();
View Full Code Here

Examples of de.micromata.opengis.kml.v_2_2_0.Folder

  }

  public File publishKML() throws FileNotFoundException {
    File outputFile = new File(ServletContextParameterMap.getParameterValue(ContextParameter.USER_DIRECTORY_PATH) + "KML/" + worksheet.getTitle() + ".kml");
    final Kml kml = KmlFactory.createKml();
    final Folder folder = kml.createAndSetFolder()
        .withName(worksheet.getTitle()).withOpen(true);

    Style style = folder.createAndAddStyle().withId("karma");
   
    if(randomCounter++%2 == 0)
      style.createAndSetIconStyle().withScale(1.399999976158142).withIcon(new Icon().withHref("http://maps.google.com/mapfiles/ms/icons/blue-pushpin.png"));
    else
      style.createAndSetIconStyle().withScale(1.399999976158142).withIcon(new Icon().withHref("http://maps.google.com/mapfiles/ms/icons/red-pushpin.png"));

    for (edu.isi.karma.geospatial.Point point : points) {
      folder.createAndAddPlacemark()
          .withDescription(point.getHTMLDescription())
          .withVisibility(true)
          .withStyleUrl("karma")
          .createAndSetPoint()
          .withAltitudeMode(AltitudeMode.CLAMP_TO_GROUND)
          .addToCoordinates(
              point.getLongitude() + "," + point.getLatitude());

    }

    for (edu.isi.karma.geospatial.LineString line : lines) {
      folder.createAndAddPlacemark()
          .withDescription(line.getHTMLDescription())
          .withVisibility(true).createAndSetLineString()
          .withAltitudeMode(AltitudeMode.CLAMP_TO_GROUND)
          .setCoordinates(line.getCoordinatesList());
    }
    int n=0;
    for (Polygon polygon: polygons) {
      FeatureTable featureTable = polygonTable.get(n);
     
      Placemark placemark = folder.createAndAddPlacemark()
      .withDescription(featureTable.getHTMLDescription())
      .withVisibility(true);
     
      final de.micromata.opengis.kml.v_2_2_0.Polygon kmlPolygon = new de.micromata.opengis.kml.v_2_2_0.Polygon();
      placemark.setGeometry(kmlPolygon);
View Full Code Here

Examples of dnb.data.filetree.Folder

      Set<String> ignored, boolean folderNameIsLabelcode, boolean lookupLabelcodeInNfo) {
    for (Folder f : list) {
      if (f.findLabelcode() == null) { // no label code for this folder yet => assign
        CatalogNumberHibernateImpl lc = null;
        // walk bottom up and try to find label code
        Folder cur = f;
        if (folderNameIsLabelcode) {
          while(cur.getParent().getName() != null) { // walk until root
            lc = LabelcodeMatcher.findLabelcode(cur.getName());
            if (lc == null) {
              lc = LabelcodeMatcher.findLabelcode2(cur.getName());
            }
            if (lc != null) {
              break;
            }
            cur = (Folder) cur.getParent();
          }
        } else {
          while(cur.getParent().getName() != null // walk until root
              && (lc = LabelcodeMatcher.findLabelcode(cur.getName())) == null) {
            cur = (Folder) cur.getParent();
          }
        }       
        if (lc != null) { // got label code from folder => confirm
          if(!addLabelCode(interaction, labelCodes, ignored, cur, lc)) {
            // not confirmed => try get from nfo if indicated
View Full Code Here

Examples of domain.Folder

  protected void postProcessPage(HttpServletRequest request, Object command,
      Errors errors, int page) throws Exception {

    FolderForm ff = (FolderForm) command;
    Folder folder = ff.getFolder();
    Promodetail current = folder.getCurrentPromoDetail();
    String delete = request.getParameter("del");
    String edit = request.getParameter("edit");
    String action = request.getParameter("action");
    String todelete = request.getParameter("delCV");

    if (page == 5) {

      if (action != null) {
        // recuperation du multipart
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;

        MultipartFile fichier = multipartRequest.getFile("data");

        if (fichier.isEmpty()) {
          errors.setNestedPath("folder.pi.cv");
          errors.rejectValue("data", "cv.data.obligatoire",
              "Le document est vide!");
          errors.setNestedPath("");
          return;
        }

        String nomDocument = fichier.getOriginalFilename();

        if (!nomDocument.endsWith(".pdf")) {
          errors.setNestedPath("folder.pi.cv");
          errors.rejectValue("data", "data.invalid",
              "Seuls les documents 'pdf' sont autoris�s!");
          errors.setNestedPath("");
          return;
        }

        if (nomDocument.equals("")) {
          errors.setNestedPath("folder.pi.cv");
          errors.rejectValue("data", "data.invalid",
              "Sp�cifiez un chemin !");
          errors.setNestedPath("");
          return;
        }

        String chemin = null;
        Document cv = folder.getPi().getCv();

        if (!cv.getName().equals("")) {
          errors.setNestedPath("folder.pi.cv");
          errors.rejectValue("data", "data.invalid",
              "Vous avez d�ja envoy� un cv: supprimez le avant!");
          errors.setNestedPath("");
          return;
        }

        String id = Generator.getRandomId();
        chemin = request.getSession().getServletContext().getRealPath(
            "/")
            + "uploads/CV/" + id + "_" + nomDocument;
        enregistrer(fichier, chemin);
        cv.setName(id + "_" + nomDocument);
      } else if (todelete != null) {
        System.out.println("DELETING RESUME");
        Document cv = folder.getPi().getCv();
        File f = new File(request.getSession().getServletContext()
            .getRealPath("/")
            + "uploads/CV/" + cv.getName());
        f.delete();
        cv.setName("");
      }

    } else if (page == 3) {
      if (request.getParameter("add") != null) {
        errors.setNestedPath("folder.currentPromoDetail");
        String university = request.getParameter("univs");
        String diplome = request.getParameter("diplomes");
        if (!current.getYear().equals("")) {
          try {
            Integer.parseInt(current.getYear());
          } catch (NumberFormatException nfe) {
            errors.rejectValue("year", "year.invalid",
                "Type incorrect.");
            errors.setNestedPath("");
            return;
          }
        }

        if (!current.getRegistered().equals("")) {
          try {
            Integer.parseInt(current.getRegistered());
          } catch (NumberFormatException nfe) {
            errors.rejectValue("registered", "registered.invalid",
                "Type incorrect.");
            errors.setNestedPath("");
            return;
          }
        }

        if (!current.getQualified().equals("")) {
          try {
            Integer.parseInt(current.getQualified());
          } catch (NumberFormatException nfe) {
            errors.rejectValue("qualified", "qualified.invalid",
                "Type incorrect.");
            errors.setNestedPath("");
            return;
          }
        }

        if (!current.getMark().equals("")) {
          try {
            Float.parseFloat(current.getMark());
          } catch (NumberFormatException nfe) {
            errors.rejectValue("mark", "mark.invalid",
                "&Eacute;ssayez xx.5.");
            errors.setNestedPath("");
            return;
          }
        }

        if (!current.getRank().equals("")) {
          try {
            Integer.parseInt(current.getRank());
          } catch (NumberFormatException nfe) {
            errors.rejectValue("rank", "rank.invalid",
                "Type incorrect.");
            errors.setNestedPath("");
            return;
          }

        }

        if (current.isInComplete()) {
          errors.setNestedPath("folder");
          errors.rejectValue("promodetails", "promodetails.invalid",
              "Remplissez tous les champs.");
          errors.setNestedPath("");
          return;
        }

        errors.setNestedPath("");

        University u = umng.getUniversity(university);
        Diplome d = dmng.getDiplomes(diplome);

        if (!current.isEmpty()) {
          current.setDiplome(d);
          current.setUniversity(u);
          folder.addPromodetail(current);
        }

      } else if (request.getParameter("adduniv") != null) {
        String nouveau = request.getParameter("newuniv");
        /*
 
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.