Codota Logo
RepositoryFile.getType
Code IndexAdd Codota to your IDE (free)

How to use
getType
method
in
org.datacleaner.repository.RepositoryFile

Best Java code snippets using org.datacleaner.repository.RepositoryFile.getType (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.eobjects.datacleaner/DataCleaner-monitor-services

result.put("file_type", resultFile.getType().toString());
result.put("filename", resultFile.getName());
result.put("repository_path", resultFile.getQualifiedPath());
origin: org.eobjects.datacleaner/DataCleaner-monitor-services

@RolesAllowed(SecurityRoles.JOB_EDITOR)
@RequestMapping(method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@ResponseBody
public Map<String, String> uploadAnalysisJobToFolderJson(@PathVariable("tenant") final String tenant,
    @RequestParam("file") final MultipartFile file) {
  if (file == null) {
    throw new IllegalArgumentException(
        "No file upload provided. Please provide a multipart file using the 'file' HTTP parameter.");
  }
  final Action<OutputStream> writeCallback = out -> {
    final InputStream in = file.getInputStream();
    try {
      FileHelper.copy(in, out);
    } finally {
      FileHelper.safeClose(in);
    }
  };
  final TenantContext context = _contextFactory.getContext(tenant);
  final RepositoryFile jobFile;
  final RepositoryFolder jobsFolder = context.getJobFolder();
  final String filename = file.getOriginalFilename();
  jobFile = jobsFolder.createFile(filename, writeCallback);
  logger.info("Created new job from uploaded file: {}", filename);
  final Map<String, String> result = new HashMap<>();
  result.put("status", STATUS_SUCCESS);
  result.put("file_type", jobFile.getType().toString());
  result.put("filename", jobFile.getName());
  result.put("repository_path", jobFile.getQualifiedPath());
  return result;
}
origin: org.eobjects.datacleaner/DataCleaner-monitor-services

result.put("file_type", configurationFile.getType().toString());
result.put("filename", configurationFile.getName());
result.put("repository_path", configurationFile.getQualifiedPath());
origin: org.eobjects.datacleaner/DataCleaner-monitor-services

result.put("file_type", jobFile.getType().toString());
result.put("filename", jobFile.getName());
result.put("repository_path", jobFile.getQualifiedPath());
origin: org.eobjects.datacleaner/DataCleaner-monitor-services

@Override
public List<TimelineIdentifier> getTimelines(final TenantIdentifier tenant, final DashboardGroup group) {
  final RepositoryFolder timelinesFolder = _tenantContextFactory.getContext(tenant).getTimelineFolder();
  final List<RepositoryFile> files;
  final String groupName = (group == null ? null : group.getName());
  if (group == null || groupName == null || "".equals(groupName)) {
    files = timelinesFolder.getFiles();
  } else {
    RepositoryFolder groupFolder = timelinesFolder.getFolder(groupName);
    files = groupFolder.getFiles();
  }
  final List<TimelineIdentifier> result = new ArrayList<TimelineIdentifier>();
  for (RepositoryFile file : files) {
    if (file.getType() == Type.TIMELINE_SPEC) {
      String timelineName = file.getName().substring(0,
          file.getName().length() - FileFilters.ANALYSIS_TIMELINE_XML.getExtension().length());
      TimelineIdentifier timeline = new TimelineIdentifier(timelineName, file.getQualifiedPath(), group);
      result.add(timeline);
    }
  }
  return result;
}
org.datacleaner.repositoryRepositoryFilegetType

Javadoc

Gets the type of the file.

Popular methods of RepositoryFile

  • writeFile
    Opens up an OutputStream to write to the file.
  • delete
  • getLastModified
  • getName
  • getQualifiedPath
  • getSize
  • readFile
  • toResource

Popular in Java

  • Creating JSON documents from java classes using gson
  • requestLocationUpdates (LocationManager)
  • findViewById (Activity)
  • putExtra (Intent)
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JTable (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now