The problem comes when you wrap an OntModel around a Model. Sub-models are added to the OntModel, so unless you keep the same OntModel, those sub-models get lost.
This is a kluge, rather than a fix.
Use a single dataset for long-term and short-term use. Get read and write locks for all access to the dataset.
Create a "VitroConnection.DataSource.tdbDirectory" property that will force and configure TDB for content models.
Brian Lowe points out that I was creating an additional RDFService and not closing it.
Also, the configuration RDFService wasn't being closed. It wasn't causing a problem because there
is no database connection associated with it, but still it was a potential for problem.
The "Metadata Model" goes away. A ListCachingModelMaker will provide similar functionality,
although empty models will not persist across a restart.
The BlankNodeFiltering gets pushed into the BlankNodeFilteringModelMaker, a decorator.
This introduces the RDFSource as a wrapper around an RDFServiceFactory and 2 ModelMakerFactorys.
This introduces ModelMakerUtils as a way to get the ModelMakers for context or for request.
Create implementations of RDFSource for SDB, TDB, and SPARQL.
The SDB implementation absorbs JenaPersistentDataSourceSetup and part of ConfigurationPropertiesSmokeTests,
which aren't needed unless we use SDB.
This is probably broken, without the subsequent changes.
Create ModelNames, and centralize all of the references to model names there.
Separate JenaPersistentDataSourceSetup from JenaDataSourceSetupBase. Refactor.
Remove SpecialBulkUpdatingGraph. - not used
Every attempt at SPARQL Update fails because RDFServiceDatasetGraph.getContext() returns null.
I see that DatasetGraphBase just creates an empty Context on instantiation, so now RDFServiceDatasetGraph
does the same, and the problem goes away.
Replace the JAR files with more current ones.
Add a one-line change to BaseInfGraph (from the Jena source), so it will work with Pellet 2.3.1
Adjust all implementations of Graph to include new methods and remove old ones.
Add annotations and generics to reduce compiler warnings.
Remove all dependencies on RDB, which is no longer supported.
This requires considerable refactoring of JenaIngestController, RDFUploadController, listModels.jsp
Refactor the ModelMaker uses
Remove VitroJenaModelMaker,
Revise VitroInterceptingModelMaker to be configurable for Config or Content models
Add debug logging code to ModelChangeImpl ChangeSetImpl, RDFServiceJena.
Add TDB support: RDFServiceFactoryTDB, RDFServiceTDB
Refactor RDFServiceJena and RDFServiceSDB so much of the code can be reused by RDFServiceTDB
Accomodate two RDFService instances - one for Configuration models and one for Content models.
Changes to RDFServiceUtils, RDFServiceSetup
Configuration models use TDB directory in Vitro home directory
Handle bulk updating:
Jena has deprecated bulk operations, and their models classes no longer use the bulk updaters
Create a VitroModelFactory to use instead of the ModelFactory, when bulk updating is required.
Create adapter classes: BulkUpdatingModel, BulkUpdatingOntModel, AbstractModelDecorator
Make the configuration model setup algorithms uniform
Combine ApplicationModelSetup and UserModelSetup into ConfigurationModelsSetup