}
}
+ JSONObject paeDict = parseJSONtoPAEContactMatrix(pae_input);
+ if (paeDict == null)
+ {
+ Console.debug("JSON file did not parse properly.");
+ return false;
+ }
+ ContactMatrixI matrix = new PAEContactMatrix(sequence,
+ (Map<String, Object>) paeDict);
+
+ AlignmentAnnotation cmannot = sequence.addContactList(matrix);
+ pdbAlignment.addAnnotation(cmannot);
+
+ return true;
+ }
+
+ public static JSONObject parseJSONtoPAEContactMatrix(
- InputStream pae_input) throws IOException,ParseException
++ InputStream pae_input) throws IOException, ParseException
+ {
Object paeJson = Platform.parseJSON(pae_input);
- JSONObject paeDict=null;
+ JSONObject paeDict = null;
if (paeJson instanceof JSONObject)
{
- Console.debug("***** paeJson is a JSONObject");
paeDict = (JSONObject) paeJson;
}
else if (paeJson instanceof JSONArray)