Package org.apache.jena.ontology
Interface OntDocumentManager.ReadHook
-
- All Known Implementing Classes:
OntDocumentManager.DefaultReadHook
- Enclosing class:
- OntDocumentManager
public static interface OntDocumentManager.ReadHook
Interface denoting a handler class that can intervene in the process of reading a source document into a model.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
afterRead(Model model, java.lang.String source, OntDocumentManager odm)
Behaviour that is invoked just after the contents of the given source (URI or filename) have been read into the given model.java.lang.String
beforeRead(Model model, java.lang.String source, OntDocumentManager odm)
Behaviour that is invoked before the contents of the given source (URI or filename) are read into the given model.
-
-
-
Method Detail
-
beforeRead
java.lang.String beforeRead(Model model, java.lang.String source, OntDocumentManager odm)
Behaviour that is invoked before the contents of the given source (URI or filename) are read into the given model. The return value from this method denotes a revised string to use in place of the supplied source string. Handlers are permitted to make state changes to the model and the ODM, but carefully!
- Parameters:
model
- The model that is going to receive the contents of the sourcesource
- The identity of the source, as a file name or URIodm
- The Ont Document Manager invoking this handler- Returns:
- The revised name of the source (or the same string if no
change to the source is required). Note that if this method returns
null
, the source will not be subsequently read.
-
afterRead
void afterRead(Model model, java.lang.String source, OntDocumentManager odm)
Behaviour that is invoked just after the contents of the given source (URI or filename) have been read into the given model. Handlers are permitted to make state changes to the model and the ODM, but carefully!
- Parameters:
model
- The model that is going to receive the contents of the sourcesource
- The identity of the source, as a file name or URIodm
- The Ont Document Manager invoking this handler
-
-