NIHVIVO-1332 Editing links for vitro link properties. Restore lines that were incorrectly commented out in previous commit. Move ftl for displaying links from an include to a macro, to parameterize the ul class value.

This commit is contained in:
rjy7 2011-01-13 23:54:26 +00:00
parent 9dc505f94f
commit c6fa64ff98
4 changed files with 36 additions and 38 deletions

View file

@ -75,9 +75,9 @@ public class ObjectPropertyDaoJena extends PropertyDaoJena implements ObjectProp
namespaceFilters.add("afn:namespace(?property) != \"" + s + "\"");
}
// A hack to include the vitro:primaryLink and vitro:additionalLink properties in the list
// namespaceFilters.add("( ?property = <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#primaryLink> ||" +
// "?property = <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#additionalLink> ||" +
// "afn:namespace(?property) != \"http://vitro.mannlib.cornell.edu/ns/vitro/0.7#\" )");
namespaceFilters.add("( ?property = <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#primaryLink> ||" +
"?property = <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#additionalLink> ||" +
"afn:namespace(?property) != \"http://vitro.mannlib.cornell.edu/ns/vitro/0.7#\" )");
propertyFilters = "FILTER (" + StringUtils.join(namespaceFilters, " && \n") + ")\n";
}

View file

@ -69,11 +69,7 @@ public class GroupedPropertyList extends BaseTemplateModel {
// This may include properties that are not defined as "possible properties" for a subject of this class,
// so we cannot just rely on getting that list.
List<ObjectProperty> objectPropertyList = subject.getPopulatedObjectPropertyList();
// If we're going to create a new template model object property with a name,
// don't need to set editLabel, can just do this:
//propertyList.addAll(objectPropertyList);
for (ObjectProperty op : objectPropertyList) {
//op.setLabel(op.getDomainPublic());
propertyList.add(op);
}
@ -92,7 +88,6 @@ public class GroupedPropertyList extends BaseTemplateModel {
// two working in parallel.
List<DataProperty> dataPropertyList = subject.getPopulatedDataPropertyList();
for (DataProperty dp : dataPropertyList) {
//dp.setLabel(dp.getPublicName());
propertyList.add(dp);
}
@ -100,7 +95,7 @@ public class GroupedPropertyList extends BaseTemplateModel {
mergeAllPossibleDataProperties(propertyList);
}
sort(propertyList); //*** Does this do data and obj props, or just obj props??
sort(propertyList);
// Put the list into groups
List<PropertyGroup> propertyGroupList = addPropertiesToGroups(propertyList);