private GraphicStrokeType getJAXBType() {
    GraphicStrokeType s = new GraphicStrokeType();

    this.setJAXBProperties(s);

    if (getOwnUom() != null) {
      s.setUom(getOwnUom().toURN());
    }

    if (graphic != null) {
      s.setGraphic(graphic.getJAXBElement());
    }

    if (length != null) {
      s.setLength(length.getJAXBParameterValueType());
    }

    if (orientation != null) {
      s.setRelativeOrientation(orientation.getJAXBType());
    }

    if (relativePosition != null) {
      s.setRelativePosition(relativePosition.getJAXBParameterValueType());
    }
    return s;
  }
  /**
   * Build a new {@code GraphicStroke} using the JAXB type given in argument.
   *
   * @param gst
   * @throws org.orbisgis.coremap.renderer.se.SeExceptions.InvalidStyle
   */
  GraphicStroke(GraphicStrokeType gst) throws InvalidStyle {
    super(gst);

    if (gst.getGraphic() != null) {
      this.setGraphicCollection(new GraphicCollection(gst.getGraphic(), this));
    }

    if (gst.getLength() != null) {
      this.setLength(SeParameterFactory.createRealParameter(gst.getLength()));
    }

    if (gst.getRelativeOrientation() != null) {
      this.setRelativeOrientation(RelativeOrientation.readFromToken(gst.getRelativeOrientation()));
    } else {
      this.setRelativeOrientation(RelativeOrientation.NORMAL);
    }

    if (gst.getRelativePosition() != null) {
      setRelativePosition(SeParameterFactory.createRealParameter(gst.getRelativePosition()));
    }
  }