Class FakeApplicationOntologyService
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.services.shortview.FakeApplicationOntologyService
-
public class FakeApplicationOntologyService extends Object
Read a config file that describes the short views. Read it into a model and scan the model to determine what each view consists of (data getter URIs, template names), what context each view applies to, and what classes map to each view. Data getters must be SparqlQueryDataGetters, and must be described in the same config file. TODO Get rid of this when the Application Ontology is implemented.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classFakeApplicationOntologyService.ShortViewConfigExceptionA custom exception that says something was wrong with the config file.static classFakeApplicationOntologyService.TemplateAndDataGettersThe info associated with a short view.
-
Field Summary
Fields Modifier and Type Field Description static StringFILE_OF_SHORT_VIEW_INFO
-
Constructor Summary
Constructors Constructor Description FakeApplicationOntologyService()If we fail to parse the config file, use this constructor instead, to simulate an empty config file.FakeApplicationOntologyService(javax.servlet.ServletContext ctx)Load the model from the config file, and inspect it for Views and mappings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FakeApplicationOntologyService.TemplateAndDataGettersgetShortViewProperties(VitroRequest vreq, Individual individual, String classUri, String contextName)Return the template name and DataGetter instances associated with this class and this short view context.
-
-
-
Field Detail
-
FILE_OF_SHORT_VIEW_INFO
public static final String FILE_OF_SHORT_VIEW_INFO
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FakeApplicationOntologyService
public FakeApplicationOntologyService(javax.servlet.ServletContext ctx) throws FakeApplicationOntologyService.ShortViewConfigExceptionLoad the model from the config file, and inspect it for Views and mappings. Keep the model - we'll need it when its time to create the DataGetters (on each request).
-
FakeApplicationOntologyService
public FakeApplicationOntologyService()
If we fail to parse the config file, use this constructor instead, to simulate an empty config file.
-
-
Method Detail
-
getShortViewProperties
public FakeApplicationOntologyService.TemplateAndDataGetters getShortViewProperties(VitroRequest vreq, Individual individual, String classUri, String contextName)
Return the template name and DataGetter instances associated with this class and this short view context. If none, return null.
-
-