@Test public void testCyclicFromElement() throws Exception { String xml = "<s:extensions xmlns:s=\"http: Element el = new SAXBuilder().build(new StringReader(xml)) .getRootElement(); TypeDescriptor a = XMLSplitterSerialisationHelper .extensionXMLToTypeDescriptor(el); assertTrue("wrong type", a instanceof ComplexTypeDescriptor); assertEquals("wrong name", "a", a.getName()); List<TypeDescriptor> a_elements = ((ComplexTypeDescriptor) a).getElements(); assertEquals("should be only 1 element", 1, a_elements.size()); TypeDescriptor b = a_elements.get(0); assertTrue("wrong type", b instanceof ComplexTypeDescriptor); List<TypeDescriptor> b_elements = ((ComplexTypeDescriptor) b).getElements(); assertEquals("should be only 1 element", 1, b_elements.size()); assertEquals("b should contain a reference to a", a.toString(), b_elements.get(0).toString()); }
public static TypeDescriptor extensionXMLToTypeDescriptor(Element element) { Element child = (Element) element.getChildren().get(0); return buildTypeDescriptorFromElement(child, new HashMap<String, TypeDescriptor>()); }
XMLSplitterSerialisationHelper { public static TypeDescriptor extensionXMLToTypeDescriptor(Element element) { Element child = (Element) element.getChildren().get(0); return buildTypeDescriptorFromElement(child, new HashMap<String, TypeDescriptor>()); } }
XMLSplitterSerialisationHelper { public static TypeDescriptor extensionXMLToTypeDescriptor(Element element) { Element child = (Element) element.getChildren().get(0); return buildTypeDescriptorFromElement(child, new HashMap<String, TypeDescriptor>()); }  }
XMLSplitterSerialisationHelper { public static TypeDescriptor extensionXMLToTypeDescriptor(Element element) { Element child = (Element) element.getChildren().get(0); return buildTypeDescriptorFromElement(child, new HashMap<String, TypeDescriptor>()); }  static Element typeDescriptorToExtensionXML(TypeDescriptor descriptor); static TypeDescriptor extensionXMLToTypeDescriptor(Element element); }
XMLSplitterSerialisationHelper { public static TypeDescriptor extensionXMLToTypeDescriptor(Element element) { Element child = (Element) element.getChildren().get(0); return buildTypeDescriptorFromElement(child, new HashMap<String, TypeDescriptor>()); }  static Element typeDescriptorToExtensionXML(TypeDescriptor descriptor); static TypeDescriptor extensionXMLToTypeDescriptor(Element element); final static Namespace XScuflNS; }