} else { Instance instance = (Instance) dicValue.eContainer().eContainer(); DictionaryAttribute dicAtt = instance.getTypeDefinition().getDictionaryType().findAttributesByID(dicValue.getName()); if (dicAtt.getDefaultValue() != null && !dicAtt.getDefaultValue().equals("")) { valueToInject = dicAtt.getDefaultValue();
if (currentTypeDefinition.getDictionaryType() == null) { currentTypeDefinition.setDictionaryType(factory.createDictionaryType().withGenerated_KMF_ID("0.0")); dicAtt.setFragmentDependant(false); currentTypeDefinition.getDictionaryType().setGenerated_KMF_ID("0.0"); currentTypeDefinition.getDictionaryType().addAttributes(dicAtt);
if (currentTypeDefinition.getDictionaryType() == null) { currentTypeDefinition.setDictionaryType(factory.createDictionaryType().withGenerated_KMF_ID("0.0")); dicAtt.setFragmentDependant(false); currentTypeDefinition.getDictionaryType().addAttributes(dicAtt);
at.addRule(); at.addRow("Param", "DataType", "Default value", "Optional?", "Fragmented?"); DictionaryType dic = tdef.getDictionaryType(); for (DictionaryAttribute attr : dic.getAttributes()) { at.addRule();
@NotNull @Override public void injectDictionary(Instance instance, Object target, boolean defaultOnly) { if (instance.getTypeDefinition() == null || instance.getTypeDefinition().getDictionaryType() == null) { return; for (DictionaryAttribute att : instance.getTypeDefinition().getDictionaryType().getAttributes()) { String defValue = null; String value = null;
if (dicValue == null) { dicValue = factory.createValue(); if (target.getTypeDefinition().getDictionaryType() != null) { final DictionaryAttribute dicAtt = target.getTypeDefinition().getDictionaryType() .findAttributesByID(propName); if (dicAtt == null) { if (dicValue == null) { dicValue = factory.createValue(); if (target.getTypeDefinition().getDictionaryType() != null) { final DictionaryAttribute dicAtt = target.getTypeDefinition().getDictionaryType() .findAttributesByID(propName); if (dicAtt == null) {
if (dicValue == null) { dicValue = factory.createValue(); if (target.getTypeDefinition().getDictionaryType() != null) { final DictionaryAttribute dicAtt = target.getTypeDefinition().getDictionaryType() .findAttributesByID(propName); if (dicAtt == null) { if (dicValue == null) { dicValue = factory.createValue(); if (target.getTypeDefinition().getDictionaryType() != null) { final DictionaryAttribute dicAtt = target.getTypeDefinition().getDictionaryType() .findAttributesByID(propName); if (dicAtt == null) {
private void debug(Value value) { Instance instance = (Instance) value.eContainer().eContainer(); DictionaryAttribute attr = instance.getTypeDefinition().getDictionaryType().findAttributesByID(value.getName()); if (attr.getFragmentDependant()) { Log.debug("Update param for {}.{}/{} = '{}'", instance.getName(), value.getName(), ((NamedElement) value.eContainer()).getName(), value.getValue()); } else { Log.debug("Update param for {}.{} = '{}'", instance.getName(), value.getName(), value.getValue()); } }
ClassLoader classLoader = runtime.installTypeDefinition(node); NodeType nodeObject = (NodeType) runtime.createInstance(node, classLoader); if (node.getTypeDefinition().getDictionaryType() != null) { for (DictionaryAttribute attr : node.getTypeDefinition().getDictionaryType().getAttributes()) { if (!attr.getFragmentDependant()) { ContainerNode currentNode = currentModel.findNodesByID(nodeName);
private static void apply(ContainerNode node, Group group) { group.addSubNodes(node); node.addGroups(group); DictionaryType dictionaryType = group.getTypeDefinition().getDictionaryType(); if (dictionaryType != null) { DefaultKevoreeFactory factory = new DefaultKevoreeFactory(); FragmentDictionary fDic = factory.createFragmentDictionary(); fDic.setName(node.getName()); for (DictionaryAttribute attr : dictionaryType.getAttributes()) { if (attr.getFragmentDependant()) { Value value = factory.createValue(); value.setName(attr.getName()); value.setValue(attr.getDefaultValue()); fDic.addValues(value); } } group.addFragmentDictionary(fDic); } } }
private static void apply(ContainerNode node, Group group) { group.addSubNodes(node); node.addGroups(group); DictionaryType dictionaryType = group.getTypeDefinition().getDictionaryType(); if (dictionaryType != null) { DefaultKevoreeFactory factory = new DefaultKevoreeFactory(); FragmentDictionary fDic = factory.createFragmentDictionary(); fDic.setName(node.getName()); for (DictionaryAttribute attr : dictionaryType.getAttributes()) { if (attr.getFragmentDependant()) { Value value = factory.createValue(); value.setName(attr.getName()); value.setValue(attr.getDefaultValue()); fDic.addValues(value); } } group.addFragmentDictionary(fDic); } } }
KMFContainer previousInstance = previousModel.findByPath(c.path()); if (previousInstance != null) { DictionaryType dt = instance.getTypeDefinition().getDictionaryType(); DictionaryAttribute dicAtt = dt.findAttributesByID(dicValue.getName()); if (dicAtt != null && dicAtt.getDefaultValue() != null
i.setStarted(true); Dictionary dictionary = factory.createDictionary().withGenerated_KMF_ID("0.0"); DictionaryType dictionaryType = i.getTypeDefinition().getDictionaryType(); if (dictionaryType != null) { for (DictionaryAttribute attr : dictionaryType.getAttributes()) {
i.setStarted(true); Dictionary dictionary = factory.createDictionary().withGenerated_KMF_ID("0.0"); DictionaryType dictionaryType = i.getTypeDefinition().getDictionaryType(); if (dictionaryType != null) { for (DictionaryAttribute attr : dictionaryType.getAttributes()) {