Removing debugging statements. NIHVIVO-1140
This commit is contained in:
parent
bba244d852
commit
5002c3d761
1 changed files with 15 additions and 50 deletions
|
@ -2,11 +2,8 @@
|
|||
|
||||
package edu.cornell.mannlib.vitro.webapp.beans;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Comparator;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* a class representing a particular instance of an object property
|
||||
|
@ -23,20 +20,7 @@ public class ObjectPropertyStatementImpl implements VitroTimeWindowedResource, O
|
|||
private ObjectProperty property = null;
|
||||
private String qualifier = null;
|
||||
private boolean subjectOriented = true; //is the range the item of interest?
|
||||
private String description = null; //generated desc based on subjectOriented during sql query.
|
||||
|
||||
/*
|
||||
fields in db:
|
||||
id
|
||||
domainId
|
||||
rangeId
|
||||
relationId
|
||||
modTime
|
||||
propertyId
|
||||
sunrise
|
||||
sunset
|
||||
qualifier
|
||||
*/
|
||||
private String description = null; //generated desc based on subjectOriented during sql query.
|
||||
|
||||
public ObjectPropertyStatementImpl() { }
|
||||
|
||||
|
@ -46,16 +30,16 @@ qualifier
|
|||
objectURI = objectUri;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement#toString()
|
||||
*/
|
||||
public String toString(){
|
||||
String prop = (getProperty()!=null)?getProperty().getDomainPublic():"by propURI"+getPropertyURI();
|
||||
String ran = (getObject()!= null)?getObject().getName():"objectURI:"+getObjectURI();
|
||||
String dom = (getSubject()!= null)?getSubject().getName():"subjectURI:"+getSubjectURI();
|
||||
String orent = (isSubjectOriented() )?"subject oriented":"object oriented";
|
||||
return "Object Property Statements: "+dom+" "+prop+" to "+ran+" "+orent;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement#toString()
|
||||
*/
|
||||
public String toString(){
|
||||
String prop = (getProperty()!=null)?getProperty().getDomainPublic():"by propURI"+getPropertyURI();
|
||||
String ran = (getObject()!= null)?getObject().getName():"objectURI:"+getObjectURI();
|
||||
String dom = (getSubject()!= null)?getSubject().getName():"subjectURI:"+getSubjectURI();
|
||||
String orent = (isSubjectOriented() )?"subject oriented":"object oriented";
|
||||
return "Object Property Statements: "+dom+" "+prop+" to "+ran+" "+orent;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement#getDescription()
|
||||
|
@ -200,33 +184,14 @@ public String toString(){
|
|||
this.propertyURI = URI;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Change the values of this object property statement object
|
||||
* so that it is from the other side of the relation.
|
||||
* This must be associative.
|
||||
* This does NOT modify this.property
|
||||
*
|
||||
public void reflect(){
|
||||
Individual tmp = getSubject();
|
||||
setSubject(getObject());
|
||||
setObject(tmp);
|
||||
setSubjectURI(getSubject().getURI());
|
||||
setObjectURI(getObject().getURI());
|
||||
setSubjectOriented( !isSubjectOriented() );
|
||||
}*/
|
||||
|
||||
/**
|
||||
* Sorts entity object for display presentation.
|
||||
* @author bdc34
|
||||
*/
|
||||
public static class DisplayComparator implements Comparator{
|
||||
private static final Log log = LogFactory.getLog(DisplayComparator.class.getName());
|
||||
|
||||
public static class DisplayComparator implements Comparator{
|
||||
public int compare(Object o1, Object o2) {
|
||||
Individual ent1 = ((ObjectPropertyStatement) o1).getSubject();
|
||||
Individual ent2 = ((ObjectPropertyStatement) o2).getSubject();
|
||||
log.debug("Comparing "+ent1.getName()+" to"+ent2.getName());
|
||||
Individual ent2 = ((ObjectPropertyStatement) o2).getSubject();
|
||||
return ent1.getName().compareTo(ent2.getName());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue