Hi all,
I want to create Data with value which is a ShapeNode instead of String content. How can I do it ?
Sample:
<data key="d0">
<y:ShapeNode>
<y:NodeLabel>Node Label</y:NodeLabel>
<y:Shape type="circle"/>
<y:Fill color="#00FF00" transparent="false"/>
<y:Geometry height="10" width="10" x="0" y="0"/>
</y:ShapeNode>
</data>
Currently I tried to generate pojo classes from ygraphml.xsd schema by jaxb (jxc) then use those classes to create graphml file. Look into the class DataType, I just see it support method to set String content only.
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "data.type", namespace = "http://graphml.graphdrawing.org/xmlns")
public class DataType
extends DataExtensionType
....
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "data-extension.type", namespace = "http://graphml.graphdrawing.org/xmlns")
@XmlSeeAlso({
DefaultType.class,
DataType.class
})
public class DataExtensionType
extends OriginalDataExtensionType
....
public class OriginalDataExtensionType {
@XmlValue
protected String content;
Therefore I cannot set ShapeNode as value of DataType.