|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.hp.hpl.jena.daml.common.DAMLLoader
Loads DAML ontologies from either input readers or named files. The
declarations in the DAML source are loaded into a DAMLModel object. Will also
process embedded Ontology elements, to load imported ontologies. This behaviour
can be controlled, by using setLoadImportedOntologies(boolean)
to turn the loading
of imports on or off overall, or by using
Field Summary | |
static java.lang.String |
FILE_URI_PREFIX
Prefix for a URI to a file |
static long |
STATUS_INPUT_UNAVAILABLE
Status flag: input source is not available (e.g. |
static long |
STATUS_IO_ERROR
Status flag: an I/O error occurred - details will be in log file. |
static long |
STATUS_MISC_ERROR
Status flag: a misc error occurred - report a bug to the maintainer! |
static long |
STATUS_OK
Status flag: OK |
static long |
STATUS_SYNTAX_ERROR
Status flag: a syntax error occurred in the DAML file- details will be in log file. |
Method Summary | |
void |
addImportBlock(java.lang.String uri)
Add the given URI to the list of ontology urls that will not be loaded if encountered in an imports statement in the loaded ontology. |
DAMLModel |
getDAMLModel()
Answer the DAML model that this loader is using to store the loaded definitions. |
java.util.Iterator |
getImportBlockList()
Answer an iterator over the set of URI strings that will not be loaded if encountered in an import statement, even if autoloading of ontologies (see getLoadImportedOntologies() ) is on. |
boolean |
getLoadImportedOntologies()
Answer true if the loader is to process imported ontologies (except for the ones on the don't load list). |
long |
getStatus()
Answer the status of the last operation. |
boolean |
getUseImportBlocking()
Answer true if well-known URI's will be blocked from being autoloaded. |
boolean |
isBlockedImport(java.lang.String uri)
Answer true if a given URI is blocked from being imported: that is, it is assumed to be well-known and will not be automatically imported. |
boolean |
isLoadedOntology(java.lang.String uri)
Answer true if the ontology identified by the given URI has been loaded. |
void |
removeImportBlock(java.lang.String uri)
Remove the given URI from the list of ontology urls that will not be loaded if encountered in an imports statement in the loaded ontology. |
void |
resetStatus()
Clear the status flags. |
void |
setLoadImportedOntologies(boolean loadImports)
Set the flag to control whether imported ontologies are to be loaded. |
void |
setUseImportBlocking(boolean useBlocking)
Set the flag to control whether certain well-known imports are blocked from being automatically loaded if they encountered in an imports
statement. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String FILE_URI_PREFIX
public static final long STATUS_OK
Status
flag: OKpublic static final long STATUS_INPUT_UNAVAILABLE
Status
flag: input source is not available (e.g. a file cannot be opened)public static final long STATUS_IO_ERROR
Status
flag: an I/O error occurred - details will be in log file.public static final long STATUS_SYNTAX_ERROR
Status
flag: a syntax error occurred in the DAML file- details will be in log file.public static final long STATUS_MISC_ERROR
Status
flag: a misc error occurred - report a bug to the maintainer!Method Detail |
public DAMLModel getDAMLModel()
public java.util.Iterator getImportBlockList()
getLoadImportedOntologies()
) is on.public boolean isBlockedImport(java.lang.String uri)
setUseImportBlocking(boolean)
).uri
- The uri to be testedpublic void addImportBlock(java.lang.String uri)
uri
- The URI of the ontology to block from autoloading, as a String.public void removeImportBlock(java.lang.String uri)
uri
- The URI of the ontology to no longer block from autoloading, as a String.public boolean getLoadImportedOntologies()
public void setLoadImportedOntologies(boolean loadImports)
loadImports
- If true, ontologies that are included in this one, via
the <imports> element are loaded as they are discovered.public void setUseImportBlocking(boolean useBlocking)
imports
statement. Note that automatic loading of all imports can be switched of
with setLoadImportedOntologies(boolean)
.useBlocking
- If true, well-known URI's will be blocked from being
autoloaded, even if autoloading is onpublic boolean getUseImportBlocking()
setUseImportBlocking(boolean)
public boolean isLoadedOntology(java.lang.String uri)
uri
- The URI of the ontologypublic long getStatus()
resetStatus()
.public void resetStatus()
STATUS_OK
. Note that
status is cleared automatically at the start of a read
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |