Interface ModelNamingStrategy


  • public interface ModelNamingStrategy
    Naming strategy for models. Default implementation exists for the Archie Reference Model implementation. Other implementations can be made for other reference model implementations. Created by pieter.bos on 26/03/16.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getAlternativeTypeNames​(java.lang.Class<?> clazz)
      Return any alternative names for a given class, used for backwards compatibility with renamed classes
      java.lang.String getAttributeName​(java.lang.reflect.Field field, java.lang.reflect.Method method)
      Returns the OpenEHR standards compliant attribute name of the attribute implemenetd by the given java method and/or field.
      java.lang.String getTypeName​(java.lang.Class<?> clazz)
      Returns the OpenEHR standards compliant name of the given class.
    • Method Detail

      • getAttributeName

        java.lang.String getAttributeName​(java.lang.reflect.Field field,
                                          java.lang.reflect.Method method)
        Returns the OpenEHR standards compliant attribute name of the attribute implemenetd by the given java method and/or field. Either field or method must be non-null, or both. If they are both non-null, they must point to the implementation of the same attribute in the specification
        Parameters:
        field - the field reference, if present
        method - the method reference, if present.
        Returns:
        the name
      • getTypeName

        java.lang.String getTypeName​(java.lang.Class<?> clazz)
        Returns the OpenEHR standards compliant name of the given class.
        Parameters:
        clazz - the class to name
        Returns:
        the name
      • getAlternativeTypeNames

        java.util.List<java.lang.String> getAlternativeTypeNames​(java.lang.Class<?> clazz)
        Return any alternative names for a given class, used for backwards compatibility with renamed classes
        Parameters:
        clazz - the class to name
        Returns:
        the list of alternative names, empty if no alternatives are present