LibraryToggle FramesPrintFeedback

The name of the generated package is derived from a schema's target namespace using the following algorithm:

  1. The URI scheme, if present, is stripped.


    Fuse Services Framework will only strip the http:, https:, and urn: schemes.

    For example, the namespace http:\\\types\widgetTypes.xsd becomes \\\types\widgetTypes.xsd.

  2. The trailing file type identifier, if present, is stripped.

    For example, \\\types\widgetTypes.xsd becomes \\\types\widgetTypes.

  3. The resulting string is broken into a list of strings using / and : as separators.

    So, \\\types\widgetTypes becomes the list {"", "types", "widgetTypes"}.

  4. If the first string in the list is an internet domain name, it is decomposed as follows:

    1. The leading www. is stripped.

    2. The remaining string is split into its component parts using the . as the separator.

    3. The order of the list is reversed.

    So, {"", "types", "widgetTypes"} becomes {"com", "widegetvendor", "types", "widgetTypes"}


    Internet domain names end in one of the following: .com, .net, .edu, .org, .gov, or in one of the two-letter country codes.

  5. The strings are converted into all lower case.

    So, {"com", "widegetvendor", "types", "widgetTypes"} becomes {"com", "widegetvendor", "types", "widgettypes"}.

  6. The strings are normalized into valid Java package name components as follows:

    1. If the strings contain any special characters, the special characters are converted to an underscore(_).

    2. If any of the strings are a Java keyword, the keyword is prefixed with an underscore(_).

    3. If any of the strings begin with a numeral, the string is prefixed with an underscore(_).

  7. The strings are concatenated using . as a separator.

    So, {"com", "widegetvendor", "types", "widgettypes"} becomes the package name com.widgetvendor.types.widgettypes.

The XML Schema constructs defined in the namespace http:\\\types\widgetTypes.xsd are mapped to the Java package com.widgetvendor.types.widgettypes.

A JAXB generated package contains the following:

Comments powered by Disqus
loading table of contents...