protected void convertVertexLayout(
      final LayoutVertexFactsType vertex, final GraphicsType graphics) throws CanoniserException {
    if (vertex != null) {
      final FillType fill = ANF_FACTORY.createFillType();

      // Convert all Attributes
      final LayoutAttributesFactsType attr = vertex.getAttributes();
      for (final JAXBElement<?> element : attr.getAutosizeOrBackgroundColorOrBendable()) {
        final Object elementValue = element.getValue();
        if (elementValue instanceof LayoutRectangleType) {
          try {
            convertLayoutRectangleAttribute((LayoutRectangleType) elementValue, graphics);
          } catch (final ParseException e) {
            throw new CanoniserException(
                "Could not convert layout of element " + vertex.getId(), e);
          }
        }
        if (element.getName().getLocalPart().equals(BACKGROUND_COLOR)
            && element.getValue() != null) {
          final BigInteger color = (BigInteger) element.getValue();
          fill.setColor(ConversionUtils.convertColorToString(color.intValue()));
        }
      }

      fill.setImage(vertex.getIconpath());
      graphics.setFill(fill);
    }
  }
 private LayoutRectangleType getRectangleFromVertex(final LayoutVertexFactsType vertex) {
   final LayoutAttributesFactsType attr = vertex.getAttributes();
   for (final JAXBElement<?> element : attr.getAutosizeOrBackgroundColorOrBendable()) {
     final Object elementValue = element.getValue();
     if (elementValue instanceof LayoutRectangleType) {
       return (LayoutRectangleType) elementValue;
     }
   }
   return null;
 }