public String toXmlString() { StringBuilder sb = new StringBuilder(); sb.append("<StepBrother "); sb.append("classUuid=\"Structures.uml@_qIwuMIlZEeKhILqZBrW9Hg\" "); sb.append("className=\"org.opaeum.test.StepBrother\" "); sb.append("uid=\"" + this.getUid() + "\" "); if (getName() != null) { sb.append("name=\"" + ModelFormatter.getInstance().formatString(getName()) + "\" "); } sb.append(">"); sb.append("\n<siblingStepSibling_stepSibling propertyId=\"844736339179565915\">"); for (SiblingStepSibling siblingStepSibling_stepSibling : getSiblingStepSibling_stepSibling()) { sb.append("\n" + siblingStepSibling_stepSibling.toXmlString()); } sb.append("\n</siblingStepSibling_stepSibling>"); if (getMotherStepChildren_stepMother() == null) { sb.append("\n<motherStepChildren_stepMother/>"); } else { sb.append("\n<motherStepChildren_stepMother propertyId=\"2474112361200246321\">"); sb.append("\n" + getMotherStepChildren_stepMother().toXmlString()); sb.append("\n</motherStepChildren_stepMother>"); } sb.append("\n</StepBrother>"); return sb.toString(); }
public void markDeleted() { if (getFamily() != null) { FamilyStepChild link = getFamilyStepChild_family(); link.getFamily().z_internalRemoveFromFamilyStepChild_stepChild(this.getName(), link); link.markDeleted(); } for (SiblingStepSibling link : new HashSet<SiblingStepSibling>(getSiblingStepSibling_stepSibling())) { link.getStepSibling().z_internalRemoveFromSiblingStepSibling_stepSibling(link); } if (getStepMother() != null) { MotherStepChildren link = getMotherStepChildren_stepMother(); link.getStepMother().z_internalRemoveFromMotherStepChildren_stepChild(link); link.markDeleted(); } if (getFamilyStepChild_family() != null) { getFamilyStepChild_family().markDeleted(); } for (SiblingStepSibling child : new ArrayList<SiblingStepSibling>(getSiblingStepSibling_stepSibling())) { child.markDeleted(); } if (getMotherStepChildren_stepMother() != null) { getMotherStepChildren_stepMother().markDeleted(); } }
public SiblingStepSibling getSiblingStepSibling_stepSiblingFor(Child match) { for (SiblingStepSibling var : getSiblingStepSibling_stepSibling()) { if (var.getStepSibling().equals(match)) { return var; } } return null; }
public void removeFromStepSibling(Child stepSibling) { if (stepSibling != null) { SiblingStepSibling oldLink = getSiblingStepSibling_stepSiblingFor(stepSibling); if (oldLink != null) { stepSibling.z_internalRemoveFromSiblingStepSibling_stepSibling(oldLink); oldLink.clear(); z_internalRemoveFromSiblingStepSibling_stepSibling(oldLink); } } }
@PropertyMetaInfo( constraints = {}, isComposite = false, opaeumId = 4467716398320891669l, opposite = "stepSibling", uuid = "Structures.uml@_1X1ycY1OEeKgGLBcRSZFfw") public Set<Child> getStepSibling() { Set result = new HashSet<Child>(); for (SiblingStepSibling cur : this.getSiblingStepSibling_stepSibling()) { result.add(cur.getStepSibling()); } return result; }
public void buildTreeFromXml(Element xml, Map<String, Object> map) { setUid(xml.getAttribute("uid")); if (xml.getAttribute("name").length() > 0) { setName(ModelFormatter.getInstance().parseString(xml.getAttribute("name"))); } NodeList propertyNodes = xml.getChildNodes(); int i = 0; while (i < propertyNodes.getLength()) { Node currentPropertyNode = propertyNodes.item(i++); if (currentPropertyNode instanceof Element && (currentPropertyNode.getNodeName().equals("siblingStepSibling_stepSibling") || ((Element) currentPropertyNode) .getAttribute("propertyId") .equals("844736339179565915"))) { NodeList propertyValueNodes = currentPropertyNode.getChildNodes(); int j = 0; while (j < propertyValueNodes.getLength()) { Node currentPropertyValueNode = propertyValueNodes.item(j++); if (currentPropertyValueNode instanceof Element) { SiblingStepSibling curVal; try { curVal = IntrospectionUtil.newInstance( ((Element) currentPropertyValueNode).getAttribute("className")); } catch (Exception e) { curVal = org.opaeum.test.util.ModelJavaMetaInfoMap.INSTANCE.newInstance( ((Element) currentPropertyValueNode).getAttribute("classUuid")); } curVal.buildTreeFromXml((Element) currentPropertyValueNode, map); this.z_internalAddToSiblingStepSibling_stepSibling(curVal); curVal.z_internalAddToStepSibling1(this); map.put(curVal.getUid(), curVal); } } } if (currentPropertyNode instanceof Element && (currentPropertyNode.getNodeName().equals("motherStepChildren_stepMother") || ((Element) currentPropertyNode) .getAttribute("propertyId") .equals("2474112361200246321"))) { NodeList propertyValueNodes = currentPropertyNode.getChildNodes(); int j = 0; while (j < propertyValueNodes.getLength()) { Node currentPropertyValueNode = propertyValueNodes.item(j++); if (currentPropertyValueNode instanceof Element) { MotherStepChildren curVal; try { curVal = IntrospectionUtil.newInstance( ((Element) currentPropertyValueNode).getAttribute("className")); } catch (Exception e) { curVal = org.opaeum.test.util.ModelJavaMetaInfoMap.INSTANCE.newInstance( ((Element) currentPropertyValueNode).getAttribute("classUuid")); } curVal.buildTreeFromXml((Element) currentPropertyValueNode, map); this.z_internalAddToMotherStepChildren_stepMother(curVal); curVal.z_internalAddToStepChild(this); map.put(curVal.getUid(), curVal); } } } } }