Skip to content

Commit

Permalink
Fixed structure in placeAllResults
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcAgate committed Apr 25, 2018
1 parent d965123 commit 43646b2
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/main/java/io/bdrc/ldspdi/results/library/PlaceAllResults.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ public class PlaceAllResults {
public final static String TYPE="http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
public final static String PERSON="http://purl.bdrc.io/ontology/core/Person";
public final static String WORK="http://purl.bdrc.io/ontology/core/Work";
public final static String PLACE="http://purl.bdrc.io/ontology/core/Place";
public final static String WORK_PRINTED="http://purl.bdrc.io/ontology/tmp/WorkPrinted";
public final static String PLACE="http://purl.bdrc.io/ontology/core/Place";
public final static String ACCESS="http://purl.bdrc.io/ontology/admin/access";
public final static String LICENSE="http://purl.bdrc.io/ontology/admin/license";
public final static String STATUS="http://purl.bdrc.io/ontology/admin/status";
Expand All @@ -26,8 +25,7 @@ public static HashMap<String,Object> getResultsMap(Model mod) throws RestExcepti
HashMap<String,Object> res=new HashMap<>();
HashMap<String,ArrayList<Field>> works=new HashMap<>();
HashMap<String,ArrayList<Field>> people=new HashMap<>();
HashMap<String,ArrayList<Field>> places=new HashMap<>();
HashMap<String,ArrayList<Field>> litprod=new HashMap<>();
HashMap<String,ArrayList<Field>> places=new HashMap<>();
HashMap<String,Integer> access=new HashMap<>();
HashMap<String,Integer> license=new HashMap<>();
HashMap<String,Integer> status=new HashMap<>();
Expand Down Expand Up @@ -93,15 +91,7 @@ public static HashMap<String,Object> getResultsMap(Model mod) throws RestExcepti
status.put(st.getObject().asNode().getURI(), 1);
}
}
break;
case WORK_PRINTED:
ArrayList<Field> wp=litprod.get(st.getSubject().getURI());
if(wp==null) {
wp=new ArrayList<Field>();
}
wp.add(Field.getField(st));
litprod.put(st.getSubject().getURI(),wp);
break;
break;
case PLACE:
ArrayList<Field> pla=places.get(st.getSubject().getURI());
if(pla==null) {
Expand Down Expand Up @@ -131,8 +121,7 @@ public static HashMap<String,Object> getResultsMap(Model mod) throws RestExcepti
count.put("status",status);
count.put("langScript",langScript);
res.put("metadata",count);
res.put("works",works);
res.put("literaryProd",litprod);
res.put("works",works);
res.put("persons",people);
res.put("places",places);
return res;
Expand Down

0 comments on commit 43646b2

Please sign in to comment.