Class IdScheme

java.lang.Object
org.hisp.dhis.model.IdScheme

public class IdScheme extends Object
  • Field Details

    • UID

      public static final IdScheme UID
    • CODE

      public static final IdScheme CODE
  • Constructor Details

    • IdScheme

      public IdScheme(String idScheme)
  • Method Details

    • createAttributeIdScheme

      public static IdScheme createAttributeIdScheme(String attribute)
      Creates an IdScheme with object property ATTRIBUTE for the given attribute ID (UID). The attribute must be a valid UID and cannot be null.
      Parameters:
      attribute - the attribute ID (UID).
      Returns:
      an IdScheme.
    • createIdScheme

      public static IdScheme createIdScheme(String idScheme)
      Creates an IdScheme based on the given string. The string can be on the following formats:
      • UID
      • CODE
      • ATTRIBUTE:{attribute-ID}
      Parameters:
      idScheme - the ID scheme string.
      Returns:
      an IdScheme.
      Throws:
      IllegalArgumentException - if the ID scheme string is invalid.
    • getObjectProperty

      public org.hisp.dhis.model.IdScheme.ObjectProperty getObjectProperty()
    • getAttribute

      public String getAttribute()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • name

      public String name()
      Returns a string representation of this IdScheme. Alias for toString().
      Returns:
      a string representation of this IdScheme.
    • toString

      public String toString()
      Returns a string representation of this IdScheme.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this IdScheme.