Merge branch 'develop' into remove-rdfservicegraph
This commit is contained in:
commit
835b05af0c
7 changed files with 58 additions and 65 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
package edu.cornell.mannlib.vitro.webapp.visualization.temporalgraph;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
@ -157,13 +158,13 @@ public class TemporalGrantVisualizationRequestHandler implements
|
|||
Set<String> orgGrants = new HashSet<String>();
|
||||
Set<String> orgGrantsPeople = new HashSet<String>();
|
||||
|
||||
Map<String, Set<String>> subOrgPublicationsMap = new HashMap<String, Set<String>>();
|
||||
Map<String, Set<String>> subOrgGrantsMap = new HashMap<String, Set<String>>();
|
||||
|
||||
OrgUtils.getObjectMappingsForOrgAnSubOrgs(
|
||||
subjectEntityURI,
|
||||
orgGrants,
|
||||
orgGrantsPeople,
|
||||
subOrgPublicationsMap,
|
||||
subOrgGrantsMap,
|
||||
subOrgMap,
|
||||
organisationToPeopleMap,
|
||||
personToGrantMap
|
||||
|
@ -183,15 +184,19 @@ public class TemporalGrantVisualizationRequestHandler implements
|
|||
Set subEntitiesJson = new HashSet();
|
||||
|
||||
// For each suborganisation
|
||||
for (String subOrg : subOrgPublicationsMap.keySet()) {
|
||||
for (String subOrg : subOrgGrantsMap.keySet()) {
|
||||
JsonObject entityJson = new JsonObject(orgLabelMap.get(subOrg));
|
||||
|
||||
List<List<Integer>> yearPubCounts = CounterUtils.getObjectCountByYear(subOrgPublicationsMap.get(subOrg), grantToYearMap);
|
||||
if (subOrgGrantsMap.containsKey(subOrg)) {
|
||||
List<List<Integer>> yearPubCounts = CounterUtils.getObjectCountByYear(subOrgGrantsMap.get(subOrg), grantToYearMap);
|
||||
entityJson.setYearToActivityCount(yearPubCounts);
|
||||
} else {
|
||||
entityJson.setYearToActivityCount(new ArrayList<List<Integer>>());
|
||||
}
|
||||
|
||||
String type = orgMostSpecificLabelMap.get(subOrg);
|
||||
|
||||
entityJson.setYearToActivityCount(yearPubCounts);
|
||||
entityJson.setOrganizationTypes(Arrays.asList(type == null ? "Organization" : type));
|
||||
|
||||
entityJson.setEntityURI(subOrg);
|
||||
entityJson.setVisMode("ORGANIZATION");
|
||||
|
||||
|
@ -202,12 +207,16 @@ public class TemporalGrantVisualizationRequestHandler implements
|
|||
for (String person : orgGrantsPeople) {
|
||||
JsonObject entityJson = new JsonObject(personLabelMap.get(person));
|
||||
|
||||
List<List<Integer>> yearPubCounts = CounterUtils.getObjectCountByYear(personToGrantMap.get(person), grantToYearMap);
|
||||
if (personToGrantMap.containsKey(person)) {
|
||||
List<List<Integer>> yearPubCounts = CounterUtils.getObjectCountByYear(personToGrantMap.get(person), grantToYearMap);
|
||||
entityJson.setYearToActivityCount(yearPubCounts);
|
||||
} else {
|
||||
entityJson.setYearToActivityCount(new ArrayList<List<Integer>>());
|
||||
}
|
||||
|
||||
String type = personMostSpecificLabelMap.get(person);
|
||||
|
||||
entityJson.setYearToActivityCount(yearPubCounts);
|
||||
entityJson.setOrganizationTypes(Arrays.asList(type == null ? "Person" : type));
|
||||
|
||||
entityJson.setEntityURI(person);
|
||||
entityJson.setVisMode("PERSON");
|
||||
|
||||
|
@ -234,11 +243,11 @@ public class TemporalGrantVisualizationRequestHandler implements
|
|||
|
||||
csvFileContent.append("Entity Name, Grant Count, Entity Type\n");
|
||||
|
||||
for (String subOrg : subOrgPublicationsMap.keySet()) {
|
||||
for (String subOrg : subOrgGrantsMap.keySet()) {
|
||||
csvFileContent.append(StringEscapeUtils.escapeCsv(orgLabelMap.get(subOrg)));
|
||||
csvFileContent.append(", ");
|
||||
|
||||
csvFileContent.append(subOrgPublicationsMap.get(subOrg).size());
|
||||
csvFileContent.append(subOrgGrantsMap.get(subOrg).size());
|
||||
csvFileContent.append(", ");
|
||||
|
||||
csvFileContent.append("Organization");
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
package edu.cornell.mannlib.vitro.webapp.visualization.temporalgraph;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
@ -126,12 +127,16 @@ public class TemporalPublicationVisualizationRequestHandler implements
|
|||
for (String subOrg : subOrgPublicationsMap.keySet()) {
|
||||
JsonObject entityJson = new JsonObject(orgLabelMap.get(subOrg));
|
||||
|
||||
List<List<Integer>> yearPubCounts = CounterUtils.getObjectCountByYear(subOrgPublicationsMap.get(subOrg), publicationToYearMap);
|
||||
if (subOrgPublicationsMap.containsKey(subOrg)) {
|
||||
List<List<Integer>> yearPubCounts = CounterUtils.getObjectCountByYear(subOrgPublicationsMap.get(subOrg), publicationToYearMap);
|
||||
entityJson.setYearToActivityCount(yearPubCounts);
|
||||
} else {
|
||||
entityJson.setYearToActivityCount(new ArrayList<List<Integer>>());
|
||||
}
|
||||
|
||||
String type = orgMostSpecificLabelMap.get(subOrg);
|
||||
|
||||
entityJson.setYearToActivityCount(yearPubCounts);
|
||||
entityJson.setOrganizationTypes(Arrays.asList(type == null ? "Organization" : type));
|
||||
|
||||
entityJson.setEntityURI(subOrg);
|
||||
entityJson.setVisMode("ORGANIZATION");
|
||||
|
||||
|
@ -142,12 +147,16 @@ public class TemporalPublicationVisualizationRequestHandler implements
|
|||
for (String person : orgPublicationsPeople) {
|
||||
JsonObject entityJson = new JsonObject(personLabelMap.get(person));
|
||||
|
||||
List<List<Integer>> yearPubCounts = CounterUtils.getObjectCountByYear(personToPublicationMap.get(person), publicationToYearMap);
|
||||
if (personToPublicationMap.containsKey(person)) {
|
||||
List<List<Integer>> yearPubCounts = CounterUtils.getObjectCountByYear(personToPublicationMap.get(person), publicationToYearMap);
|
||||
entityJson.setYearToActivityCount(yearPubCounts);
|
||||
} else {
|
||||
entityJson.setYearToActivityCount(new ArrayList<List<Integer>>());
|
||||
}
|
||||
|
||||
String type = personMostSpecificLabelMap.get(person);
|
||||
|
||||
entityJson.setYearToActivityCount(yearPubCounts);
|
||||
entityJson.setOrganizationTypes(Arrays.asList(type == null ? "Person" : type));
|
||||
|
||||
entityJson.setEntityURI(person);
|
||||
entityJson.setVisMode("PERSON");
|
||||
|
||||
|
|
|
@ -65,8 +65,8 @@ public class OrgUtils {
|
|||
Set<String> people = organisationToPeopleMap.get(orgUri);
|
||||
if (people != null) {
|
||||
for (String person : people) {
|
||||
if (personToObjectMap.containsKey(person)) {
|
||||
if (orgObjectsIncludesPeople.add(person)) {
|
||||
if (orgObjectsIncludesPeople.add(person)) {
|
||||
if (personToObjectMap.containsKey(person)) {
|
||||
orgObjects.addAll(personToObjectMap.get(person));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1249,7 +1249,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>verifyTextPresent</td>
|
||||
<td>Select an existing Document Part for Nintendo O.K. for Kids</td>
|
||||
<td>Select an existing document for Nintendo O.K. for Kids</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -1983,7 +1983,7 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>verifyTextPresent</td>
|
||||
<td>verifyTextNotPresent</td>
|
||||
<td>Select an existing (Instrument or Service or Reagent or Research Project or Biological Specimen or Software or Database) for Nintendo O.K. for Kids</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -2023,7 +2023,7 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>verifyTextPresent</td>
|
||||
<td>verifyTextNotPresent</td>
|
||||
<td>Select an existing (Instrument or Service or Reagent or Research Project or Biological Specimen or Software or Database) for Nintendo O.K. for Kids</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -2079,7 +2079,7 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>verifyTextPresent</td>
|
||||
<td>verifyTextNotPresent</td>
|
||||
<td>Select an existing Global Citation Count for Nintendo O.K. for Kids</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -2119,7 +2119,7 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>verifyTextPresent</td>
|
||||
<td>verifyTextNotPresent</td>
|
||||
<td>Select an existing Global Citation Count for Nintendo O.K. for Kids</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -2170,7 +2170,7 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>verifyTextPresent</td>
|
||||
<td>verifyTextNotPresent</td>
|
||||
<td>Select an existing Event for Nintendo O.K. for Kids</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -2230,7 +2230,7 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>verifyTextPresent</td>
|
||||
<td>verifyTextNotPresent</td>
|
||||
<td>Select an existing Event for Nintendo O.K. for Kids</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -2301,7 +2301,7 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>verifyTextPresent</td>
|
||||
<td>verifyTextNotPresent</td>
|
||||
<td>Select an existing Process for Nintendo O.K. for Kids</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -2363,7 +2363,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>verifyTextPresent</td>
|
||||
<td>Select an existing Document for Nintendo O.K. for Kids</td>
|
||||
<td>Select an existing document for Nintendo O.K. for Kids</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -2398,7 +2398,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>verifyTextPresent</td>
|
||||
<td>Select an existing Document for Nintendo O.K. for Kids</td>
|
||||
<td>Select an existing document for Nintendo O.K. for Kids</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -2469,7 +2469,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>verifyTextPresent</td>
|
||||
<td>Select an existing Document for Nintendo O.K. for Kids</td>
|
||||
<td>Select an existing document for Nintendo O.K. for Kids</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -261,6 +261,11 @@
|
|||
<td>Nintendo: Good or Bad for Kids?</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pause</td>
|
||||
<td>3000</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<!--Navigate to Frank Furter-->
|
||||
<tr>
|
||||
<td>clickAndWait</td>
|
||||
|
|
|
@ -132,6 +132,11 @@
|
|||
<td>Furter, Frank</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pause</td>
|
||||
<td>3000</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<!--Verify new faculty member added-->
|
||||
<tr>
|
||||
<td>verifyTextPresent</td>
|
||||
|
|
|
@ -640,16 +640,6 @@
|
|||
<td>Regenerate Constructed Models</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>clickAndWait</td>
|
||||
<td>link=Child Development</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>assertTitle</td>
|
||||
<td>Child Development</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<!--Check out temporal graphs for dept grants-->
|
||||
<tr>
|
||||
<td>clickAndWait</td>
|
||||
|
@ -943,16 +933,6 @@
|
|||
<td>Regenerate Constructed Models</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>clickAndWait</td>
|
||||
<td>link=Child Development</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>assertTitle</td>
|
||||
<td>Child Development</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<!--Check out temporal graphs for college pubs-->
|
||||
<tr>
|
||||
<td>clickAndWait</td>
|
||||
|
@ -1115,21 +1095,6 @@
|
|||
<td>Regenerate Constructed Models</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>clickAndWait</td>
|
||||
<td>link=College of Human Ecology</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>assertTitle</td>
|
||||
<td>College of Human Ecology</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>clickAndWait</td>
|
||||
<td>link=Site Admin</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<!--Check out temporal graphs for college grants-->
|
||||
<tr>
|
||||
<td>clickAndWait</td>
|
||||
|
|
Loading…
Add table
Reference in a new issue