|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.hp.hpl.swade.portal.DataSource
This represents the definition of a portal data set to be browsed. It is encapsulated as an object so that a single portal installation can provide separate views onto multiple distinct datasets.
This gives convenient access to the configuration information (definition of facets, template locations) plus a route to access the RDF data in the dataset.
| Field Summary | |
protected com.hp.hpl.jena.ontology.OntResource |
config
The base specification resource for the data source |
protected java.lang.String |
encoding
The encoding string for the data source |
protected java.util.List |
facets
The list of facets applicable to this data source |
protected HarvestManager |
harvestManager
The harvester for this data source |
protected ModelIndex |
index
The text index for this data source, may be null |
protected java.lang.String |
name
Name of the data source. |
protected PathContext |
pcontext
the context though which other resource may be loaded |
protected java.util.List |
realFacets
The list of facets applicable to this data source, excluding the psuedo text search facet |
protected Facet |
searchFacet
The special facet used to support free text queries |
protected DataStore |
store
The datastore which provides content data for this defined source |
protected TemplateMap |
templates
The set of render templates to use for viewing this data source |
| Constructor Summary | |
DataSource(DataSource base,
com.hp.hpl.jena.rdf.model.Model model)
Constructor - this is used for constructing dummy data sources which descend from a known data source but have a different data model. |
|
DataSource(com.hp.hpl.jena.ontology.OntResource config,
PathContext context)
Constructor - doesn't do loading until requested |
|
| Method Summary | |
void |
addNewFacet(com.hp.hpl.jena.rdf.model.Resource facet)
Add a dynamic facet definition to the list of facets in use. |
int |
compareTo(java.lang.Object o1)
Comparison based on an order property or name |
com.hp.hpl.jena.ontology.OntResource |
getConfigResource()
Return the base specification resource for the data source |
com.hp.hpl.jena.rdf.model.Model |
getDataModel()
Conventience function to return a Model interface onto the aggregated stored data associated with this source definition. |
DataStore |
getDataStore()
Return the data store of content data for this data source. |
java.lang.String |
getEncoding()
Return the encoding string which can be used to identify this data source in a URL request to the portal. |
Facet |
getFacet(java.lang.String enc)
Return the facet corresponding to the given facet encoding. |
Facet |
getFacetForConcept(NodeWrapper concept)
This takes a ResourceWrapper representing a concept in some classification scheme and finds the facet corresponding to that concept or null if there isn't one. |
java.util.List |
getFacets()
Return an ordered list of the facets suitable for browsing this data source. |
HarvestManager |
getHarvestManager()
Return the harvest manager for this source or null if there is none specified. |
ModelIndex |
getIndex()
Return the text indexer for this data source or null if the index is not defined. |
java.lang.String |
getName()
Return the descriptive name for the data source |
java.lang.String |
getPageviewTemplateName()
Return the top level template which should be used for page level viewing of a selected resource. |
java.util.List |
getRealFacets()
Return the real facets, i.e. those that don't include the pseudo text search facet |
NodeWrapper |
getResource(java.lang.String url)
Return a wrapped resource from a URI string. |
Facet |
getSearchFacet()
Return the facet used to represent a free text search if supported. |
PathContext |
getServletContext()
Return the context for this datasource, used to define paths for accessing data files. |
com.hp.hpl.jena.rdf.model.Resource |
getSourceDefinition()
Return the data source configuration resource. |
java.lang.String |
getSourceProperty(ResourceWrapper src,
com.hp.hpl.jena.rdf.model.Property p)
Return the property of a source URL, tries the harvester database first and if that fails checks the whole data set. |
java.lang.String |
getSourceURLBanner(ResourceWrapper src)
Return any banner text for a given source URL known to this datasource. |
java.lang.String |
getSourceURLDescription(ResourceWrapper src)
Return the descriptive text, if any, for a given source URL known to this datasource. |
java.lang.String |
getTemplateBase()
Return the base URL for finding templates. |
TemplateMap |
getTemplates()
Return the template map which should be used for rendering resources found in this datasource. |
java.lang.String |
getViewer(javax.servlet.http.HttpServletRequest request)
Return the link address for a basic view on this data source, used by scripts that are going to pass in extra parameters so includes a trailing '&' character |
java.lang.String |
getViewTemplateName()
Return the top level template which should be used for viewing filtered sets of portal resources. |
void |
setDataStore(DataStore store)
Set the store for this source - used when overriding the default store configuration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected com.hp.hpl.jena.ontology.OntResource config
protected java.lang.String name
protected java.lang.String encoding
protected PathContext pcontext
protected TemplateMap templates
protected java.util.List facets
protected java.util.List realFacets
protected Facet searchFacet
protected DataStore store
protected HarvestManager harvestManager
protected ModelIndex index
| Constructor Detail |
public DataSource(com.hp.hpl.jena.ontology.OntResource config,
PathContext context)
config - the resource from which all source config parameters can be locatedcontext - the servlet context though which other resource may be loaded
public DataSource(DataSource base,
com.hp.hpl.jena.rdf.model.Model model)
model - the data to use| Method Detail |
public java.lang.String getName()
public PathContext getServletContext()
public com.hp.hpl.jena.ontology.OntResource getConfigResource()
public java.lang.String getEncoding()
public int compareTo(java.lang.Object o1)
compareTo in interface java.lang.Comparablepublic com.hp.hpl.jena.rdf.model.Resource getSourceDefinition()
public java.util.List getFacets()
public Facet getSearchFacet()
public java.util.List getRealFacets()
public Facet getFacet(java.lang.String enc)
public TemplateMap getTemplates()
public java.lang.String getViewTemplateName()
public java.lang.String getPageviewTemplateName()
public java.lang.String getTemplateBase()
public void addNewFacet(com.hp.hpl.jena.rdf.model.Resource facet)
public Facet getFacetForConcept(NodeWrapper concept)
public java.lang.String getViewer(javax.servlet.http.HttpServletRequest request)
public DataStore getDataStore()
public void setDataStore(DataStore store)
public com.hp.hpl.jena.rdf.model.Model getDataModel()
public HarvestManager getHarvestManager()
public ModelIndex getIndex()
public NodeWrapper getResource(java.lang.String url)
public java.lang.String getSourceURLDescription(ResourceWrapper src)
public java.lang.String getSourceURLBanner(ResourceWrapper src)
public java.lang.String getSourceProperty(ResourceWrapper src,
com.hp.hpl.jena.rdf.model.Property p)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||