Changes and updates related to Datastar (and or testing)

This commit is contained in:
hjk54 2010-04-12 16:23:45 +00:00
parent 1fb7530c57
commit 17ef726ad8
5 changed files with 6 additions and 30 deletions

View file

@ -67,7 +67,6 @@ public class EntityController extends VitroHttpServlet {
VitroRequest vreq = new VitroRequest(req);
//get URL without hostname or servlet context
String url = req.getRequestURI().substring(req.getContextPath().length());
//Check to see if the request is for a non-information resource, redirect if it is.
String redirectURL = checkForRedirect ( url, req.getHeader("accept") );
if( redirectURL != null ){
@ -77,6 +76,7 @@ public class EntityController extends VitroHttpServlet {
ContentType rdfFormat = checkForLinkedDataRequest(url,req.getHeader("accept"));
if( rdfFormat != null ){
System.out.println("RDF Format? ");
doRdf( vreq, res, rdfFormat );
return;
}
@ -229,7 +229,6 @@ public class EntityController extends VitroHttpServlet {
vreq.setAttribute("css",css);
vreq.setAttribute("scripts", "/templates/entity/entity_inject_head.jsp");
RequestDispatcher rd = vreq.getRequestDispatcher( view );
rd.forward(vreq,res);
}

View file

@ -318,7 +318,7 @@ public class FedoraDatastreamController extends VitroHttpServlet implements Cons
fileUri = queryParameters.get("fileUri").get(0);
}
boolean useNewName=false;
if( "true".equals(queryParameters.get("useNewName"))){System.out.println("Use new name parameter is true");
if( "true".equals(queryParameters.get("useNewName"))){
useNewName = true;
}
if( pId == null || pId.length() == 0 )
@ -413,7 +413,6 @@ public class FedoraDatastreamController extends VitroHttpServlet implements Cons
DataProperty contentType = wdf.getDataPropertyDao().getDataPropertyByURI(this.contentTypeProperty);
if(contentType != null)
{
System.out.println("Setting content type to " + fileRes.getContentType());
wdf.getDataPropertyStatementDao().deleteDataPropertyStatementsForIndividualByDataProperty(fileEntity, contentType);
dps = new DataPropertyStatementImpl();
dps.setIndividualURI(fileEntity.getURI());
@ -462,29 +461,10 @@ public class FedoraDatastreamController extends VitroHttpServlet implements Cons
} else {
//System.out.println("file name property is null");
}
//This doesn't seem to be settable as a data property - how else could we set this?
/*
DataProperty fileLocationProperty = wdf.getDataPropertyDao().getDataPropertyByURI(this.fileLocationProperty);
if(fileLocationProperty != null) {
wdf.getDataPropertyStatementDao().deleteDataPropertyStatementsForIndividualByDataProperty(fileEntity, fileLocationProperty);
dps = new DataPropertyStatementImpl();
dps.setIndividualURI(fileEntity.getURI());
dps.setDatapropURI(fileLocationProperty.getURI());
dps.setData(saveLocation); //This follows the pattern of the original file upload - the name returned from the uploaded file object
wdf.getDataPropertyStatementDao().insertNewDataPropertyStatement(dps);
} else {
System.out.println("File location property is null");
}
*/
//Need to also update the check sum node - how would we do that
//Find checksum node related to this particular file uri, then go ahead and update two specific fields
//ObjectProperty checksumNode = wdf.getObjectPropertyDao().getObjectPropertyByURI(this.checksumNodeProperty);
//if(checksumNode != null) {
// System.out.println("Check sum node is not equal to null");
// fileEntity.
//}
List<ObjectPropertyStatement >csNodeStatements = fileEntity.getObjectPropertyMap().get(this.checksumNodeProperty).getObjectPropertyStatements();
if(csNodeStatements.size() == 0) {
System.out.println("No object property statements correspond to this property");

View file

@ -75,9 +75,8 @@ public class MailUsersServlet extends VitroHttpServlet {
if (smtpHost==null || smtpHost.equals("")){
status = "This application has not yet been configured to send mail " +
"-- smtp host has not been identified in the Configuration Properties file.";
System.out.println("Status incorrect - would redirect otherwise");
//response.sendRedirect( "test?bodyJsp=" + errpage + "&ERR=" + status + "&home=" + portal.getPortalId() );
//return;
response.sendRedirect( "test?bodyJsp=" + errpage + "&ERR=" + status + "&home=" + portal.getPortalId() );
return;
}
String SPAM_MESSAGE = "Your message was flagged as spam.";

View file

@ -71,7 +71,6 @@ public class FedoraConfiguration {
adminUser = props.getProperty("adminUser");
adminPassword = props.getProperty("adminPassword");
pidNamespace = props.getProperty("pidNamespace");
if( fedoraUrl == null || adminUser == null || adminPassword == null ){
if( fedoraUrl == null ){
log.error("'fedoraUrl' not found in properties file");

View file

@ -350,7 +350,6 @@ public class JenaIngestUtils {
* @return
*/
public Model dedupAndExtract( Model model, String preferredNamespace ) {
Model extractsModel = ModelFactory.createDefaultModel();
HashMap<String, String> rewriteURIUsing = new HashMap<String, String>();