Examples of files()


Examples of be.jacobsvanroy.springsqlunit.annotation.SqlSetUp.files()

    private void runSqlBefore(Annotation[] declaredAnnotations, ApplicationContext appContext) {
        List<Annotation> annotations = getAnnotation(declaredAnnotations, SqlSetUp.class);
        for (Annotation annotation : annotations) {
            SqlSetUp sqlBeforeAnnotation = (SqlSetUp) annotation;
            sqlRunner.runSqlFiles(
                    sqlBeforeAnnotation.files(),
                    getDataSource(appContext, sqlBeforeAnnotation.dataSource()));
        }
    }

    private List<Annotation> getAnnotation(Annotation[] declaredAnnotations, Class<? extends Annotation> annotationType) {
View Full Code Here

Examples of com.google.api.services.drive.Drive.files()

  body.setTitle("My document");   
  body.setDescription("A test document");   
  body.setMimeType("text/plain");       
  java.io.File fileContent = new java.io.File("document.txt");   
  FileContent mediaContent = new FileContent("text/plain", fileContent);   
  File file = service.files().insert(body, mediaContent).execute();   

System.out.println("File ID: " + file.getId())}}
View Full Code Here

Examples of com.google.api.services.drive.Drive.files()

    out.close();
    documentIS.close();

    FileContent mediaContent = new FileContent(mimeType, fileContent);

    Insert insert = driveService.files().insert(body, mediaContent);
    insert.getMediaHttpUploader().setDirectUploadEnabled(true);
    File file = insert.setConvert(true).execute();

    return file;
  }
View Full Code Here

Examples of com.google.api.services.drive.Drive.files()

   * @throws IOException
   */
  public File getFile(String fileId) throws IOException, GeneralSecurityException {
    Drive driveService = getDriveService();

    return driveService.files().get(fileId).execute();
  }

  /**
   * Get file content from Google Drive
   *
 
View Full Code Here

Examples of com.google.api.services.drive.Drive.files()

   * @throws IOException
   */
  public void removeFileInGoogleDrive(String fileId) throws IOException, GeneralSecurityException {
    Drive driveService = getDriveService();

    driveService.files().delete(fileId).execute();
  }
}
View Full Code Here

Examples of com.google.gwt.gadgets.client.Gadget.InjectContent.files()

      StringBuilder contentToInject) throws UnableToCompleteException {
    // Get additional prefs annotation, where the file for injection is
    // specified.
    InjectContent injectContent = type.getAnnotation(InjectContent.class);
    if (injectContent != null) {
      String[] injectionFiles = injectContent.files();
      for (String filename : injectionFiles) {
        if (!"".equals(filename)) {
          contentToInject.append(readFileToInject(logger, type, filename));
        }
      }
View Full Code Here

Examples of com.google.gwt.gadgets.client.Gadget.InjectModulePrefs.files()

  private void addInjectedModulePrefs(TreeLogger logger, JClassType type,
      Element modulePrefs) throws UnableToCompleteException {

    InjectModulePrefs injectContent = type.getAnnotation(InjectModulePrefs.class);
    if (injectContent != null) {
      String[] injectionFiles = injectContent.files();
      for (String filename : injectionFiles) {
        DocumentBuilder builder;
        Document parsedDoc;
        try {
          builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
View Full Code Here

Examples of org.apache.lucene.index.SegmentInfo.files()

      // Save files so we can decr on next checkpoint/commit:
      size = segmentInfos.size();
      for(int i=0;i<size;i++) {
        SegmentInfo segmentInfo = segmentInfos.info(i);
        if (segmentInfo.dir == directory) {
          lastFiles.add(segmentInfo.files());
        }
      }
    }
  }
View Full Code Here

Examples of org.apache.lucene.index.SegmentInfo.files()

  void incRef(SegmentInfos segmentInfos, boolean isCommit) throws IOException {
    int size = segmentInfos.size();
    for(int i=0;i<size;i++) {
      SegmentInfo segmentInfo = segmentInfos.info(i);
      if (segmentInfo.dir == directory) {
        incRef(segmentInfo.files());
      }
    }

    if (isCommit) {
      // Since this is a commit point, also incref its
View Full Code Here

Examples of org.apache.lucene.index.SegmentInfo.files()

  void decRef(SegmentInfos segmentInfos) throws IOException {
    final int size = segmentInfos.size();
    for(int i=0;i<size;i++) {
      SegmentInfo segmentInfo = segmentInfos.info(i);
      if (segmentInfo.dir == directory) {
        decRef(segmentInfo.files());
      }
    }
  }

  private RefCount getRefCount(String fileName) {
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.