Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference VERSION B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.adf.model.adapter.utils
Class Utility

`java.lang.Object
oracle.adf.model.adapter.utils.Utility`

public final class Utility
extends java.lang.Object

Common utilities.

Since:
  10.1.3

Constructor Summary
`Utility()`

Method Summary
`static void` | `ASSERT(boolean flag)` Throws an exception if the flag is set to false.
`static org.w3c.dom.Element` | `getChildElement(org.w3c.dom.Node parent, java.lang.String childNodeName)` Search for a child Element given a parent element and the child name
`static org.w3c.dom.Node` | `getFirstChild(org.w3c.dom.Node parent, java.lang.String childName)` Search for the First child Node of a parent given the child name
`static boolean` | `isNameValid(java.lang.String name)` Check if a given name is valid.
`static java.lang.String` | `normalizeString(java.lang.String name)` Normalize a string to play by the JSR 227 DT rules.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Utility

    public Utility()

Method Detail

### ASSERT

    public static final void ASSERT(boolean flag)
                             throws java.lang.RuntimeException

  Throws an exception if the flag is set to false.
  Throws:
    `java.lang.RuntimeException`

### getChildElement

    public static org.w3c.dom.Element getChildElement(org.w3c.dom.Node parent,
                                                      java.lang.String childNodeName)

  Search for a child Element given a parent element and the child name

### getFirstChild

    public static org.w3c.dom.Node getFirstChild(org.w3c.dom.Node parent,
                                                 java.lang.String childName)

  Search for the First child Node of a parent given the child name

### normalizeString

    public static java.lang.String normalizeString(java.lang.String name)

  Normalize a string to play by the JSR 227 DT rules. Cannot have java keywords or strings with '-' in when building the StructureDefinition.
  Parameters:
    `name` - The String to be normalized.
  Returns:
    The normalized string

### isNameValid

    public static boolean isNameValid(java.lang.String name)

  Check if a given name is valid. A Name is valid iff

  - It begins with a character
  - The remaining characters are either alphanumeric i.e `Character.isLetterOrDigit()` must return true, or is an underscore.
  - The Last character must be alphanumeric. Names cannot end with underscores.
  - The caller is responsible for trimming any leading and trailing spaces in the parameter.
      Parameters:
        `name` - The input name which must be checked for compliance
      Returns:
        `true` if the input name satisfies the conditions described above. `false` if any of the above conditions fail.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference VERSION B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1997, 2005, Oracle. All rights reserved.