public JSONObject getJSONArrayRepresentation() throws JSONException { JSONObject typeObj = new JSONObject(); typeObj.put(ClientJsonKeys.FullType.name(), type.getUri()); if(isClass()) typeObj.put(ClientJsonKeys.DomainUri.name(), ""); else typeObj.put(ClientJsonKeys.DomainUri.name(), domain.getUri()); return typeObj; }
edu.isi.karma.rep.alignment.Node n = alignment.getNodeById(columnUri); semanticType.put(ClientJsonKeys.isPrimary.name(), "true"); Set<edu.isi.karma.rep.alignment.Node> oldNodes = new HashSet<>(); if(resultClass.get(i).trim().isEmpty()) semanticType.put(ClientJsonKeys.DomainId.name(), n.getId()); semanticType.put(ClientJsonKeys.FullType.name(), resultPredicates.get(i)); semanticType.put(ClientJsonKeys.DomainUri.name(), n.getUri()); semanticType.put(ClientJsonKeys.DomainId.name(), resultClass.get(i)); semanticType.put(ClientJsonKeys.FullType.name(), Uris.CLASS_INSTANCE_LINK_URI);
for (int j = typesArr.length()-1; j >=0; j--) { JSONObject type = typesArr.getJSONObject(j); String typeKey = type.getString(ClientJsonKeys.FullType.name()) + "-" + type.getString(ClientJsonKeys.DomainId.name()); if(!typesSet.contains(typeKey)) { typesSet.add(typeKey); JSONObject type = typesArr.getJSONObject(i); boolean isProvenance = false; if(type.has(ClientJsonKeys.isProvenance.name())) isProvenance = type.getBoolean(ClientJsonKeys.isProvenance.name()); String[] names = (String[]) type.keySet().toArray(new String[0]); JSONObject newType = new JSONObject(type, names); newType.put(ClientJsonKeys.DomainId.name(), internalNode.getId()); newType.put(ClientJsonKeys.DomainUri.name(), internalNode.getLabel().getUri()); String newTypeStr = newType.getString(ClientJsonKeys.FullType.name()) + "-" + newType.getString(ClientJsonKeys.DomainId.name()); if(!typesSet.contains(newTypeStr)) { typesSet.add(newTypeStr); if(type.has(ClientJsonKeys.DomainId.name())) sourceId = type.getString(ClientJsonKeys.DomainId.name()); if(type.has(ClientJsonKeys.FullType.name())) edgeUri = type.getString(ClientJsonKeys.FullType.name()); if(type.has(ClientJsonKeys.isProvenance.name())) isProvenance = type.getBoolean(ClientJsonKeys.isProvenance.name()); if(type.has(ClientJsonKeys.DomainUri.name()))