All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.exasol.adapter.document.documentfetcher.files.segmentation.NoSegmentationSegmentMatcher Maven / Gradle / Ivy

There is a newer version: 8.1.3
Show newest version
package com.exasol.adapter.document.documentfetcher.files.segmentation;

import static com.exasol.adapter.document.documentfetcher.files.segmentation.FileSegmentDescription.ENTIRE_FILE;

import java.util.List;

import com.exasol.adapter.document.documentfetcher.files.RemoteFile;

/**
 * This {@link SegmentMatcher} accepts all files since no segmentation is needed.
 */
public class NoSegmentationSegmentMatcher implements SegmentMatcher {
    @Override
    public List getMatchingSegmentsFor(final RemoteFile remoteFile) {
        return List.of(new FileSegment(remoteFile, ENTIRE_FILE));
    }

    @Override
    public boolean matchesFile(final RemoteFile remoteFile) {
        return true;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy