Class WebappDaoFactoryJena
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.dao.jena.WebappDaoFactoryJena
-
- All Implemented Interfaces:
WebappDaoFactory
- Direct Known Subclasses:
WebappDaoFactorySDB
public class WebappDaoFactoryJena extends Object implements WebappDaoFactory
-
-
Field Summary
Fields Modifier and Type Field Description protected ApplicationDaoJenaapplicationDaoprotected WebappDaoFactoryConfigconfigprotected DatasetWrapperFactorydwfprotected IndividualDaoentityWebappDaoprotected OntModelSelectorontModelSelectorprotected PropertyGroupDaopropertyGroupDaoprotected RDFServicerdfServiceprotected UserAccountsDaouserAccountsDaoprotected StringuserURIprotected VClassDaovClassDaoprotected VClassGroupDaovClassGroupDao
-
Constructor Summary
Constructors Constructor Description WebappDaoFactoryJena(OntModelSelector ontModelSelector)WebappDaoFactoryJena(OntModelSelector ontModelSelector, OntModelSelector baseOntModelSelector, OntModelSelector inferenceOntModelSelector, WebappDaoFactoryConfig config)WebappDaoFactoryJena(OntModelSelector ontModelSelector, OntModelSelector baseOntModelSelector, OntModelSelector inferenceOntModelSelector, WebappDaoFactoryConfig config, String userURI)WebappDaoFactoryJena(OntModelSelector ontModelSelector, WebappDaoFactoryConfig config)WebappDaoFactoryJena(OntModelSelector ontModelSelector, WebappDaoFactoryConfig config, String userURI)WebappDaoFactoryJena(WebappDaoFactoryJena base)Method for creating a copy - does not pass the same objectWebappDaoFactoryJena(WebappDaoFactoryJena base, String userURI)WebappDaoFactoryJena(org.apache.jena.ontology.OntModel ontModel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcheckURI(String uriStr)Checks a URI String for two things: well-formedness and uniqueness in the model.StringcheckURIForEditableEntity(String uriStr)Checks a URI String to see whether it is suitable for use on a new editable entity.voidclose()Free any resources associated with this WebappDaoFactoryApplicationDaogetApplicationDao()List<String>getCommentsForResource(String resourceURI)BJL23 2008-05-20: Putting this here for lack of a more logical place.DataPropertyDaogetDataPropertyDao()returns a Data Access Object for working with DataPropertiesDataPropertyStatementDaogetDataPropertyStatementDao()returns a Data Access Object for working with DatatypePropertyStatementsDatatypeDaogetDatatypeDao()returns a Data Access Object for working with DatatypesStringgetDefaultNamespace()DisplayModelDaogetDisplayModelDao()IndividualDaogetEntityDao()FauxPropertyDaogetFauxPropertyDao()returns a Data Access Object for working with "faux" ObjectProperties.I18nBundlegetI18nBundle()IndividualDaogetIndividualDao()returns a Data Access Object for working with IndividualsJenaBaseDaogetJenaBaseDao()MenuDaogetMenuDao()Set<String>getNonuserNamespaces()ObjectPropertyDaogetObjectPropertyDao()returns a Data Access Object for working with ObjectPropertiesObjectPropertyStatementDaogetObjectPropertyStatementDao()returns a Data Access Object for working with ObjectPropertyStatementsorg.apache.jena.ontology.OntModelgetOntModel()OntModelSelectorgetOntModelSelector()OntologyDaogetOntologyDao()returns a Data Access Object for working with OntologiesPageDaogetPageDao()List<String>getPreferredLanguages()Map<String,String>getProperties()PropertyGroupDaogetPropertyGroupDao()PropertyInstanceDaogetPropertyInstanceDao()UserAccountsDaogetUserAccountsDao()WebappDaoFactorygetUserAwareDaoFactory(String userURI)Copy this DAO factory to a new object associated with the specified user URI, or return the same factory if a user-aware version cannot be used.StringgetUserURI()Return URI of user associated with this WebappDaoFactory, or null if not applicable.VClassDaogetVClassDao()returns a Data Access Object for working with ontology class objectsVClassGroupDaogetVClassGroupDao()booleanhasExistingURI(String uriStr)Check if a given URI string exists in the system: checks for the following conditions: URI found as subject in a statement or an object or as a propertystatic org.apache.jena.query.DatasetmakeInMemoryDataset(org.apache.jena.rdf.model.Model assertions, org.apache.jena.rdf.model.Model inferences)StringmakeLocalNameWithPrefix(ResourceBean bean)StringmakePickListName(ResourceBean bean)voidsetSpecialDataModel(org.apache.jena.ontology.OntModel specialModel, org.apache.jena.ontology.OntModel specialTboxModel, org.apache.jena.ontology.OntModel specialDisplayModel)Method for using a special model, such as the display model, with the WebappDaoFactory.
-
-
-
Field Detail
-
entityWebappDao
protected IndividualDao entityWebappDao
-
applicationDao
protected ApplicationDaoJena applicationDao
-
userAccountsDao
protected UserAccountsDao userAccountsDao
-
vClassGroupDao
protected VClassGroupDao vClassGroupDao
-
propertyGroupDao
protected PropertyGroupDao propertyGroupDao
-
ontModelSelector
protected OntModelSelector ontModelSelector
-
config
protected WebappDaoFactoryConfig config
-
userURI
protected String userURI
-
dwf
protected DatasetWrapperFactory dwf
-
rdfService
protected RDFService rdfService
-
vClassDao
protected VClassDao vClassDao
-
-
Constructor Detail
-
WebappDaoFactoryJena
public WebappDaoFactoryJena(WebappDaoFactoryJena base, String userURI)
-
WebappDaoFactoryJena
public WebappDaoFactoryJena(OntModelSelector ontModelSelector, OntModelSelector baseOntModelSelector, OntModelSelector inferenceOntModelSelector, WebappDaoFactoryConfig config, String userURI)
-
WebappDaoFactoryJena
public WebappDaoFactoryJena(OntModelSelector ontModelSelector, WebappDaoFactoryConfig config, String userURI)
-
WebappDaoFactoryJena
public WebappDaoFactoryJena(OntModelSelector ontModelSelector, WebappDaoFactoryConfig config)
-
WebappDaoFactoryJena
public WebappDaoFactoryJena(OntModelSelector ontModelSelector, OntModelSelector baseOntModelSelector, OntModelSelector inferenceOntModelSelector, WebappDaoFactoryConfig config)
-
WebappDaoFactoryJena
public WebappDaoFactoryJena(OntModelSelector ontModelSelector)
-
WebappDaoFactoryJena
public WebappDaoFactoryJena(org.apache.jena.ontology.OntModel ontModel)
-
WebappDaoFactoryJena
public WebappDaoFactoryJena(WebappDaoFactoryJena base)
Method for creating a copy - does not pass the same object- Parameters:
base- DAO Factory
-
-
Method Detail
-
getOntModelSelector
public OntModelSelector getOntModelSelector()
-
getOntModel
public org.apache.jena.ontology.OntModel getOntModel()
-
makeInMemoryDataset
public static org.apache.jena.query.Dataset makeInMemoryDataset(org.apache.jena.rdf.model.Model assertions, org.apache.jena.rdf.model.Model inferences)
-
checkURI
public String checkURI(String uriStr)
Description copied from interface:WebappDaoFactoryChecks a URI String for two things: well-formedness and uniqueness in the model. Ill-formed strings or those matching URIs already in use will cause an error message to be returned.- Specified by:
checkURIin interfaceWebappDaoFactory- Returns:
- error message String if invalid; otherwise null
-
checkURIForEditableEntity
public String checkURIForEditableEntity(String uriStr)
Description copied from interface:WebappDaoFactoryChecks a URI String to see whether it is suitable for use on a new editable entity. It must be well-formed, and it must not be declared in the model as a Thing, Class, ObjectProperty or DataProperty. Ill-formed strings or those so declared will cause an error message to be returned.- Specified by:
checkURIForEditableEntityin interfaceWebappDaoFactory- Returns:
- error message String if invalid; otherwise null
-
hasExistingURI
public boolean hasExistingURI(String uriStr)
Description copied from interface:WebappDaoFactoryCheck if a given URI string exists in the system: checks for the following conditions: URI found as subject in a statement or an object or as a property- Specified by:
hasExistingURIin interfaceWebappDaoFactory- Parameters:
uriStr- URI String
-
getUserAwareDaoFactory
public WebappDaoFactory getUserAwareDaoFactory(String userURI)
Description copied from interface:WebappDaoFactoryCopy this DAO factory to a new object associated with the specified user URI, or return the same factory if a user-aware version cannot be used.- Specified by:
getUserAwareDaoFactoryin interfaceWebappDaoFactory- Parameters:
userURI- User URI
-
getUserURI
public String getUserURI()
Description copied from interface:WebappDaoFactoryReturn URI of user associated with this WebappDaoFactory, or null if not applicable.- Specified by:
getUserURIin interfaceWebappDaoFactory
-
getDefaultNamespace
public String getDefaultNamespace()
- Specified by:
getDefaultNamespacein interfaceWebappDaoFactory
-
getPreferredLanguages
public List<String> getPreferredLanguages()
- Specified by:
getPreferredLanguagesin interfaceWebappDaoFactory
-
getNonuserNamespaces
public Set<String> getNonuserNamespaces()
- Specified by:
getNonuserNamespacesin interfaceWebappDaoFactory
-
getCommentsForResource
public List<String> getCommentsForResource(String resourceURI)
Description copied from interface:WebappDaoFactoryBJL23 2008-05-20: Putting this here for lack of a more logical place. We need to build better support for the RDFS vocabulary into our API. Returns a list of the simple lexical form strings of the rdfs:comment values for a resource; empty list if none found.- Specified by:
getCommentsForResourcein interfaceWebappDaoFactory
-
getIndividualDao
public IndividualDao getIndividualDao()
Description copied from interface:WebappDaoFactoryreturns a Data Access Object for working with Individuals- Specified by:
getIndividualDaoin interfaceWebappDaoFactory
-
getApplicationDao
public ApplicationDao getApplicationDao()
- Specified by:
getApplicationDaoin interfaceWebappDaoFactory
-
getVClassGroupDao
public VClassGroupDao getVClassGroupDao()
- Specified by:
getVClassGroupDaoin interfaceWebappDaoFactory
-
getPropertyGroupDao
public PropertyGroupDao getPropertyGroupDao()
- Specified by:
getPropertyGroupDaoin interfaceWebappDaoFactory
-
getUserAccountsDao
public UserAccountsDao getUserAccountsDao()
- Specified by:
getUserAccountsDaoin interfaceWebappDaoFactory
-
getDataPropertyStatementDao
public DataPropertyStatementDao getDataPropertyStatementDao()
Description copied from interface:WebappDaoFactoryreturns a Data Access Object for working with DatatypePropertyStatements- Specified by:
getDataPropertyStatementDaoin interfaceWebappDaoFactory
-
getDatatypeDao
public DatatypeDao getDatatypeDao()
Description copied from interface:WebappDaoFactoryreturns a Data Access Object for working with Datatypes- Specified by:
getDatatypeDaoin interfaceWebappDaoFactory
-
getDataPropertyDao
public DataPropertyDao getDataPropertyDao()
Description copied from interface:WebappDaoFactoryreturns a Data Access Object for working with DataProperties- Specified by:
getDataPropertyDaoin interfaceWebappDaoFactory
-
getEntityDao
public IndividualDao getEntityDao()
-
getObjectPropertyStatementDao
public ObjectPropertyStatementDao getObjectPropertyStatementDao()
Description copied from interface:WebappDaoFactoryreturns a Data Access Object for working with ObjectPropertyStatements- Specified by:
getObjectPropertyStatementDaoin interfaceWebappDaoFactory
-
getOntologyDao
public OntologyDao getOntologyDao()
Description copied from interface:WebappDaoFactoryreturns a Data Access Object for working with Ontologies- Specified by:
getOntologyDaoin interfaceWebappDaoFactory
-
getObjectPropertyDao
public ObjectPropertyDao getObjectPropertyDao()
Description copied from interface:WebappDaoFactoryreturns a Data Access Object for working with ObjectProperties- Specified by:
getObjectPropertyDaoin interfaceWebappDaoFactory
-
getFauxPropertyDao
public FauxPropertyDao getFauxPropertyDao()
Description copied from interface:WebappDaoFactoryreturns a Data Access Object for working with "faux" ObjectProperties.- Specified by:
getFauxPropertyDaoin interfaceWebappDaoFactory
-
getPropertyInstanceDao
public PropertyInstanceDao getPropertyInstanceDao()
- Specified by:
getPropertyInstanceDaoin interfaceWebappDaoFactory
-
getVClassDao
public VClassDao getVClassDao()
Description copied from interface:WebappDaoFactoryreturns a Data Access Object for working with ontology class objects- Specified by:
getVClassDaoin interfaceWebappDaoFactory
-
getJenaBaseDao
public JenaBaseDao getJenaBaseDao()
-
getPageDao
public PageDao getPageDao()
- Specified by:
getPageDaoin interfaceWebappDaoFactory
-
getMenuDao
public MenuDao getMenuDao()
- Specified by:
getMenuDaoin interfaceWebappDaoFactory
-
getDisplayModelDao
public DisplayModelDao getDisplayModelDao()
- Specified by:
getDisplayModelDaoin interfaceWebappDaoFactory
-
close
public void close()
Description copied from interface:WebappDaoFactoryFree any resources associated with this WebappDaoFactory- Specified by:
closein interfaceWebappDaoFactory
-
setSpecialDataModel
public void setSpecialDataModel(org.apache.jena.ontology.OntModel specialModel, org.apache.jena.ontology.OntModel specialTboxModel, org.apache.jena.ontology.OntModel specialDisplayModel)Method for using a special model, such as the display model, with the WebappDaoFactory. The goal here is to modify this WebappDaoFactory so that it is using specialModel, specialTboxModel and specialDisplayModel for individual editing. DAOs related to the application configuration and user accounts should remain unchanged.
-
makeLocalNameWithPrefix
public String makeLocalNameWithPrefix(ResourceBean bean)
-
makePickListName
public String makePickListName(ResourceBean bean)
-
getI18nBundle
public I18nBundle getI18nBundle()
- Specified by:
getI18nBundlein interfaceWebappDaoFactory
-
-