@Override public Array<?> deserialize(JsonElement elem, Type type, JsonDeserializationContext ctx) throws JsonParseException { if (elem == null) { return null; } JsonArray js = elem.getAsJsonArray(); Type elementType = (type instanceof ParameterizedType) ? ((ParameterizedType) type).getActualTypeArguments()[0] : Object.class; Array<Object> array = JSCollections.$array(); for (int i = 0; i < js.size(); ++i) { array.push(ctx.deserialize(js.get(i), elementType)); } return array; }
query = "(" + new EcAlignment().getSearchStringByType() + " AND (source:"; Array<String> noVersions = JSCollections.$array(); for (int i = 0; i < sourceIds.$length(); i++) { String sourceId = sourceIds.$get(i);
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (success != null) { Array<EcLevel> levels = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcLevel level = new EcLevel(); if (p1.$get(i).isAny(level.getTypes())) { level.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcLevel.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); if (JSObjectAdapter.$get(obj, "competency") != competencyId) { continue; } level.copyFrom(obj); EcEncryptedValue.encryptOnSave(level.id, true); } } level.copyFrom(p1.$get(i)); levels.$set(i, level); } if (success != null) success.$invoke(levels); } }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (successAll != null) { Array<EcRollupRule> rollupRules = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcRollupRule a = new EcRollupRule(); if (p1.$get(i).isA(EcRollupRule.myType)) { a.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcRollupRule.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); if (JSObjectAdapter.$get(obj, "competency") != competencyId && JSObjectAdapter.$get(obj, "competency") != shortId) { continue; } a.copyFrom(obj); EcEncryptedValue.encryptOnSave(a.id, true); } } rollupRules.$set(i, a); } if (successAll != null) successAll.$invoke(rollupRules); } }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (successAll != null) { Array<EcLevel> levels = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcLevel a = new EcLevel(); if (p1.$get(i).isA(EcLevel.myType)) { a.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcLevel.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); if (JSObjectAdapter.$get(obj, "competency") != competencyId && JSObjectAdapter.$get(obj, "competency") != shortId) { continue; } a.copyFrom(obj); EcEncryptedValue.encryptOnSave(a.id, true); } } levels.$set(i, a); } if (successAll != null) successAll.$invoke(levels); } }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (success != null) { Array<EcAlignment> ret = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcAlignment alignment = new EcAlignment(); if (p1.$get(i).isAny(alignment.getTypes())) { alignment.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcAlignment.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); if (JSObjectAdapter.$get(obj, "source") != sourceId && JSObjectAdapter.$get(obj, "source") != noVersion) { continue; } alignment.copyFrom(obj); } } ret.$set(i, alignment); } success.$invoke(ret); } }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (success != null) { Array<EcAlignment> ret = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcAlignment alignment = new EcAlignment(); if (p1.$get(i).isAny(alignment.getTypes())) { alignment.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcAlignment.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); if (JSObjectAdapter.$get(obj, "source") != competencyId && JSObjectAdapter.$get(obj, "source") != noVersion && JSObjectAdapter.$get(obj, "target") != competencyId && JSObjectAdapter.$get(obj, "target") != noVersion) { continue; } alignment.copyFrom(obj); } } ret.$set(i, alignment); } success.$invoke(ret); } }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (success != null) { Array<EcFramework> ret = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcFramework framework = new EcFramework(); if (p1.$get(i).isAny(framework.getTypes())) { framework.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcFramework.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); framework.copyFrom(obj); EcEncryptedValue.encryptOnSave(framework.id, true); } } ret.$set(i, framework); } success.$invoke(ret); } }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (success != null) { Array<EcRollupRule> ret = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcRollupRule rule = new EcRollupRule(); if (p1.$get(i).isAny(rule.getTypes())) { rule.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcRollupRule.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); rule.copyFrom(obj); EcEncryptedValue.encryptOnSave(rule.id, true); } } ret.$set(i, rule); } success.$invoke(ret); } }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (success != null) { Array<EcLevel> ret = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcLevel level = new EcLevel(); if (p1.$get(i).isAny(level.getTypes())) { level.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcLevel.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); level.copyFrom(obj); EcEncryptedValue.encryptOnSave(level.id, true); } } ret.$set(i, level); } success.$invoke(ret); } }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (success != null) { Array<EcCompetency> ret = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcCompetency comp = new EcCompetency(); if (p1.$get(i).isAny(comp.getTypes())) { comp.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcCompetency.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); comp.copyFrom(obj); EcEncryptedValue.encryptOnSave(comp.id, true); } } ret.$set(i, comp); } success.$invoke(ret); } }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (success != null) { Array<EcConcept> ret = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcConcept comp = new EcConcept(); if (p1.$get(i).isAny(comp.getTypes())) { comp.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcConcept.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); comp.copyFrom(obj); EcEncryptedValue.encryptOnSave(comp.id, true); } } ret.$set(i, comp); } success.$invoke(ret); } }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (success != null) { Array<EcFile> ret = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcFile file = new EcFile(); if (p1.$get(i).isAny(file.getTypes())) { file.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcFile.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); file.copyFrom(obj); EcEncryptedValue.encryptOnSave(file.id, true); } } ret.$set(i, file); } success.$invoke(ret); } } }, failure);
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (success != null) { Array<EcConceptScheme> ret = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcConceptScheme scheme = new EcConceptScheme(); if (p1.$get(i).isAny(scheme.getTypes())) { scheme.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcConceptScheme.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); scheme.copyFrom(obj); EcEncryptedValue.encryptOnSave(scheme.id, true); } } ret.$set(i, scheme); } success.$invoke(ret); } }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (success != null) { Array<EcAlignment> ret = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcAlignment alignment = new EcAlignment(); if (p1.$get(i).isAny(alignment.getTypes())) { alignment.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcAlignment.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); alignment.copyFrom(obj); } } ret.$set(i, alignment); } success.$invoke(ret); } }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (success != null) { Array<EcAlignment> ret = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcAlignment alignment = new EcAlignment(); if (p1.$get(i).isAny(alignment.getTypes())) { alignment.copyFrom(p1.$get(i)); } else if (p1.$get(i).isA(EcEncryptedValue.myType)) { EcEncryptedValue val = new EcEncryptedValue(); val.copyFrom(p1.$get(i)); if (val.isAnEncrypted(EcAlignment.myType)) { EcRemoteLinkedData obj = val.decryptIntoObject(); if (sourceIds.indexOf((String) JSObjectAdapter.$get(obj, "source")) == -1 && finalNoVersions.indexOf((String) JSObjectAdapter.$get(obj, "source")) == -1) { continue; } alignment.copyFrom(obj); } } ret.$set(i, alignment); } success.$invoke(ret); } }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (successAll != null) { Array<EcAlignment> rels = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcAlignment a = new EcAlignment(); a.copyFrom(p1.$get(i)); rels.$set(i, a); } if (successAll != null) successAll.$invoke(rels); } }
@Template("properties") public static <T> Array<T> $castArray(T[] a) { return $array(a); }
@Override public Array<Object> deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { Array<Object> result = JSCollections.$array(); return deserialize(jp, ctxt, result); }
@Override public void $invoke(Array<EcRemoteLinkedData> p1) { if (success != null) { Array<EcAssertion> ret = JSCollections.$array(); for (int i = 0; i < p1.$length(); i++) { EcAssertion assertion = new EcAssertion(); assertion.copyFrom(p1.$get(i)); ret.$set(i, assertion); } success.$invoke(ret); } }