Package org.apache.jena.util
Interface FileManager
-
- All Known Implementing Classes:
FileManagerImpl
public interface FileManager
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringfilePathSeparatorstatic booleanlogAllLookupsstatic java.lang.StringPATH_DELIMITER
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidaddCacheModel(java.lang.String uri, Model m)Deprecated.voidaddLocator(Locator loc)Add a locator to the end of the locators listvoidaddLocatorClassLoader(java.lang.ClassLoader cLoad)Add a class loader locatorvoidaddLocatorFile()Add a file locatorvoidaddLocatorFile(java.lang.String dir)Add a file locator which uses dir as its working directoryvoidaddLocatorURL()Add a URL locatorvoidaddLocatorZip(java.lang.String zfn)Add a zip file locatorFileManagerclone()static FileManagercreate()Deprecated.UseStreamManagerstatic FileManagercreate(LocationMapper locMap)Deprecated.UseStreamManager.static FileManagercreateStd()Deprecated.UseStreamManagerstatic FileManagerget()Deprecated.UseRDFDataMgrto read RDF files.ModelgetFromCache(java.lang.String filenameOrURI)Deprecated.static FileManagergetInternal()For use within Jena libraries only.LocationMappergetLocationMapper()Get the location mappingbooleanhasCachedModel(java.lang.String filenameOrURI)Deprecated.booleanisCachingModels()Deprecated.default ModelloadModel(java.lang.String filenameOrURI)Deprecated.UseRDFDataMgrModelloadModel(java.lang.String filenameOrURI, java.lang.String rdfSyntax)Deprecated.UseRDFDataMgrModelloadModel(java.lang.String filenameOrURI, java.lang.String baseURI, java.lang.String rdfSyntax)Deprecated.UseRDFDataMgrModelloadModelInternal(java.lang.String filenameOrURI)For use within Jena libraries only.java.util.Iterator<Locator>locators()Return an iterator over all the handlersjava.lang.StringmapURI(java.lang.String filenameOrURI)Apply the mapping of a filename or URIjava.io.InputStreamopen(java.lang.String filenameOrURI)Open a file using the locators of this FileManagerjava.io.InputStreamopenNoMap(java.lang.String filenameOrURI)Open a file using the locators of this FileManager but without location mappingTypedStreamopenNoMapOrNull(java.lang.String filenameOrURI)Open a file using the locators of this FileManager but without location mapping.default ModelreadModel(Model model, java.lang.String filenameOrURI)Deprecated.UseRDFDataMgrModelreadModel(Model model, java.lang.String filenameOrURI, java.lang.String rdfSyntax)Deprecated.UseRDFDataMgrModelreadModel(Model model, java.lang.String filenameOrURI, java.lang.String baseURI, java.lang.String syntax)Deprecated.ModelreadModelInternal(Model model, java.lang.String filenameOrURI)For use within Jena libraries only.java.lang.StringreadWholeFileAsUTF8(java.io.InputStream in)Deprecated.java.lang.StringreadWholeFileAsUTF8(java.lang.String filename)Deprecated.voidremove(Locator loc)Remove a locatorvoidremoveCacheModel(java.lang.String uri)Deprecated.voidresetCache()Deprecated.static voidsetGlobalFileManager(FileManager fm)Deprecated.UseStreamManager.setGlobalvoidsetLocationMapper(LocationMapper _mapper)Set the location mappingvoidsetModelCaching(boolean state)Deprecated.
-
-
-
Field Detail
-
logAllLookups
static final boolean logAllLookups
- See Also:
- Constant Field Values
-
PATH_DELIMITER
static final java.lang.String PATH_DELIMITER
- See Also:
- Constant Field Values
-
filePathSeparator
static final java.lang.String filePathSeparator
-
-
Method Detail
-
getInternal
static FileManager getInternal()
For use within Jena libraries only.
-
get
@Deprecated static FileManager get()
Deprecated.UseRDFDataMgrto read RDF files. UseStreamManagerif needed.
-
setGlobalFileManager
@Deprecated static void setGlobalFileManager(FileManager fm)
Deprecated.UseStreamManager.setGlobal
-
create
@Deprecated static FileManager create()
Deprecated.UseStreamManager
-
createStd
@Deprecated static FileManager createStd()
Deprecated.UseStreamManager
-
create
@Deprecated static FileManager create(LocationMapper locMap)
Deprecated.UseStreamManager.
-
clone
FileManager clone()
-
setLocationMapper
void setLocationMapper(LocationMapper _mapper)
Set the location mapping
-
getLocationMapper
LocationMapper getLocationMapper()
Get the location mapping
-
locators
java.util.Iterator<Locator> locators()
Return an iterator over all the handlers
-
addLocator
void addLocator(Locator loc)
Add a locator to the end of the locators list
-
addLocatorFile
void addLocatorFile()
Add a file locator
-
addLocatorFile
void addLocatorFile(java.lang.String dir)
Add a file locator which uses dir as its working directory
-
addLocatorClassLoader
void addLocatorClassLoader(java.lang.ClassLoader cLoad)
Add a class loader locator
-
addLocatorURL
void addLocatorURL()
Add a URL locator
-
addLocatorZip
void addLocatorZip(java.lang.String zfn)
Add a zip file locator
-
remove
void remove(Locator loc)
Remove a locator
-
resetCache
@Deprecated void resetCache()
Deprecated.Reset the model cache
-
setModelCaching
@Deprecated void setModelCaching(boolean state)
Deprecated.Change the state of model cache : does not clear the cache
-
isCachingModels
@Deprecated boolean isCachingModels()
Deprecated.return whether caching is on of off
-
getFromCache
@Deprecated Model getFromCache(java.lang.String filenameOrURI)
Deprecated.Read out of the cache - return null if not in the cache
-
hasCachedModel
@Deprecated boolean hasCachedModel(java.lang.String filenameOrURI)
Deprecated.
-
addCacheModel
@Deprecated void addCacheModel(java.lang.String uri, Model m)Deprecated.
-
removeCacheModel
@Deprecated void removeCacheModel(java.lang.String uri)
Deprecated.
-
loadModel
@Deprecated default Model loadModel(java.lang.String filenameOrURI)
Deprecated.UseRDFDataMgrLoad a model from a file (local or remote). This operation may attempt content negotiation for http URLs.- Parameters:
filenameOrURI- The filename or a URI (file:, http:)- Returns:
- a new model
- Throws:
JenaException- if there is syntax error in file.
-
loadModelInternal
Model loadModelInternal(java.lang.String filenameOrURI)
For use within Jena libraries only.
-
loadModel
@Deprecated Model loadModel(java.lang.String filenameOrURI, java.lang.String rdfSyntax)
Deprecated.UseRDFDataMgrLoad a model from a file (local or remote). URI is the base for reading the model.- Parameters:
filenameOrURI- The filename or a URI (file:, http:)rdfSyntax- RDF Serialization syntax.- Returns:
- a new model
- Throws:
JenaException- if there is syntax error in file.
-
loadModel
@Deprecated Model loadModel(java.lang.String filenameOrURI, java.lang.String baseURI, java.lang.String rdfSyntax)
Deprecated.UseRDFDataMgrLoad a model from a file (local or remote).- Parameters:
filenameOrURI- The filename or a URI (file:, http:)baseURI- Base URI for loading the RDF model.rdfSyntax- RDF Serialization syntax.- Returns:
- a new model
- Throws:
JenaException- if there is syntax error in file.
-
readModel
@Deprecated default Model readModel(Model model, java.lang.String filenameOrURI)
Deprecated.UseRDFDataMgrRead a file of RDF into a model. Guesses the syntax of the file based on filename extension, defaulting to RDF/XML.- Parameters:
model-filenameOrURI-- Returns:
- The model or null, if there was an error.
- Throws:
JenaException- if there is syntax error in file.
-
readModelInternal
Model readModelInternal(Model model, java.lang.String filenameOrURI)
For use within Jena libraries only.
-
readModel
@Deprecated Model readModel(Model model, java.lang.String filenameOrURI, java.lang.String rdfSyntax)
Deprecated.UseRDFDataMgrRead a file of RDF into a model.- Parameters:
model-filenameOrURI-rdfSyntax- RDF Serialization syntax.- Returns:
- The model or null, if there was an error.
- Throws:
JenaException- if there is syntax error in file.
-
readModel
@Deprecated Model readModel(Model model, java.lang.String filenameOrURI, java.lang.String baseURI, java.lang.String syntax)
Deprecated.Read a file of RDF into a model.- Parameters:
model-filenameOrURI-baseURI-syntax-- Returns:
- The model
- Throws:
JenaException- if there is syntax error in file.
-
open
java.io.InputStream open(java.lang.String filenameOrURI)
Open a file using the locators of this FileManager
-
mapURI
java.lang.String mapURI(java.lang.String filenameOrURI)
Apply the mapping of a filename or URI
-
readWholeFileAsUTF8
@Deprecated java.lang.String readWholeFileAsUTF8(java.io.InputStream in)
Deprecated.Slurp up a whole file
-
readWholeFileAsUTF8
@Deprecated java.lang.String readWholeFileAsUTF8(java.lang.String filename)
Deprecated.Slurp up a whole file: map filename as necessary
-
openNoMap
java.io.InputStream openNoMap(java.lang.String filenameOrURI)
Open a file using the locators of this FileManager but without location mapping
-
openNoMapOrNull
TypedStream openNoMapOrNull(java.lang.String filenameOrURI)
Open a file using the locators of this FileManager but without location mapping. Return null if not found
-
-