updates for page management
This commit is contained in:
parent
4c26c2c7fc
commit
cd8daf7f55
3 changed files with 20 additions and 12 deletions
|
@ -509,7 +509,7 @@ public class EditConfigurationVTwo {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addUrisOnForm(String ... strs){
|
public void addUrisOnForm(String ... strs){
|
||||||
this.urisOnform.addAll(Arrays.asList( strs ));
|
this.urisOnform.addAll(new ArrayList<String>(Arrays.asList( strs )));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -557,6 +557,8 @@ public class EditConfigurationVTwo {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Map<String, List<Literal>> getLiteralsInScope() {
|
public Map<String, List<Literal>> getLiteralsInScope() {
|
||||||
return literalsInScope;
|
return literalsInScope;
|
||||||
}
|
}
|
||||||
|
@ -967,7 +969,9 @@ public class EditConfigurationVTwo {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isUpdate(){
|
public boolean isUpdate(){
|
||||||
return isObjectPropertyUpdate() || isDataPropertyUpdate();
|
//return isObjectPropertyUpdate() || isDataPropertyUpdate();
|
||||||
|
//TODO: Change back if this doesn't work
|
||||||
|
return isObjectPropertyUpdate() || isDataPropertyUpdate() || isParamUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isObjectPropertyUpdate(){
|
public boolean isObjectPropertyUpdate(){
|
||||||
|
@ -978,6 +982,15 @@ public class EditConfigurationVTwo {
|
||||||
return this.getDatapropKey() != null ;
|
return this.getDatapropKey() != null ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//*****TEST Method***Remove if doesn't work******//
|
||||||
|
public boolean isParamUpdate = false;
|
||||||
|
public void setParamUpdate (boolean inputParamUpdate) {
|
||||||
|
this.isParamUpdate = inputParamUpdate;
|
||||||
|
}
|
||||||
|
public boolean isParamUpdate() {
|
||||||
|
return this.isParamUpdate;
|
||||||
|
}
|
||||||
|
|
||||||
//TODO: can we rename this to match the name "pageData" that is used on the templates for this?
|
//TODO: can we rename this to match the name "pageData" that is used on the templates for this?
|
||||||
//How about we change pageData to something else since page is in the name of just about everything related
|
//How about we change pageData to something else since page is in the name of just about everything related
|
||||||
//to templates.
|
//to templates.
|
||||||
|
|
|
@ -150,6 +150,10 @@ public class ManagePagePreprocessor extends
|
||||||
} else if(jsonValue instanceof JSONArray) {
|
} else if(jsonValue instanceof JSONArray) {
|
||||||
JSONArray values = jsonObject.getJSONArray(literalLabel);
|
JSONArray values = jsonObject.getJSONArray(literalLabel);
|
||||||
literalValues = (List<String>) JSONSerializer.toJava(values);
|
literalValues = (List<String>) JSONSerializer.toJava(values);
|
||||||
|
} else if(jsonValue instanceof Boolean) {
|
||||||
|
Boolean booleanValue = jsonObject.getBoolean(literalLabel);
|
||||||
|
//Adds string version
|
||||||
|
literalValues.add(booleanValue.toString());
|
||||||
}
|
}
|
||||||
String[] literalValuesSubmission = new String[literalValues.size()];
|
String[] literalValuesSubmission = new String[literalValues.size()];
|
||||||
literalValuesSubmission = literalValues.toArray(literalValuesSubmission);
|
literalValuesSubmission = literalValues.toArray(literalValuesSubmission);
|
||||||
|
|
|
@ -28,18 +28,9 @@ import edu.cornell.mannlib.vitro.webapp.utils.dataGetter.DataGetter;
|
||||||
*/
|
*/
|
||||||
public class ProcessDataGetterN3Utils {
|
public class ProcessDataGetterN3Utils {
|
||||||
private static final Log log = LogFactory.getLog(ProcessDataGetterN3Utils.class);
|
private static final Log log = LogFactory.getLog(ProcessDataGetterN3Utils.class);
|
||||||
public static HashMap<String, String> getDataGetterTypeToProcessorMap() {
|
|
||||||
HashMap<String, String> map = new HashMap<String, String>();
|
|
||||||
map.put("edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter", "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessSparqlDataGetterN3");
|
|
||||||
map.put("edu.cornell.mannlib.vitro.webapp.utils.dataGetter.ClassGroupPageData", "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessClassGroupDataGetterN3");
|
|
||||||
map.put("edu.cornell.mannlib.vitro.webapp.utils.dataGetter.IndividualsForClassesDataGetter", "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessIndividualsForClassesDataGetterN3");
|
|
||||||
map.put("edu.cornell.mannlib.vitro.webapp.utils.dataGetter.FixedHTMLDataGetter", "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessFixedHTMLN3");
|
|
||||||
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ProcessDataGetterN3 getDataGetterProcessorN3(String dataGetterClass, JSONObject jsonObject) {
|
public static ProcessDataGetterN3 getDataGetterProcessorN3(String dataGetterClass, JSONObject jsonObject) {
|
||||||
HashMap<String, String> map = getDataGetterTypeToProcessorMap();
|
HashMap<String, String> map = ProcessDataGetterN3Map.getDataGetterTypeToProcessorMap();
|
||||||
//
|
//
|
||||||
if(map.containsKey(dataGetterClass)) {
|
if(map.containsKey(dataGetterClass)) {
|
||||||
String processorClass = map.get(dataGetterClass);
|
String processorClass = map.get(dataGetterClass);
|
||||||
|
|
Loading…
Add table
Reference in a new issue