Class ProfileSupport


  • public final class ProfileSupport
    extends java.lang.Object
    • Method Detail

      • isSliceDefinition

        public static boolean isSliceDefinition​(ElementDefinition elementDefinition)
      • getReferencedProfileConstraintKeys

        public static java.util.Set<java.lang.String> getReferencedProfileConstraintKeys​(ElementDefinition elementDefinition)
      • hasConstraintDifferential

        public static boolean hasConstraintDifferential​(ElementDefinition elementDefinition)
      • getBindingMap

        public static java.util.Map<java.lang.String,​ElementDefinition.Binding> getBindingMap​(java.lang.String url)
      • getConstraints

        public static java.util.List<Constraint> getConstraints​(java.util.List<java.lang.String> urls,
                                                                java.lang.Class<?> type)
      • getConstraints

        public static java.util.List<Constraint> getConstraints​(Resource resource)
        Get constraints for all the resource-asserted profiles of the passed resource.
        Parameters:
        resource -
        Returns:
      • getResourceAssertedProfiles

        public static java.util.List<java.lang.String> getResourceAssertedProfiles​(Resource resource)
      • getConstraints

        public static java.util.List<Constraint> getConstraints​(java.lang.String url,
                                                                java.lang.Class<?> type)
        Parameters:
        url - the canonical url (with optional version postfix and optional fragment id for contained resources) for a profile in the registry
        type - the target resource or element type for the profile
        Returns:
      • getElementDefinition

        public static ElementDefinition getElementDefinition​(java.lang.String path)
      • getElementDefinitionMap

        public static java.util.Map<java.lang.String,​ElementDefinition> getElementDefinitionMap​(java.lang.Class<?> type)
      • getElementDefinitionMap

        public static java.util.Map<java.lang.String,​ElementDefinition> getElementDefinitionMap​(java.lang.String url)
      • getConstraintKeys

        public static java.util.Set<java.lang.String> getConstraintKeys​(StructureDefinition structureDefinition)
      • getConstraintKeys

        public static java.util.Set<java.lang.String> getConstraintKeys​(ElementDefinition elementDefinition)
      • getProfile

        public static StructureDefinition getProfile​(java.lang.String url,
                                                     java.lang.Class<?> type)
        Parameters:
        url - the canonical url (with optional version postfix and optional fragment id for contained resources) for a profile in the registry
        type - the resource or element type
        Returns:
      • getStructureDefinition

        public static StructureDefinition getStructureDefinition​(java.lang.Class<?> modelClass)
      • getStructureDefinition

        public static StructureDefinition getStructureDefinition​(java.lang.String url)
        Parameters:
        url - the canonical url (with optional version postfix and optional fragment id for contained resources) for a profile in the registry
        Returns:
        the StructureDefinition for the given canonical url if it exists, null otherwise
        Throws:
        java.lang.ClassCastException - if the resource exists in the registry but is not a StructureDefinition
      • isApplicable

        public static boolean isApplicable​(StructureDefinition profile,
                                           java.lang.Class<?> type)
        Is the StructureDefinition applicable to the resource or element type?
        Parameters:
        profile -
        type - the resource or element type to check
        Returns: