org.opentripplanner.ext.datastore.gs.AbstractGsDataSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
package org.opentripplanner.ext.datastore.gs;
import com.google.cloud.storage.BlobId;
import org.opentripplanner.datastore.DataSource;
import org.opentripplanner.datastore.FileType;
abstract class AbstractGsDataSource implements DataSource {
private final BlobId blobId;
private final FileType type;
AbstractGsDataSource(BlobId blobId, FileType type) {
this.blobId = blobId;
this.type = type;
}
BlobId blobId() {
return blobId;
}
String bucketName() {
return blobId.getBucket();
}
@Override
public final String name() {
return blobId.getName();
}
@Override
public final String path() {
return GsHelper.toUriString(blobId);
}
@Override
public final FileType type() {
return type;
}
@Override
public final String toString() {
return type + " " + path();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy