com.exasol.adapter.document.documentfetcher.files.segmentation.NoSegmentationSegmentMatcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of virtual-schema-common-document-files Show documentation
Show all versions of virtual-schema-common-document-files Show documentation
Adapter for document data access from files.
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;
}
}