Class FileInfo
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.filestorage.model.FileInfo
-
public class FileInfo extends Object
An immutable packet of information about an uploaded file, with a builder class to permit incremental construction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFileInfo.BuilderA builder class allows us to supply the values one at a time, and then freeze them into an immutable object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBytestreamAliasUrl()StringgetBytestreamUri()StringgetFilename()StringgetMimeType()StringgetUri()static FileInfoinstanceFromAliasUrl(WebappDaoFactory webappDaoFactory, String path, javax.servlet.ServletContext ctx)If this request URL represents a BytestreamAliasURL, find the bytestream URI, find the surrogate, and get the info.static FileInfoinstanceFromBytestreamUri(WebappDaoFactory webappDaoFactory, String bytestreamUri)If this URI represents a file bytestream, find its surrogate and get its info.static FileInfoinstanceFromSurrogateUri(WebappDaoFactory webappDaoFactory, String uri)If this URI represents a file surrogate, get its info.StringtoString()
-
-
-
Method Detail
-
instanceFromAliasUrl
public static FileInfo instanceFromAliasUrl(WebappDaoFactory webappDaoFactory, String path, javax.servlet.ServletContext ctx)
If this request URL represents a BytestreamAliasURL, find the bytestream URI, find the surrogate, and get the info. Otherwise, return null.
-
instanceFromBytestreamUri
public static FileInfo instanceFromBytestreamUri(WebappDaoFactory webappDaoFactory, String bytestreamUri)
If this URI represents a file bytestream, find its surrogate and get its info. Otherwise, return null.
-
instanceFromSurrogateUri
public static FileInfo instanceFromSurrogateUri(WebappDaoFactory webappDaoFactory, String uri)
If this URI represents a file surrogate, get its info. Otherwise, return null.
-
getUri
public String getUri()
-
getFilename
public String getFilename()
-
getMimeType
public String getMimeType()
-
getBytestreamUri
public String getBytestreamUri()
-
getBytestreamAliasUrl
public String getBytestreamAliasUrl()
-
-