diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/PropertyEditController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/PropertyEditController.java index 26554c6fb..d00d23765 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/PropertyEditController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/PropertyEditController.java @@ -21,6 +21,7 @@ import edu.cornell.mannlib.vedit.beans.FormObject; import edu.cornell.mannlib.vedit.controller.BaseEditController; import edu.cornell.mannlib.vitro.webapp.auth.permissions.SimplePermission; import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; +import edu.cornell.mannlib.vitro.webapp.beans.DataProperty; import edu.cornell.mannlib.vitro.webapp.beans.PropertyGroup; import edu.cornell.mannlib.vitro.webapp.beans.VClass; import edu.cornell.mannlib.vitro.webapp.controller.Controllers; @@ -28,6 +29,7 @@ import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.dao.ObjectPropertyDao; import edu.cornell.mannlib.vitro.webapp.dao.PropertyGroupDao; import edu.cornell.mannlib.vitro.webapp.dao.VClassDao; +import edu.cornell.mannlib.vitro.webapp.dao.DataPropertyDao; public class PropertyEditController extends BaseEditController { @@ -46,6 +48,7 @@ public class PropertyEditController extends BaseEditController { ObjectPropertyDao propDao = vreq.getFullWebappDaoFactory().getObjectPropertyDao(); VClassDao vcDao = vreq.getFullWebappDaoFactory().getVClassDao(); PropertyGroupDao pgDao = vreq.getFullWebappDaoFactory().getPropertyGroupDao(); + DataPropertyDao dpDao = vreq.getFullWebappDaoFactory().getDataPropertyDao(); ObjectProperty p = (ObjectProperty)propDao.getObjectPropertyByURI(request.getParameter("uri")); request.setAttribute("property",p); @@ -57,15 +60,15 @@ public class PropertyEditController extends BaseEditController { results.add("display name"); // column 5 results.add("group"); // column 6 results.add("display tier"); // column 7 - results.add("example"); // column 8 - results.add("description"); // column 9 - results.add("public description"); // column 10 + results.add("public description"); // column 8 + results.add("example"); // column 9 + results.add("editor description"); // column 10 results.add("display level"); //column 11 results.add("update level"); // column 12 results.add("custom entry form"); // column 13 results.add("select from existing"); // column 14 results.add("offer create new option"); // column 15 - results.add("force stub object deletion"); // column 16 + results.add("relatedsort direction"); // column 16 results.add("URI"); // column 17 String displayName = (p.getDomainPublic()==null) ? p.getLocalName() : p.getDomainPublic(); @@ -135,12 +138,12 @@ public class PropertyEditController extends BaseEditController { results.add("unspecified"); // column 6 } results.add("domain: "+p.getDomainDisplayTier() + ", range: "+p.getRangeDisplayTier()); // column 7 - String exampleStr = (p.getExample() == null) ? "" : p.getExample(); - results.add(exampleStr); // column 8 - String descriptionStr = (p.getDescription() == null) ? "" : p.getDescription(); - results.add(descriptionStr); // column 9 String publicDescriptionStr = (p.getPublicDescription() == null) ? "" : p.getPublicDescription(); - results.add(publicDescriptionStr); // column 10 + results.add(publicDescriptionStr); // column 8 + String exampleStr = (p.getExample() == null) ? "" : p.getExample(); + results.add(exampleStr); // column 9 + String descriptionStr = (p.getDescription() == null) ? "" : p.getDescription(); + results.add(descriptionStr); // column 10 results.add(p.getHiddenFromDisplayBelowRoleLevel() == null ? "unspecified" : p.getHiddenFromDisplayBelowRoleLevel().getLabel()); // column 11 results.add(p.getProhibitedFromUpdateBelowRoleLevel() == null ? "unspecified" : p.getProhibitedFromUpdateBelowRoleLevel().getLabel()); // column 12 @@ -148,7 +151,26 @@ public class PropertyEditController extends BaseEditController { results.add(p.getCustomEntryForm() == null ? "unspecified" : p.getCustomEntryForm()); // column 13 results.add(p.getSelectFromExisting() ? "true" : "false"); // column 14 results.add(p.getOfferCreateNewOption() ? "true" : "false"); // column 15 - results.add(p.getStubObjectRelation() ? "true" : "false"); // column 16 + //results.add(p.getStubObjectRelation() ? "true" : "false"); // column 16 + + /* + String datapropStr = ""; + if (p.getObjectIndividualSortPropertyURI() != null) { + DataProperty dProp = dpDao.getDataPropertyByURI(p.getObjectIndividualSortPropertyURI()); + if (dProp != null && dProp.getURI() != null && dProp.getLocalNameWithPrefix() != null) { + try { + datapropStr = ""+dProp.getLocalNameWithPrefix()+""; + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + } + results.add(datapropStr); // column 16 + } else { + results.add("name (rdfs:label)"); // column 16 + } + */ + results.add(p.getDomainEntitySortDirection() == null ? "ascending" : p.getDomainEntitySortDirection()); // column 16 + results.add(p.getURI()); // column 17 request.setAttribute("results",results); request.setAttribute("columncount",NUM_COLS); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/PropertyRetryController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/PropertyRetryController.java index 73b24ac4c..1cd5897ba 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/PropertyRetryController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/PropertyRetryController.java @@ -37,7 +37,6 @@ import edu.cornell.mannlib.vitro.webapp.beans.VClass; import edu.cornell.mannlib.vitro.webapp.controller.Controllers; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.edit.utils.RoleLevelOptionsSetup; -import edu.cornell.mannlib.vitro.webapp.dao.DataPropertyDao; import edu.cornell.mannlib.vitro.webapp.dao.ObjectPropertyDao; import edu.cornell.mannlib.vitro.webapp.dao.OntologyDao; import edu.cornell.mannlib.vitro.webapp.dao.VClassDao; @@ -74,7 +73,6 @@ public class PropertyRetryController extends BaseEditController { epo.setDataAccessObject(propDao); OntologyDao ontDao = request.getFullWebappDaoFactory().getOntologyDao(); VClassDao vclassDao = request.getFullWebappDaoFactory().getVClassDao(); - DataPropertyDao dpDao = request.getFullWebappDaoFactory().getDataPropertyDao(); ObjectProperty propertyForEditing = null; if (!epo.getUseRecycledBean()){ @@ -166,7 +164,9 @@ public class PropertyRetryController extends BaseEditController { request.setAttribute("inverseFunctional",propertyForEditing.getInverseFunctional()); request.setAttribute("selectFromExisting",propertyForEditing.getSelectFromExisting()); request.setAttribute("offerCreateNewOption", propertyForEditing.getOfferCreateNewOption()); - request.setAttribute("stubObjectRelation", propertyForEditing.getStubObjectRelation()); + //request.setAttribute("stubObjectRelation", propertyForEditing.getStubObjectRelation()); + request.setAttribute("objectIndividualSortPropertyURI", propertyForEditing.getObjectIndividualSortPropertyURI()); + request.setAttribute("domainEntitySortDirection", propertyForEditing.getDomainEntitySortDirection()); request.setAttribute("collateBySubclass", propertyForEditing.getCollateBySubclass()); //checkboxes are pretty annoying : we don't know if someone *unchecked* a box, so we have to default to false on updates. @@ -177,7 +177,7 @@ public class PropertyRetryController extends BaseEditController { propertyForEditing.setInverseFunctional(false); propertyForEditing.setSelectFromExisting(false); propertyForEditing.setOfferCreateNewOption(false); - propertyForEditing.setStubObjectRelation(false); + //propertyForEditing.setStubObjectRelation(false); propertyForEditing.setCollateBySubclass(false); } @@ -187,7 +187,7 @@ public class PropertyRetryController extends BaseEditController { RequestDispatcher rd = request.getRequestDispatcher(Controllers.BASIC_JSP); request.setAttribute("bodyJsp","/templates/edit/formBasic.jsp"); - request.setAttribute("colspan","4"); + request.setAttribute("colspan","5"); request.setAttribute("formJsp","/templates/edit/specific/property_retry.jsp"); request.setAttribute("scripts","/templates/edit/formBasic.js"); request.setAttribute("title","Property Editing Form"); @@ -243,17 +243,19 @@ public class PropertyRetryController extends BaseEditController { parentIdList.add(0,new Option("-1","none (root property)", false)); optionMap.put("ParentURI", parentIdList); -// List dpList = dpDao.getAllDataProperties(); -// Collections.sort(dpList); -// List objectIndividualSortPropertyList = -// FormUtils.makeOptionListFromBeans( -// dpList, "URI", "Name", -// propertyForEditing.getObjectIndividualSortPropertyURI(), -// null); -// objectIndividualSortPropertyList.add(0, new Option( -// "","- select data property -")); -// optionMap.put("ObjectIndividualSortPropertyURI", -// objectIndividualSortPropertyList); + /* + List dpList = dpDao.getAllDataProperties(); + Collections.sort(dpList); + List objectIndividualSortPropertyList = + FormUtils.makeOptionListFromBeans( + dpList, "URI", "Name", + propertyForEditing.getObjectIndividualSortPropertyURI(), + null); + objectIndividualSortPropertyList.add(0, new Option( + "","- name (rdfs:label) -")); + optionMap.put("ObjectIndividualSortPropertyURI", + objectIndividualSortPropertyList); + */ List domainOptionList = FormUtils.makeVClassOptionList( request.getFullWebappDaoFactory(), diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/VclassEditController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/VclassEditController.java index db5c499d5..5837ff0f0 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/VclassEditController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/VclassEditController.java @@ -31,7 +31,7 @@ import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; public class VclassEditController extends BaseEditController { private static final Log log = LogFactory.getLog(VclassEditController.class.getName()); - private static final int NUM_COLS = 12; + private static final int NUM_COLS = 10; public void doPost (HttpServletRequest req, HttpServletResponse response) { if (!isAuthorizedToDisplayPage(req, response, SimplePermission.EDIT_ONTOLOGY.ACTIONS)) { @@ -63,9 +63,7 @@ public class VclassEditController extends BaseEditController { results.add("display level"); // 7 results.add("update level"); // 8 results.add("custom entry form"); // 9 - results.add("custom display view"); // 10 - results.add("custom search view"); // 11 - results.add("URI"); // 12 + results.add("URI"); // 10 String name = vcl.getLocalNameWithPrefix(); String shortDef = (vcl.getShortDef()==null) ? "" : vcl.getShortDef(); @@ -116,9 +114,7 @@ public class VclassEditController extends BaseEditController { results.add(hiddenFromDisplay); // 7 results.add(ProhibitedFromUpdate); // 8 results.add(customEntryForm); // 9 - results.add(customDisplayView); // 10 - results.add(customSearchView); // 11 - results.add(uri); // 12 + results.add(uri); // 10 request.setAttribute("results", results); request.setAttribute("columncount", NUM_COLS); request.setAttribute("suppressquery", "true"); diff --git a/webapp/themes/vitro/css/vitroTheme.css b/webapp/themes/vitro/css/vitroTheme.css index e7c369f29..249fb4ed8 100644 --- a/webapp/themes/vitro/css/vitroTheme.css +++ b/webapp/themes/vitro/css/vitroTheme.css @@ -396,6 +396,11 @@ ul.ingestMenu { tr.editformcell td input[type="text"] { width: 30% !important; } + +tr.editformcell td input.fullWidthInput { + width: 90% !important; +} + tr.editformcell td select { font-size: .8em; } diff --git a/webapp/web/templates/edit/specific/dataprop_retry.jsp b/webapp/web/templates/edit/specific/dataprop_retry.jsp index c0ff71c19..d4a7f7a7b 100644 --- a/webapp/web/templates/edit/specific/dataprop_retry.jsp +++ b/webapp/web/templates/edit/specific/dataprop_retry.jsp @@ -4,59 +4,52 @@ <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%-- colspan set to 4 in DatapropRetryController.java --%> - - Public Nameas will display on public pages - "/> + + Public label + "/> - - Property Group - (for display headers and dashboard) + + Property group - + + for grouping properties on individual pages - - Display Level(specify least restrictive level allowed) - - - - Update Level(specify least restrictive level allowed) - - + Ontology - Change only via the "change URI" button on the previous screen - + + Edit via "change URI" on previous screen - specifies Namespace - + - Local Name* + Internal name* (RDF local name) - Change only via the "change URI" button on the previous screen - " disabled="disabled"/> + " disabled="disabled"/> + Edit via "change URI" - (must be a valid XML name)startLowercaseAndUseCamelStyle - "/> + "/> + must be valid XML without spaces; by + convention use camel case with no initial capital @@ -65,39 +58,52 @@ - + - Domain Class + Domain class - - - - Range Datatype + Range datatype - + + Use "untyped" instead of "string" to allow language tags - - - - - ${functionalLabel} - - - ${functionalLabel} - - - - + - Example + Make this property be: + + + + ${functionalLabel} + + + ${functionalLabel} + + + A "functional" property has at most one value for each individual + + + + + + Public description for front-end users, as it will appear on editing forms + + + + + + + + + + Example for ontology editors @@ -105,7 +111,6 @@ - Description for ontology editors @@ -116,38 +121,43 @@ - + - - Public Description for front-end users, as it will appear on editing forms - - - - - + + Display level + + specify least restrictive level allowed + + + Update level + + specify least restrictive level allowed - + - - Display Tier - "/> + + Display tier within property group + "/> - - Data Entry Limit - "/> + + Display limit before "more ..." button is displayed + "/> - - Optional: custom entry form - " /> + + + + + Custom entry form + " /> @@ -155,4 +165,5 @@ + diff --git a/webapp/web/templates/edit/specific/property_retry.jsp b/webapp/web/templates/edit/specific/property_retry.jsp index f1bc223e7..b9591529a 100644 --- a/webapp/web/templates/edit/specific/property_retry.jsp +++ b/webapp/web/templates/edit/specific/property_retry.jsp @@ -6,46 +6,40 @@ <%-- colspan set to 5 in PropertyRetryController.java --%> - Parent property + Parent property - - Property Group - (for display headers and dashboard) - + + Property group + + for grouping properties on individual pages - - Display Level(specify least restrictive level allowed) - - - - Update Level(specify least restrictive level allowed) - - + - - Ontology + + Ontology - Change only via the "change URI" button on the previous screen - + + Edit via "change URI" on previous screen - - Local name for property* + + Internal name* (RDF local name) - Change only via the "change URI" button on the previous screen - " style="width:90%;" disabled="disabled"/> + + Edit via "change URI" - (must be a valid XML name without spaces) - " style="width:90%;"/> + " /> + must be valid XML without spaces; by + convention use camel case with no initial capital @@ -53,38 +47,40 @@ - - Optional: Label for public display - " style="width:90%;" maxlength="80" /> + + Label for public display + " /> + - - Optional: Inverse property ontology + + Inverse property ontology - Change only via the "change URI" button on the previous screen - + + Edit via "change URI" - + - - Optional: Inverse property local name + + Inverse property internal name (RDF local name) - Change only via the "change URI" button on the previous screen - " style="width:90%;" disabled="disabled"/> + " /> + Edit via "change URI" - (must be a valid XML name without spaces) - " style="width:90%;"/> + " /> + must be a valid XML name without spaces; by + convention use camel case with no initial capital @@ -92,26 +88,75 @@ - - Optional: Inverse property label for public display - " style="width:90%;" maxlength="80" /> + + Inverse property label + " class="fullWidthInput" maxlength="80" /> + + Domain class - + Range class - + + + + Make this property be: + + + transitive + + + transitive + + + + + + + + symmetric + + + symmetric + + + + + + + + functional + + + functional + + + + + + + + inverse functional + + + inverse functional + + + + + Public Description for front-end users, as it will appear on editing forms @@ -122,165 +167,126 @@ + - - Optional: display tier for this property - (lower numbers display first) - " style="width:15%;" /> + + Example for ontology editors + " /> + + + + + + + + + Description for ontology editors + + + + + + + + + + + Display level + + specify least restrictive level allowed + + + Update level + + specify least restrictive level allowed + + + + + + Display tier for this property + " /> + lower numbers display first - - Optional: display tier for this property's inverse - (lower numbers display first) - " style="width:15%;" /> + + Display tier for inverse property + " /> + lower numbers display first - - Related object individuals to display without collapsing - (lower numbers display first) - " style="width:15%;" /> - - - - - - - - - Optional: sort direction - (blank for ascending, "desc" for descending) - " /> - - - - - - - - - + + When displaying related individuals from different classes, - collate by subclass + collate by subclass collate by subclass - + + - - - - transitive - - - transitive - - - - - - - symmetric - - - symmetric - - - - - - - functional - - - functional - - - - - - - inverse functional - - - inverse functional - - + + Number of individuals to display + " /> + before showing a "more ..." button + + + + + + + Sort direction for related individuals, alphabetically by their name (rdfs:label) + " /> + blank for ascending, "desc" for descending + Note: will be ignored if a custom list view has been configured for this property + + + + - - - - custom entry form - " /> + + + + Select related individuals from existing choices? + + + provide selection + + + provide selection + + + + + Allow creating new related individuals? + + + offer create option + + + offer create option + + + + + Custom entry form + " /> - - - Caution:delete object when statement deleted? - - - stub object relation with force delete - - - stub object relation with force delete - - - - - select from existing choices when adding statements? - - - provide selection - - - provide selection - - - - - when adding a new statement, also offer option to create new individual? - - - offer create option - - - offer create option - - - - - - - - - Example - " /> - - - - - - - - - Description for ontology editors - - - - - - - + + + diff --git a/webapp/web/templates/edit/specific/vclass_retry.jsp b/webapp/web/templates/edit/specific/vclass_retry.jsp index 67162f580..ee188c5ac 100644 --- a/webapp/web/templates/edit/specific/vclass_retry.jsp +++ b/webapp/web/templates/edit/specific/vclass_retry.jsp @@ -1,135 +1,126 @@ - - - - - - Class Name for editing pick lists and the Index - ... use initial capital letters; spaces OK - - - - - Display Level(specify least restrictive level allowed) - - - - Update Level(specify least restrictive level allowed) - - - - - - Class Group - for search results and the Index - - - - - Ontology - - - Change via the "change URI" button on previous screen - - - - (must be a valid XML name without spaces) - - - - - - Internal Name* - - - Change via "change URI" - - - - must be valid XMLby convention starts with a capital letter - - - - - - - - - - - - Short Definition - - - - - - - - - - Example - - - - - - - - - - Description - - - - - - - - - - Display Limit - - - - - - - - Display Rank - - - - - - - - - - Optional: custom entry form - - - - - - - - Optional: custom display view - - - - - - - - Optional: custom search view - - - - - - - - + + + + + + Class label + + by convention use initial capital letters; spaces OK + + + + Class group + + for menu pages, search results and the index page + + + + + + + Ontology + + + + Edit via "change URI" on previous screen + + + + + + + + Internal name* (RDF local name) + + + + Edit via "change URI" + + + + must be valid XML without spaces; by + convention use camel case with an initial capital + + + + + + + + + + + + Short definition to display publicly + + + + + + + + + + Example for ontology editors + + + + + + + + + + Description for ontology editors + + + + + + + + + + + Display level + + specify least restrictive level allowed + + + Update level + + specify least restrictive level allowed + + + + + + + Display rank within class group + + + + + + + + Custom entry form + + + + + + + + +