diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/VitroVocabulary.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/VitroVocabulary.java index 4d6734a04..abd40115d 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/VitroVocabulary.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/VitroVocabulary.java @@ -8,6 +8,7 @@ public class VitroVocabulary { public static final String vitroURI = "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"; + public static final String VITRO_AUTH = "http://vitro.mannlib.cornell.edu/ns/vitro/authorization#"; public static final String VITRO_PUBLIC = "http://vitro.mannlib.cornell.edu/ns/vitro/public#"; @@ -207,6 +208,7 @@ public class VitroVocabulary { // =============== Vitro User vocabulary ================================= + // TODO - these go away when the UserAccount stuff is fully implemented - jblake public static final String USER = vitroURI+"User"; public static final String USER_USERNAME = vitroURI+"username"; public static final String USER_MD5PASSWORD = vitroURI+"md5password"; @@ -218,6 +220,25 @@ public class VitroVocabulary { public static final String USER_FIRSTNAME = vitroURI+"firstName"; public static final String MAY_EDIT_AS = vitroURI+"mayEditAs"; + // =============== Vitro UserAccount and PermissionSet vocabulary =========== + + public static final String USERACCOUNT = VITRO_AUTH + "UserAccount"; + public static final String USERACCOUNT_EMAIL_ADDRESS = VITRO_AUTH + "emailAddress"; + public static final String USERACCOUNT_FIRST_NAME = VITRO_AUTH + "firstName"; + public static final String USERACCOUNT_LAST_NAME = VITRO_AUTH + "lastName"; + public static final String USERACCOUNT_MD5_PASSWORD = VITRO_AUTH + "md5password"; + public static final String USERACCOUNT_OLD_PASSWORD = VITRO_AUTH + "oldpassword"; + public static final String USERACCOUNT_LOGIN_COUNT = VITRO_AUTH + "loginCount"; + public static final String USERACCOUNT_STATUS = VITRO_AUTH + "status"; + public static final String USERACCOUNT_PASSWORD_LINK_EXPIRES = VITRO_AUTH + "passwordLinkExpires"; + public static final String USERACCOUNT_PASSWORD_CHANGE_REQUIRED = VITRO_AUTH + "passwordChangeRequired"; + public static final String USERACCOUNT_HAS_PERMISSION_SET = VITRO_AUTH + "hasPermissionSet"; + + public static final String PERMISSIONSET = VITRO_AUTH + "PermissionSet"; + public static final String PERMISSIONSET_HAS_PERMISSION = VITRO_AUTH + "hasPermission"; + + public static final String PERMISSION = VITRO_AUTH + "Permission"; + // =============== model auditing vocabulary ============================= public static final String STATEMENT_EVENT = vitroURI+"StatementEvent"; diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/JenaBaseDaoCon.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/JenaBaseDaoCon.java index 145d4e2f3..fa319b6a5 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/JenaBaseDaoCon.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/JenaBaseDaoCon.java @@ -31,9 +31,10 @@ public class JenaBaseDaoCon { ADDITIONAL_LINK.addProperty(PROPERTY_SELECTFROMEXISTINGANNOT, _constModel.createTypedLiteral(false)); } - /* ***************** Vitro ontology constants ***************** */ - + private OntModel _constModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM); + + /* ***************** Vitro ontology constants ***************** */ public DatatypeProperty SUNRISE = _constModel.createDatatypeProperty(VitroVocabulary.SUNRISE); public DatatypeProperty SUNSET = _constModel.createDatatypeProperty(VitroVocabulary.SUNSET); @@ -103,6 +104,7 @@ public class JenaBaseDaoCon { protected DatatypeProperty LINK_TYPE = _constModel.createDatatypeProperty(VitroVocabulary.LINK_TYPE); protected DatatypeProperty LINK_DISPLAYRANK = _constModel.createDatatypeProperty(VitroVocabulary.LINK_DISPLAYRANK_URL); + // TODO This goes away when the UserAccount stuff is fully implemented - jblake protected OntClass USER = _constModel.createClass(VitroVocabulary.USER); // protected OntClass APPLICATION = null; @@ -188,6 +190,26 @@ public class JenaBaseDaoCon { protected ObjectProperty IND_MAIN_IMAGE = _constModel.createObjectProperty(VitroVocabulary.IND_MAIN_IMAGE); protected ObjectProperty IND_IMAGE = _constModel.createObjectProperty(VitroVocabulary.IND_IMAGE); + /* ***************** User Account Model constants ***************** */ + + protected OntClass USERACCOUNT = _constModel.createClass(VitroVocabulary.USERACCOUNT); + protected DatatypeProperty USERACCOUNT_EMAIL_ADDRESS = _constModel.createDatatypeProperty(VitroVocabulary.USERACCOUNT_EMAIL_ADDRESS); + protected DatatypeProperty USERACCOUNT_FIRST_NAME = _constModel.createDatatypeProperty(VitroVocabulary.USERACCOUNT_FIRST_NAME); + protected DatatypeProperty USERACCOUNT_LAST_NAME = _constModel.createDatatypeProperty(VitroVocabulary.USERACCOUNT_LAST_NAME); + protected DatatypeProperty USERACCOUNT_MD5_PASSWORD = _constModel.createDatatypeProperty(VitroVocabulary.USERACCOUNT_MD5_PASSWORD); + protected DatatypeProperty USERACCOUNT_OLD_PASSWORD = _constModel.createDatatypeProperty(VitroVocabulary.USERACCOUNT_OLD_PASSWORD); + protected DatatypeProperty USERACCOUNT_LOGIN_COUNT = _constModel.createDatatypeProperty(VitroVocabulary.USERACCOUNT_LOGIN_COUNT); + protected DatatypeProperty USERACCOUNT_STATUS = _constModel.createDatatypeProperty(VitroVocabulary.USERACCOUNT_STATUS); + protected DatatypeProperty USERACCOUNT_PASSWORD_LINK_EXPIRES = _constModel.createDatatypeProperty(VitroVocabulary.USERACCOUNT_PASSWORD_LINK_EXPIRES); + protected DatatypeProperty USERACCOUNT_PASSWORD_CHANGE_REQUIRED = _constModel.createDatatypeProperty(VitroVocabulary.USERACCOUNT_PASSWORD_CHANGE_REQUIRED); + protected ObjectProperty USERACCOUNT_HAS_PERMISSION_SET = _constModel.createObjectProperty(VitroVocabulary.USERACCOUNT_HAS_PERMISSION_SET); + + protected OntClass PERMISSIONSET = _constModel.createClass(VitroVocabulary.PERMISSIONSET); + protected ObjectProperty PERMISSIONSET_HAS_PERMISSION = _constModel.createObjectProperty(VitroVocabulary.PERMISSIONSET_HAS_PERMISSION); + + protected OntClass PERMISSION = _constModel.createClass(VitroVocabulary.PERMISSION); + + public OntModel getConstModel() { return _constModel; }