Merge branch 'develop' into feature/fauxEditing

This commit is contained in:
Jim Blake 2014-10-29 11:43:05 -04:00
commit 59706a4266
6 changed files with 35 additions and 12 deletions

View file

@ -19,6 +19,7 @@ public class DisplayObjectProperty extends RequestedAction {
@Override @Override
public String toString() { public String toString() {
return "DisplayObjectProperty[" + objectProperty.getLocalName() + "]"; return "DisplayObjectProperty[" + objectProperty + "]";
} }
} }

View file

@ -7,6 +7,8 @@ import java.util.Comparator;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.hp.hpl.jena.rdf.model.ResourceFactory;
public class Property extends BaseResourceBean implements ResourceBean { public class Property extends BaseResourceBean implements ResourceBean {
private static Log log = LogFactory.getLog( Property.class ); private static Log log = LogFactory.getLog( Property.class );
@ -99,6 +101,23 @@ public class Property extends BaseResourceBean implements ResourceBean {
this.deleteLinkSuppressed = deleteLinkSuppressed; this.deleteLinkSuppressed = deleteLinkSuppressed;
} }
@Override
public String toString() {
return this.getClass().getSimpleName() + "["
+ localNameFor(getURI())
+ ", domain=" + localNameFor(getDomainVClassURI())
+ ", range=" + localNameFor(getRangeVClassURI())
+ "]";
}
private String localNameFor(String uri) {
try {
return ResourceFactory.createResource(uri).getLocalName();
} catch (Exception e) {
return uri;
}
}
/** /**
* Sorts Property objects, by property rank, then alphanumeric. * Sorts Property objects, by property rank, then alphanumeric.
* @author bdc34 * @author bdc34

View file

@ -11,7 +11,6 @@ import static edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess.CONTENT;
import static edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess.LANGUAGE_NEUTRAL; import static edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess.LANGUAGE_NEUTRAL;
import static edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess.POLICY_NEUTRAL; import static edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess.POLICY_NEUTRAL;
import static edu.cornell.mannlib.vitro.webapp.modelaccess.ModelNames.DISPLAY; import static edu.cornell.mannlib.vitro.webapp.modelaccess.ModelNames.DISPLAY;
import static edu.cornell.mannlib.vitro.webapp.modelaccess.ModelNames.FULL_ASSERTIONS;
import java.text.Collator; import java.text.Collator;
import java.util.Collections; import java.util.Collections;
@ -105,10 +104,6 @@ public class VitroRequest extends HttpServletRequestWrapper {
return ModelAccess.on(this).getOntModel(ModelNames.FULL_UNION); return ModelAccess.on(this).getOntModel(ModelNames.FULL_UNION);
} }
public OntModel getAssertionsOntModel() {
return ModelAccess.on(this).getOntModel(FULL_ASSERTIONS);
}
public OntModel getDisplayModel(){ public OntModel getDisplayModel(){
return ModelAccess.on(this).getOntModel(DISPLAY); return ModelAccess.on(this).getOntModel(DISPLAY);
} }
@ -198,7 +193,10 @@ public class VitroRequest extends HttpServletRequestWrapper {
} }
public WebappDaoFactory getLanguageNeutralWebappDaoFactory() { public WebappDaoFactory getLanguageNeutralWebappDaoFactory() {
return edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess.on(this).getWebappDaoFactory(LANGUAGE_NEUTRAL); // It is also policy neutral, because that's how it was originally
// implemented, and at least some of the client code expects it that
// way.
return ModelAccess.on(this).getWebappDaoFactory(LANGUAGE_NEUTRAL, POLICY_NEUTRAL);
} }
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------

View file

@ -2,6 +2,8 @@
package edu.cornell.mannlib.vitro.webapp.controller.individual; package edu.cornell.mannlib.vitro.webapp.controller.individual;
import static edu.cornell.mannlib.vitro.webapp.modelaccess.ModelNames.FULL_ASSERTIONS;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -35,6 +37,7 @@ import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.RdfResponseValues; import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.RdfResponseValues;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues; import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
import edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess;
import edu.cornell.mannlib.vitro.webapp.utils.jena.ExtendedLinkedDataUtils; import edu.cornell.mannlib.vitro.webapp.utils.jena.ExtendedLinkedDataUtils;
import edu.cornell.mannlib.vitro.webapp.utils.jena.JenaOutputUtils; import edu.cornell.mannlib.vitro.webapp.utils.jena.JenaOutputUtils;
import edu.cornell.mannlib.vitro.webapp.web.ContentType; import edu.cornell.mannlib.vitro.webapp.web.ContentType;
@ -126,7 +129,8 @@ public class ExtendedRdfAssembler {
} }
newModel = getLabelAndTypes(entity, contextModel, newModel ); newModel = getLabelAndTypes(entity, contextModel, newModel );
newModel = getStatementsWithUntypedProperties(subj, contextModel, vreq.getAssertionsOntModel(), newModel); newModel = getStatementsWithUntypedProperties(subj, contextModel,
ModelAccess.on(vreq).getOntModel(FULL_ASSERTIONS), newModel);
//bdc34: The following code adds all triples where entity is the Subject. //bdc34: The following code adds all triples where entity is the Subject.
// contextModel.enterCriticalSection(Lock.READ); // contextModel.enterCriticalSection(Lock.READ);

View file

@ -74,11 +74,13 @@ public class WebappDaoFactoryFiltering implements WebappDaoFactory {
this.innerWebappDaoFactory = innerDao; this.innerWebappDaoFactory = innerDao;
} }
@Override @Override
public String toString() { public String toString() {
return "WebappDaoFactoryFiltering[inner=" + innerWebappDaoFactory + "]"; return "WebappDaoFactoryFiltering[inner=" + innerWebappDaoFactory
+ ", filters=" + filters + "]";
} }
/* ******************* filtering *********************** */ /* ******************* filtering *********************** */

View file

@ -91,8 +91,7 @@ public class GroupedPropertyList extends BaseTemplateModel {
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
for (ObjectProperty t : additions) { for (ObjectProperty t : additions) {
log.debug(t.getDomainPublic() + " " + t.getGroupURI() + " domain " + log.debug("addition: " + t);
t.getDomainVClassURI());
} }
log.debug("Added " + additions.size() + log.debug("Added " + additions.size() +
" properties due to application configuration ontology"); " properties due to application configuration ontology");