me.lightspeed7.mongofs.MongoFileConstants Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mongoFS Show documentation
Show all versions of mongoFS Show documentation
An extension to the MongoDB Java Driver library that goes beyond what the GridFS feature supports.
Compressed file storage, zip files, temporary files
package me.lightspeed7.mongofs;
import java.util.Set;
import java.util.TreeSet;
/**
*
* @author David Buschman
*
*/
public enum MongoFileConstants {
_id(true), //
filename(true), //
contentType(true), //
chunkSize(true), //
length(true), //
uploadDate(true), //
aliases(true), //
md5(true), //
metadata(true), //
chunkCount(false), //
compressedLength(false), // deprecated, now uses storage
storage(false), //
compressionRatio(false), // deprecated, now uses ratio
ratio(false), //
compressionFormat(false), // deprecated, now uses format
format(false), //
expireAt(false), //
deleted(false), //
manifestId(false), // expanded zip file support
manifestNum(false); // expanded zip file support
//
private boolean core = false;
private MongoFileConstants(final boolean core) {
this.core = core;
}
public static Set getFields(final boolean mongoFS) {
Set set = new TreeSet();
for (MongoFileConstants current : MongoFileConstants.values()) {
if (current.core || mongoFS) {
set.add(current.name());
}
}
return set;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy