FormUtils¶
-
public final class
FormUtils
¶ Utility class for form parsers.
Methods¶
createChildLabelFromParentLabel¶
-
public static String
createChildLabelFromParentLabel
(String parentLabel, String childName)¶ Attempts to create a child Form element label from its parent label. If an
IndexOutOfBoundsException
occurs, it will return the child’s name.Parameters: - parentLabel – The label of the parent form element
- childName – The name of the child form element
Returns: The modified child label.
getFieldNameFromURI¶
-
public static String
getFieldNameFromURI
(String uri)¶ Returns just the form field name from the fully qualified URI.
Parameters: - uri – The
Throws: - MalformedUriException – if the URI is malformed
Returns: A new string containing the form field name.
removeFormNameFromLabel¶
-
public static String
removeFormNameFromLabel
(String label)¶ Attempts to remove the form name from the Form Element label. If an
IndexOutOfBoundsException
occurs, it will return the label unmodified.Parameters: - label – the label of a Form Element
Returns: The modified label.
removeTitleFromUri¶
-
public static String
removeTitleFromUri
(String uri)¶ Removes the title from the URI fully qualified URI.
Parameters: - uri – The name of the form field
Throws: - MalformedUriException – if the URI is malformed
Returns: A new URI string with the title removed