Class URIAdapter

Direct Known Subclasses:
URIAdapter.AsURL

public class URIAdapter extends XmlAdapter<GO_CharacterString,URI>
JAXB adapter wrapping a URI value with a <gcx:FileName> element.
Since:
0.3
Version:
1.0
  • Constructor Details

    • URIAdapter

      public URIAdapter()
      Empty constructor for JAXB.
  • Method Details

    • unmarshal

      public final URI unmarshal(GO_CharacterString value) throws URISyntaxException
      Converts a URI read from a XML stream to the object containing the value. JAXB calls automatically this method at unmarshalling time.
      Specified by:
      unmarshal in class XmlAdapter<GO_CharacterString,URI>
      Parameters:
      value - the wrapper for the URI value, or null.
      Returns:
      a URI which represents the URI value, or null.
      Throws:
      URISyntaxException - if the string is not a valid URI.
    • marshal

      public GO_CharacterString marshal(URI value)
      Converts a URI to the object to be marshalled in a XML file or stream. JAXB calls automatically this method at marshalling time.
      Specified by:
      marshal in class XmlAdapter<GO_CharacterString,URI>
      Parameters:
      value - the URI value, or null.
      Returns:
      the wrapper for the given URI, or null.