Class ModelAccess


  • public class ModelAccess
    extends Object
    The root access point for the RDF data structures: RDFServices, Datasets, ModelMakers, OntModels, OntModelSelectors and WebappDaoFactories. Get a long-term data structure by accessing from the context. Get a short-term data structure by accessing from the request.
     ModelAccess.on(ctx).getRDFService(CONFIGURATION);
     ModelAccess.on(req).getOntModel(ModelNames.DISPLAY);
     
    ------------------------------------ The elaborate structure of options enums allows us to specify method signatures like this on RequestModelAccess:
     getOntModelSelector(OntModelSelectorOption... options);
     
    Which can be invoked in any of these ways:
     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.