/// /// <summary> * Get all Shape from the current element /// * </summary> /// * <returns> Collection<JDFShapeElement> </returns> /// public virtual ICollection <JDFShapeElement> getAllShape() { List <JDFShapeElement> v = new List <JDFShapeElement>(); JDFShapeElement kElem = (JDFShapeElement)getFirstChildElement(ElementName.SHAPE, null); while (kElem != null) { v.Add(kElem); kElem = (JDFShapeElement)kElem.getNextSiblingElement(ElementName.SHAPE, null); } return(v); }
public virtual void testContextSensitiveElementNames() { // HoleType, Method, Shape and Surface are context sensitive elements // The type casts below should all succeed JDFDoc doc = new JDFDoc(ElementName.JDF); KElement rootNode = doc.getRoot(); JDFStringSpan kelem21 = (JDFStringSpan)rootNode.appendElement("HoleType", null); kelem21.setAttribute("Type", "org.cip4.jdflib.span.JDFStringSpan"); KElement kelem22 = rootNode.appendElement("RingBinding", null); JDFSpanHoleType kelem23 = (JDFSpanHoleType)kelem22.appendElement("HoleType", null); kelem23.setAttribute("Type", "org.cip4.jdflib.span.JDFSpanHoleType"); JDFNameSpan kelem11 = (JDFNameSpan)rootNode.appendElement("Method", null); kelem11.setAttribute("Type", "org.cip4.jdflib.span.JDFNameSpan"); KElement kelem12 = rootNode.appendElement("InsertingIntent", null); JDFSpanMethod kelem13 = (JDFSpanMethod)kelem12.appendElement("Method", null); kelem13.setAttribute("Type", "org.cip4.jdflib.span.JDFSpanMethod"); JDFShapeElement kelem4 = (JDFShapeElement)rootNode.appendElement("Shape", null); kelem4.setAttribute("Type", "org.cip4.jdflib.resource.JDFShapeElement"); KElement kelem5 = rootNode.appendElement("BookCase", null); JDFSpanShape kelem6 = (JDFSpanShape)kelem5.appendElement("Shape", null); kelem6.setAttribute("Type", "org.cip4.jdflib.span.JDFSpanShape"); JDFSurface kelem7 = (JDFSurface)rootNode.appendElement("Surface", null); kelem7.setAttribute("Type", "org.cip4.jdflib.resource.process.JDFSurface"); KElement kelem8 = rootNode.appendElement("LaminatingIntent", null); JDFSpanSurface kelem9 = (JDFSpanSurface)kelem8.appendElement("Surface", null); kelem9.setAttribute("Type", "org.cip4.jdflib.span.JDFSpanSurface"); }