Remove unused field from PropertyTemplateModel

This commit is contained in:
rjy7 2011-01-12 15:59:52 +00:00
parent fcaa94088e
commit 3ba7346ac4
4 changed files with 15 additions and 18 deletions

View file

@ -38,9 +38,9 @@ public class DataPropertyStatementTemplateModel extends BaseTemplateModel {
private String dataPropHash = null;
DataPropertyStatementTemplateModel(String subjectUri, String propertyUri,
Literal value2, EditingPolicyHelper policyHelper) {
Literal value, EditingPolicyHelper policyHelper) {
this.value = value2;
this.value = value;
if (policyHelper != null) {
this.subjectUri = subjectUri;

View file

@ -9,8 +9,6 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.Authorization;
import edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyDecision;
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.DropObjectPropStmt;
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.EditObjPropStmt;

View file

@ -111,14 +111,14 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
if (hasDefaultListView()) {
object = DEFAULT_LIST_VIEW_QUERY_OBJECT_VARIABLE_NAME;
log.debug("Using default list view for property " + getUri() +
log.debug("Using default list view for property " + propertyUri +
", so query object = '" + object + "'");
} else {
String queryString = getQueryString();
Matcher m = SUBJECT_PROPERTY_OBJECT_PATTERN.matcher(queryString);
if (m.find()) {
object = m.group(1);
log.debug("Query object for property " + getUri() + " = '" + object + "'");
log.debug("Query object for property " + propertyUri + " = '" + object + "'");
}
}

View file

@ -17,23 +17,20 @@ public abstract class PropertyTemplateModel extends BaseTemplateModel {
private static final Log log = LogFactory.getLog(PropertyTemplateModel.class);
private String name;
protected String propertyUri;
// For editing
protected String subjectUri = null;
protected String propertyUri = null;
protected Property property; // RY DO WE NEED THIS, or just the uri??
protected boolean addAccess = false;
PropertyTemplateModel(Property property, Individual subject, EditingPolicyHelper policyHelper) {
// Do in subclass constructor. The label has not been set on the property, and getting the
// label differs between object and data properties.
// Do in subclass constructor. The label has not been set on the property, and the
// means of getting the label differs between object and data properties.
// this.name = property.getLabel();
this.propertyUri = property.getURI();
this.property = property;
propertyUri = property.getURI();
if (policyHelper != null) {
subjectUri = subject.getURI();
propertyUri = property.getURI();
}
}
@ -41,6 +38,11 @@ public abstract class PropertyTemplateModel extends BaseTemplateModel {
this.name = name;
}
protected String getUri() {
return propertyUri;
}
/* Access methods for templates */
public abstract String getType();
@ -49,9 +51,6 @@ public abstract class PropertyTemplateModel extends BaseTemplateModel {
return name;
}
public String getUri() {
return propertyUri;
}
public abstract String getAddUrl();