VIVO-1319 Remove dependency on sourceforge.net JSON parser. (#53)
* VIVO-1247, remove duplicate code used with ConfigurationBeanLoader. Now that the @Property annotation includes cardinality parameters, we can remove a lot of duplicate code. * Use Jackson JSON library instead of net.sf.json JSONNode, JSONArray, JSONObject become JsonNode, ArrayNode, and ObjectNode. No direct replacement for HSONSerializer, so create JacksonUtils Some of the message signatures are different, so adjust accordingly.
This commit is contained in:
parent
5c69f1081f
commit
668ab0c10d
7 changed files with 71 additions and 86 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,8 +1,4 @@
|
|||
/.build/
|
||||
/.classpath
|
||||
/.project
|
||||
/.settings
|
||||
/bin/
|
||||
/deploy.properties
|
||||
/build.properties
|
||||
/runtime.properties
|
||||
|
@ -22,3 +18,4 @@ utilities/rdbmigration/.work
|
|||
**/.settings
|
||||
**/.classpath
|
||||
**/.project
|
||||
**/bin/
|
||||
|
|
|
@ -6,36 +6,21 @@ import java.io.BufferedReader;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.StringWriter;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.rpc.ServiceException;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import net.sf.json.JSONSerializer;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.w3c.dom.Attr;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import org.apache.jena.query.Query;
|
||||
import org.apache.jena.query.QueryExecution;
|
||||
import org.apache.jena.query.QueryExecutionFactory;
|
||||
|
@ -45,11 +30,21 @@ import org.apache.jena.query.ResultSet;
|
|||
import org.apache.jena.rdf.model.Literal;
|
||||
import org.apache.jena.rdf.model.RDFNode;
|
||||
import org.apache.jena.rdf.model.Resource;
|
||||
import org.w3c.dom.Attr;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
|
||||
import edu.cornell.mannlib.semservices.bo.Concept;
|
||||
import edu.cornell.mannlib.semservices.service.ExternalConceptService;
|
||||
import edu.cornell.mannlib.semservices.util.SKOSUtils;
|
||||
import edu.cornell.mannlib.semservices.util.XMLUtils;
|
||||
import edu.cornell.mannlib.vitro.webapp.utils.json.JacksonUtils;
|
||||
import edu.cornell.mannlib.vitro.webapp.web.URLEncoder;
|
||||
|
||||
public class AgrovocService implements ExternalConceptService {
|
||||
|
@ -398,16 +393,16 @@ public class AgrovocService implements ExternalConceptService {
|
|||
//JSON-LD array
|
||||
private List<String> getConceptURIsListFromSkosMosResult(String results) {
|
||||
List<String> conceptURIs = new ArrayList<String>();
|
||||
JSONObject json = (JSONObject) JSONSerializer.toJSON(results);
|
||||
ObjectNode json = (ObjectNode) JacksonUtils.parseJson(results);
|
||||
//Format should be: { ..."results":["uri":uri...]
|
||||
if (json.containsKey("results")) {
|
||||
JSONArray jsonArray = json.getJSONArray("results");
|
||||
if (json.has("results")) {
|
||||
ArrayNode jsonArray = (ArrayNode) json.get("results");
|
||||
int numberResults = jsonArray.size();
|
||||
int i;
|
||||
for(i = 0; i < numberResults; i++) {
|
||||
JSONObject jsonObject = jsonArray.getJSONObject(i);
|
||||
if(jsonObject.containsKey("uri")) {
|
||||
conceptURIs.add(jsonObject.getString("uri"));
|
||||
ObjectNode jsonObject = (ObjectNode) jsonArray.get(i);
|
||||
if(jsonObject.has("uri")) {
|
||||
conceptURIs.add(jsonObject.get("uri").asText());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,16 +11,16 @@ import java.net.URLEncoder;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import net.sf.json.JSONSerializer;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
|
||||
import edu.cornell.mannlib.semservices.bo.Concept;
|
||||
import edu.cornell.mannlib.semservices.exceptions.ConceptsNotFoundException;
|
||||
import edu.cornell.mannlib.semservices.service.ExternalConceptService;
|
||||
import edu.cornell.mannlib.vitro.webapp.utils.json.JacksonUtils;
|
||||
|
||||
public class GemetService implements ExternalConceptService {
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
@ -82,7 +82,7 @@ public class GemetService implements ExternalConceptService {
|
|||
List<Concept> conceptList = new ArrayList<Concept>();
|
||||
|
||||
try {
|
||||
JSONArray jsonArray = (JSONArray) JSONSerializer.toJSON( results );
|
||||
ArrayNode jsonArray = (ArrayNode) JacksonUtils.parseJson(results);
|
||||
if (jsonArray.size() == 0) {
|
||||
throw new ConceptsNotFoundException();
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ public class GemetService implements ExternalConceptService {
|
|||
Concept concept = new Concept();
|
||||
concept.setDefinedBy(schemeURI);
|
||||
concept.setBestMatch("true");
|
||||
JSONObject json = jsonArray.getJSONObject(i);
|
||||
ObjectNode json = (ObjectNode) jsonArray.get(i);
|
||||
String uri = getJsonValue(json, "uri");
|
||||
|
||||
concept.setUri(uri);
|
||||
|
@ -99,15 +99,14 @@ public class GemetService implements ExternalConceptService {
|
|||
concept.setSchemeURI(schemeURI);
|
||||
concept.setType("");
|
||||
if (json.has("preferredLabel")) {
|
||||
JSONObject preferredLabelObj = json
|
||||
.getJSONObject("preferredLabel");
|
||||
ObjectNode preferredLabelObj = (ObjectNode) json.get("preferredLabel");
|
||||
if (preferredLabelObj.has("string")) {
|
||||
concept.setLabel(getJsonValue(preferredLabelObj,
|
||||
"string"));
|
||||
}
|
||||
}
|
||||
if (json.has("definition")) {
|
||||
JSONObject definitionObj = json.getJSONObject("definition");
|
||||
ObjectNode definitionObj = (ObjectNode) json.get("definition");
|
||||
if (definitionObj.has("string")) {
|
||||
concept.setDefinition(getJsonValue(definitionObj,
|
||||
"string"));
|
||||
|
@ -147,9 +146,9 @@ public class GemetService implements ExternalConceptService {
|
|||
* @param obj JSON Object
|
||||
* @param key Key to retrieve
|
||||
*/
|
||||
protected String getJsonValue(JSONObject obj, String key) {
|
||||
protected String getJsonValue(ObjectNode obj, String key) {
|
||||
if (obj.has(key)) {
|
||||
return obj.getString(key);
|
||||
return obj.get(key).asText();
|
||||
} else {
|
||||
return new String("");
|
||||
}
|
||||
|
@ -312,12 +311,12 @@ public class GemetService implements ExternalConceptService {
|
|||
protected List<String> getRelatedUris(String json) {
|
||||
List<String> uriList = new ArrayList<String>();
|
||||
String uri = new String();
|
||||
JSONArray jsonArray = (JSONArray) JSONSerializer.toJSON( json );
|
||||
ArrayNode jsonArray = (ArrayNode) JacksonUtils.parseJson(json);
|
||||
if (jsonArray.size() == 0) {
|
||||
return new ArrayList<String>();
|
||||
}
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject jsonObj = jsonArray.getJSONObject(i);
|
||||
ObjectNode jsonObj = (ObjectNode) jsonArray.get(i);
|
||||
uri = getJsonValue(jsonObj, "uri");
|
||||
uriList.add(uri);
|
||||
}
|
||||
|
@ -328,13 +327,12 @@ public class GemetService implements ExternalConceptService {
|
|||
|
||||
protected List<String> getPropertyFromJson(String json) {
|
||||
List<String> props = new ArrayList<String>();
|
||||
JSONArray jsonArray = (JSONArray) JSONSerializer.toJSON(json);
|
||||
ArrayNode jsonArray = (ArrayNode) JacksonUtils.parseJson(json);
|
||||
if (jsonArray.size() == 0) {
|
||||
return new ArrayList<String>();
|
||||
}
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject jsonObj = jsonArray.getJSONObject(i);
|
||||
System.out.println(jsonObj.toString());
|
||||
System.out.println((jsonArray.get(i)).toString());
|
||||
}
|
||||
return props;
|
||||
}
|
||||
|
|
|
@ -6,8 +6,6 @@ import java.io.BufferedReader;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.StringWriter;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
|
@ -15,9 +13,6 @@ import java.util.List;
|
|||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
import net.sf.json.JSONSerializer;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
@ -28,10 +23,13 @@ import org.w3c.dom.Node;
|
|||
import org.w3c.dom.NodeList;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
|
||||
import edu.cornell.mannlib.semservices.bo.Concept;
|
||||
import edu.cornell.mannlib.semservices.service.ExternalConceptService;
|
||||
import edu.cornell.mannlib.semservices.util.SKOSUtils;
|
||||
import edu.cornell.mannlib.semservices.util.XMLUtils;
|
||||
import edu.cornell.mannlib.vitro.webapp.utils.json.JacksonUtils;
|
||||
|
||||
public class LCSHService implements ExternalConceptService {
|
||||
|
||||
|
@ -164,7 +162,7 @@ public class LCSHService implements ExternalConceptService {
|
|||
public List<String> getConceptURISFromJSON(String results) {
|
||||
List<String> uris = new ArrayList<String>();
|
||||
try {
|
||||
JSONObject json = (JSONObject) JSONSerializer.toJSON(results);
|
||||
ObjectNode json = (ObjectNode) JacksonUtils.parseJson(results);
|
||||
log.debug(json.toString());
|
||||
// Get atom entry elements
|
||||
|
||||
|
|
|
@ -10,16 +10,16 @@ import java.net.URLEncoder;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import net.sf.json.JSONSerializer;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
|
||||
import edu.cornell.mannlib.semservices.bo.Concept;
|
||||
import edu.cornell.mannlib.semservices.exceptions.ConceptsNotFoundException;
|
||||
import edu.cornell.mannlib.semservices.service.ExternalConceptService;
|
||||
import edu.cornell.mannlib.vitro.webapp.utils.json.JacksonUtils;
|
||||
|
||||
/**
|
||||
* @author jaf30
|
||||
|
@ -118,20 +118,20 @@ public class UMLSService implements ExternalConceptService {
|
|||
boolean allFound = false;
|
||||
|
||||
try {
|
||||
JSONObject json = (JSONObject) JSONSerializer.toJSON( results );
|
||||
ObjectNode json = (ObjectNode) JacksonUtils.parseJson(results);
|
||||
//System.out.println(json.toString());
|
||||
if (json.has("Best Match")) {
|
||||
bestMatchFound = true;
|
||||
//System.out.println("Best Match");
|
||||
|
||||
JSONArray bestMatchArray = json.getJSONArray("Best Match");
|
||||
ArrayNode bestMatchArray = (ArrayNode) json.get("Best Match");
|
||||
int len = bestMatchArray.size();
|
||||
if (len > 1) {
|
||||
logger.debug("Found this many best matches: "+ len);
|
||||
}
|
||||
int i;
|
||||
for (i = 0; i < len; i++) {
|
||||
JSONObject o = bestMatchArray.getJSONObject(i);
|
||||
ObjectNode o = (ObjectNode) bestMatchArray.get(i);
|
||||
//System.out.println(o.toString());
|
||||
Concept concept = new Concept();
|
||||
concept.setDefinedBy(schemeURI);
|
||||
|
@ -150,12 +150,12 @@ public class UMLSService implements ExternalConceptService {
|
|||
}
|
||||
if (json.has("All")) {
|
||||
allFound = true;
|
||||
JSONArray allArray = json.getJSONArray("All");
|
||||
ArrayNode allArray = (ArrayNode) json.get("All");
|
||||
int len = allArray.size();
|
||||
//System.out.println("size of best match array: "+ len);
|
||||
int i;
|
||||
for (i = 0; i < len; i++) {
|
||||
JSONObject o = allArray.getJSONObject(i);
|
||||
ObjectNode o = (ObjectNode) allArray.get(i);
|
||||
//System.out.println(o.toString());
|
||||
Concept concept = new Concept();
|
||||
concept.setDefinedBy(schemeURI);
|
||||
|
@ -194,9 +194,9 @@ public class UMLSService implements ExternalConceptService {
|
|||
* @param obj JSON Object
|
||||
* @param key Key to retrieve
|
||||
*/
|
||||
protected String getJsonValue(JSONObject obj, String key) {
|
||||
protected String getJsonValue(ObjectNode obj, String key) {
|
||||
if (obj.has(key)) {
|
||||
return obj.getString(key);
|
||||
return obj.get(key).asText();
|
||||
} else {
|
||||
return new String("");
|
||||
}
|
||||
|
|
|
@ -8,14 +8,9 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sf.json.JSON;
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONSerializer;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.apache.jena.ontology.OntModel;
|
||||
import org.apache.jena.query.Query;
|
||||
import org.apache.jena.query.QueryExecution;
|
||||
|
@ -30,6 +25,9 @@ import org.apache.jena.vocabulary.RDF;
|
|||
import org.apache.jena.vocabulary.RDFS;
|
||||
import org.apache.jena.vocabulary.XSD;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.BaseEditSubmissionPreprocessorVTwo;
|
||||
|
@ -38,6 +36,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTw
|
|||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.MultiValueEditSubmission;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
|
||||
import edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess;
|
||||
import edu.cornell.mannlib.vitro.webapp.utils.json.JacksonUtils;
|
||||
|
||||
public class AddAssociatedConceptsPreprocessor extends
|
||||
BaseEditSubmissionPreprocessorVTwo {
|
||||
|
@ -174,10 +173,10 @@ public class AddAssociatedConceptsPreprocessor extends
|
|||
if(uris.size() > 0) {
|
||||
String jsonString = uris.get(0);
|
||||
if(jsonString != null && !jsonString.isEmpty()) {
|
||||
JSON json = JSONSerializer.toJSON(jsonString);
|
||||
JsonNode json = JacksonUtils.parseJson(jsonString);
|
||||
//This should be an array
|
||||
if(json.isArray()) {
|
||||
JSONArray jsonArray = (JSONArray) JSONSerializer.toJSON(jsonString);
|
||||
ArrayNode jsonArray = (ArrayNode) JacksonUtils.parseJson(jsonString);
|
||||
//Convert to list of strings
|
||||
return convertJsonArrayToList(jsonArray);
|
||||
}
|
||||
|
@ -186,12 +185,12 @@ public class AddAssociatedConceptsPreprocessor extends
|
|||
return uris;
|
||||
}
|
||||
|
||||
private List<String> convertJsonArrayToList(JSONArray jsonArray) {
|
||||
private List<String> convertJsonArrayToList(ArrayNode jsonArray) {
|
||||
List<String> stringList = new ArrayList<String>();
|
||||
int len = jsonArray.size();
|
||||
int i = 0;
|
||||
for(i = 0; i < len; i++) {
|
||||
stringList.add(jsonArray.getString(i));
|
||||
stringList.add(jsonArray.get(i).asText());
|
||||
}
|
||||
return stringList;
|
||||
}
|
||||
|
|
|
@ -2,16 +2,14 @@
|
|||
|
||||
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.apache.jena.ontology.OntModel;
|
||||
import org.apache.jena.query.Query;
|
||||
import org.apache.jena.query.QueryExecution;
|
||||
|
@ -23,13 +21,13 @@ import org.apache.jena.rdf.model.Literal;
|
|||
import org.apache.jena.rdf.model.Resource;
|
||||
import org.apache.jena.rdf.model.ResourceFactory;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import net.sf.json.JSONSerializer;
|
||||
//Returns the appropriate n3 for selection of classes from within class group
|
||||
public class ProcessInternalClassDataGetterN3 extends ProcessIndividualsForClassesDataGetterN3 {
|
||||
private static String classType = "java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.InternalClassesDataGetter";
|
||||
|
@ -167,11 +165,11 @@ public class ProcessInternalClassDataGetterN3 extends ProcessIndividualsForClas
|
|||
}
|
||||
|
||||
|
||||
public JSONObject getExistingValuesJSON(String dataGetterURI, OntModel queryModel, ServletContext context) {
|
||||
JSONObject jObject = new JSONObject();
|
||||
jObject.element("dataGetterClass", classType);
|
||||
public ObjectNode getExistingValuesJSON(String dataGetterURI, OntModel queryModel, ServletContext context) {
|
||||
ObjectNode jObject = new ObjectMapper().createObjectNode();
|
||||
jObject.put("dataGetterClass", classType);
|
||||
//Update to include class type as variable
|
||||
jObject.element(classTypeVarBase, classType);
|
||||
jObject.put(classTypeVarBase, classType);
|
||||
//Get selected class group, if internal class, and classes selected from class group
|
||||
getExistingClassGroupAndInternalClass(dataGetterURI, jObject, queryModel);
|
||||
//Get all classes in the class group
|
||||
|
@ -179,7 +177,7 @@ public class ProcessInternalClassDataGetterN3 extends ProcessIndividualsForClas
|
|||
return jObject;
|
||||
}
|
||||
|
||||
private void getExistingClassGroupAndInternalClass(String dataGetterURI, JSONObject jObject, OntModel queryModel) {
|
||||
private void getExistingClassGroupAndInternalClass(String dataGetterURI, ObjectNode jObject, OntModel queryModel) {
|
||||
String querystr = getExistingValuesInternalClass(dataGetterURI);
|
||||
QueryExecution qe = null;
|
||||
Literal internalClassLiteral = null;
|
||||
|
@ -187,7 +185,7 @@ public class ProcessInternalClassDataGetterN3 extends ProcessIndividualsForClas
|
|||
Query query = QueryFactory.create(querystr);
|
||||
qe = QueryExecutionFactory.create(query, queryModel);
|
||||
ResultSet results = qe.execSelect();
|
||||
JSONArray individualsForClasses = new JSONArray();
|
||||
ArrayNode individualsForClasses = new ObjectMapper().createArrayNode();
|
||||
String classGroupURI = null;
|
||||
while( results.hasNext()){
|
||||
QuerySolution qs = results.nextSolution();
|
||||
|
@ -208,14 +206,14 @@ public class ProcessInternalClassDataGetterN3 extends ProcessIndividualsForClas
|
|||
}
|
||||
|
||||
|
||||
jObject.element("classGroup", classGroupURI);
|
||||
jObject.put("classGroup", classGroupURI);
|
||||
//this is a json array
|
||||
jObject.element(individualClassVarNameBase, individualsForClasses);
|
||||
jObject.set(individualClassVarNameBase, individualsForClasses);
|
||||
//Internal class - if null then add false otherwise use the value
|
||||
if(internalClassLiteral != null) {
|
||||
jObject.element(internalClassVarNameBase, internalClassLiteral.getString());
|
||||
jObject.put(internalClassVarNameBase, internalClassLiteral.getString());
|
||||
} else {
|
||||
jObject.element(internalClassVarNameBase, "false");
|
||||
jObject.put(internalClassVarNameBase, "false");
|
||||
}
|
||||
} catch(Exception ex) {
|
||||
log.error("Exception occurred in retrieving existing values with query " + querystr, ex);
|
||||
|
|
Loading…
Add table
Reference in a new issue