public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); super.copyTo(locator, draftCopy, strategy); if (draftCopy instanceof NodeType) { final NodeType copy = ((NodeType) draftCopy); if (this.isSetDirectedEdge()) { List<DirectedEdgePropertyType> sourceDirectedEdge; sourceDirectedEdge = this.getDirectedEdge(); @SuppressWarnings("unchecked") List<DirectedEdgePropertyType> copyDirectedEdge = ((List<DirectedEdgePropertyType> ) strategy.copy(LocatorUtils.property(locator, "directedEdge", sourceDirectedEdge), sourceDirectedEdge)); copy.unsetDirectedEdge(); List<DirectedEdgePropertyType> uniqueDirectedEdgel = copy.getDirectedEdge(); uniqueDirectedEdgel.addAll(copyDirectedEdge); } else { copy.unsetDirectedEdge(); } if (this.isSetPointProperty()) { PointPropertyType sourcePointProperty; sourcePointProperty = this.getPointProperty(); PointPropertyType copyPointProperty = ((PointPropertyType) strategy.copy(LocatorUtils.property(locator, "pointProperty", sourcePointProperty), sourcePointProperty)); copy.setPointProperty(copyPointProperty); } else { copy.pointProperty = null; } } return draftCopy; }
@SuppressWarnings("unchecked") List<DirectedEdgePropertyType> copyDirectedEdge = ((List<DirectedEdgePropertyType> ) strategy.copy(LocatorUtils.property(locator, "directedEdge", sourceDirectedEdge), sourceDirectedEdge, this.isSetDirectedEdge())); copy.unsetDirectedEdge(); if (copyDirectedEdge!= null) { List<DirectedEdgePropertyType> uniqueDirectedEdgel = copy.getDirectedEdge(); copy.unsetDirectedEdge();
public void mergeFrom(ObjectLocator leftLocator, ObjectLocator rightLocator, Object left, Object right, MergeStrategy strategy) { super.mergeFrom(leftLocator, rightLocator, left, right, strategy); if (right instanceof NodeType) { final NodeType target = this; final NodeType leftObject = ((NodeType) left); final NodeType rightObject = ((NodeType) right); { List<DirectedEdgePropertyType> lhsDirectedEdge; lhsDirectedEdge = leftObject.getDirectedEdge(); List<DirectedEdgePropertyType> rhsDirectedEdge; rhsDirectedEdge = rightObject.getDirectedEdge(); target.unsetDirectedEdge(); List<DirectedEdgePropertyType> uniqueDirectedEdgel = target.getDirectedEdge(); uniqueDirectedEdgel.addAll(((List<DirectedEdgePropertyType> ) strategy.merge(LocatorUtils.property(leftLocator, "directedEdge", lhsDirectedEdge), LocatorUtils.property(rightLocator, "directedEdge", rhsDirectedEdge), lhsDirectedEdge, rhsDirectedEdge))); } { PointPropertyType lhsPointProperty; lhsPointProperty = leftObject.getPointProperty(); PointPropertyType rhsPointProperty; rhsPointProperty = rightObject.getPointProperty(); target.setPointProperty(((PointPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "pointProperty", lhsPointProperty), LocatorUtils.property(rightLocator, "pointProperty", rhsPointProperty), lhsPointProperty, rhsPointProperty))); } } }
rhsDirectedEdge = (rightObject.isSetDirectedEdge()?rightObject.getDirectedEdge():null); List<DirectedEdgePropertyType> mergedDirectedEdge = ((List<DirectedEdgePropertyType> ) strategy.merge(LocatorUtils.property(leftLocator, "directedEdge", lhsDirectedEdge), LocatorUtils.property(rightLocator, "directedEdge", rhsDirectedEdge), lhsDirectedEdge, rhsDirectedEdge, leftObject.isSetDirectedEdge(), rightObject.isSetDirectedEdge())); target.unsetDirectedEdge(); if (mergedDirectedEdge!= null) { List<DirectedEdgePropertyType> uniqueDirectedEdgel = target.getDirectedEdge(); target.unsetDirectedEdge();