Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The unfiltered models in the Request go out of scope when the Request has been satisfied. The resources required by these models have short lifetimes and are very easily managed. The models of the Servlet Context never go out of scope until VIVO is shut down. It is difficult to reclaim resources such as database connections or processor memory from these models.

Filtering

Note

TBD: talk about language filters and policy filters. What do we mean by "unfiltered?"

The Data Models

This is a summary of the data models:

To enable language filtering and internationalization of the user interface (translation of data labels and contents, localization, etc.), you should update the runtime.properties file:

RDFService.languageFilter = true

and then edit the list of needed languages:

languages.selectableLocales = en_US, es, de_DE, fr_CA, pt_BR

The Data Models

This is a summary of the data models:

The basic contentBase ABox, Base TBox, Inferred ABox, Inferred TBoxNamed graphs from the RDF Service (optionally with sub-graphs).
Views of the contentBase Full, Inferred Full, Union ABox, Union TBox, Union FullViews of the
The basic contentBase ABox, Base TBox, Inferred ABox, Inferred TBoxNamed graphs from the RDF Service (optionally with sub-graphs).
Views of the contentBase Full, Inferred Full, Union ABox, Union TBox, Union FullViews of the 4 basic content graphs in different combinations.
The configurationApplication Metadata, User Accounts, Display Model, Display TBox, DisplayDisplayNamed graphs from the application datasource.

...

Again, this is a change in the semantics of OntModelSelectors. It insures a consistent representation of OntModels across OntModelSelectors, but it is certainly possible that existing code relies on an inconsistent model instead.

The RDF Service

Note

TBD

Model makers and Model sources

The ModelAccess class

...

Interface for API to write, read, and update Vitro's RDF store, with support to allow listening, logging and auditing. Moreover, it is an intefrace for API to perform a SPARQL select query against the knowledge base. The query may have an embedded graph identifier. If the query does not contain a graph identifier the query is executed against the union of all named and unnamed graphs in the store.

At the end, implementation of this interface should enable serialization of the contents of the named graph to the supplied OutputStream, in N-Triples format. 

Model makers and Model sources

The ModelAccess class

The root access point for the RDF data structures: RDFServices, Datasets, ModelMakers, OntModels, OntModelSelectors and WebappDaoFactories.
Enables getting a long-term data structure by accessing from the context.

Code Block
ModelAccess.on(ctx).getRDFService(CONFIGURATION); 

Moreover it enables getting a short-term data structure by accessing from the request.

Code Block
ModelAccess.on(req).getOntModel(ModelNames.DISPLAY);

The elaborate structure of options enums allows us to specify method signatures like this on RequestModelAccess:

Code Block
getOntModelSelector(OntModelSelectorOption... options);

Which can be invoked in any of these ways:

Code Block
ModelAccess.on(req).getOntModelSelector();
ModelAccess.on(req).getOntModelSelector(LANGUAGE_NEUTRAL);
ModelAccess.on(req).getOntModelSelector(INFERENCES_ONLY);
ModelAccess.on(req).getOntModelSelector(ASSERTIONS_ONLY, LANGUAGE_NEUTRAL);

The compiler insures that only appropriate options are specified. However, if conflicting options are supplied, it will only be caught at runtime

...

.

Initializing the Models

When VIVO starts up, OntModel objects are created to represent the various data models. The configuration models are created from the datasource connection, usually to a MySQL database. The content models are created using the new RDFService layer. By default this also uses the datasource connection, but it can be configured to use any SPARQL endpoint for its data.

...