Class PropertyNameValidator

java.lang.Object
org.gcube.informationsystem.resourceregistry.utils.PropertyNameValidator

public class PropertyNameValidator extends Object
The property naming rule of the IS-Model: the one grammar a property name follows, whether a Type definition declares it or an instance payload carries it as a custom field.
Author:
Luca Frosini (ISTI - CNR)
  • Field Details

    • PROPERTY_NAME_PATTERN

      public static final Pattern PROPERTY_NAME_PATTERN
      The grammar of a property name, which excludes in particular the @ and _ prefixes.
  • Method Details

    • isValid

      public static boolean isValid(String name)
      Tells whether a name follows the property naming rule.
      Parameters:
      name - the property name to check
      Returns:
      true if name matches PROPERTY_NAME_PATTERN