Package com.google.gdata.data.docs

Examples of com.google.gdata.data.docs.DocumentListEntry


    int uploaded = 0;
    for (File file : folder.listFiles()) {
      if (!file.isDirectory()) { 
        counters[0]++;
        printLine("[" + counters[0] + "/" + counters[1] + "] " + file.getAbsolutePath());
        DocumentListEntry entry = uploadFile(file, remoteFolder, remoteDocs);
        if (entry != null) {
          printLine(" - Uploaded: " + entry.getResourceId());
          uploaded++;
        }
      }
    }
   
    for (File file : folder.listFiles()) {
      if (isOptionRecursive() && file.isDirectory()) {
        DocumentListEntry currentRemoteFolder = null;
        if (!isOptionWithoutFolders()) {
          currentRemoteFolder = documentListFindByTitle(getFolderName(file), remoteSubFolders);
          if (currentRemoteFolder == null) {
            try {
              if (remoteFolder == null) {
View Full Code Here


      name = getFileName(file);
    } else {
      name = file.getName();
    }

    DocumentListEntry currentRemoteDoc = documentListFindByTitle(name, remoteDocs);
    boolean skip = false;
    if (currentRemoteDoc != null && !isOptionAddAll() && (!convert || currentRemoteDoc.getType().equals(getFileType(file)))) {
      boolean replace = false;
     
      if (!isOptionSkipAll() && !isOptionReplaceAll()) {
        String choice = null;
        printLine(" - A document with the same name and type found in Google Docs");
View Full Code Here

    if (path == null || path.length() < 1) {
      return null;
    }
    String[] pathArray = path.split("/");
    DocumentListFeed remoteSubFolders = getRootFolders();
    DocumentListEntry parentRemoteFolder = null;
    DocumentListEntry currentRemoteFolder = null;
    for (String folder : pathArray) {
      if (folder.isEmpty()) {
        continue;
      }
      currentRemoteFolder = documentListFindByTitle(folder, remoteSubFolders);
      if (currentRemoteFolder == null || !currentRemoteFolder.getType().equals("folder")) {
        try {
          if (parentRemoteFolder == null) {
            currentRemoteFolder = getDocumentList().createNew(folder, "folder");
          } else {
            currentRemoteFolder = getDocumentList().createNewSubFolder(folder, parentRemoteFolder.getResourceId());
View Full Code Here

            throws ServiceException, NetmusException {
        try {
            String destFolderUrl = ((MediaContent) getFolder().getContent())
                    .getUri();
            URL feedUrl = new URL(destFolderUrl);
            DocumentListEntry newEntry = new DocumentEntry();
            newEntry.setTitle(new PlainTextConstruct(title));
            newEntry = client().insert(feedUrl, newEntry);
            newEntry.setEtag("*");
            newEntry.setMediaSource(new MediaByteArraySource(
                    content.getBytes(), "text/html"));
            newEntry.updateMedia(true);
            return newEntry;

        } catch (MalformedURLException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
View Full Code Here

TOP

Related Classes of com.google.gdata.data.docs.DocumentListEntry

Copyright © 2018 www.massapicom. 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.