<commit_before>/*******************************************************************************
 * Copyright (C) 2011, Google Inc.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
package com.google.eclipse.mechanic;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

import com.google.eclipse.mechanic.plugin.core.ResourceTaskProvider;

/**
 * A reference to a resource-based task.
 */
public interface IResourceTaskReference {
  /** Return the provider that created this task reference. */
  ResourceTaskProvider getProvider();

  /** Return the name of the task reference. This is typically a local name. */
  String getName();

  /** Return the task reference as an input stream. */
  InputStream newInputStream() throws IOException;

  /**
   * Return the time this resource was last modified, in milliseconds since the epoch.
   */
  long getLastModified() throws IOException;

  /** Return the task reference path. This is typically a full path. */
  String getPath();

  /**
   * Return the File representation of this resource. Is {@code null} when this file isn't on disk.<commit_msg>Return interface instead of implementation for IResourceTaskReference.getProvider.<commit_after>/*******************************************************************************
 * Copyright (C) 2011, Google Inc.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
package com.google.eclipse.mechanic;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

/**
 * A reference to a resource-based task.
 */
public interface IResourceTaskReference {
  /** Return the provider that created this task reference. */
  IResourceTaskProvider getProvider();

  /** Return the name of the task reference. This is typically a local name. */
  String getName();

  /** Return the task reference as an input stream. */
  InputStream newInputStream() throws IOException;

  /**
   * Return the time this resource was last modified, in milliseconds since the epoch.
   */
  long getLastModified() throws IOException;

  /** Return the task reference path. This is typically a full path. */
  String getPath();

  /**
   * Return the File representation of this resource. Is {@code null} when this file isn't on disk.
{'fraction_non_alphanumeric': 0.19266381766381765, 'fraction_numerical': 0.005698005698005698, 'mean_word_length': 4.381226053639847, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3321490', 'n_tokens_mistral': 678, 'n_tokens_neox': 633, 'n_words': 279}