Class TypeDescription


  • @Entity
    public class TypeDescription
    extends MyDataEntity
    Describes a JSON Type
    • Field Detail

      • SPECIAL_FIELD_FOR_CONTENT_INFORMATION

        public static final String SPECIAL_FIELD_FOR_CONTENT_INFORMATION
        See Also:
        Constant Field Values
    • Constructor Detail

      • TypeDescription

        public TypeDescription()
        basic constructor needed for JPA
    • Method Detail

      • addTypeNameForField

        public void addTypeNameForField​(String fieldName,
                                        String typeName)
        Adds the fields.
        Parameters:
        fieldName - the key
        typeName - the value
      • getTypeClass

        public Optional<Class<?>> getTypeClass()
        Returns:
        the class for the current type
      • getFieldNames

        public Set<String> getFieldNames()
        Returns:
        the list of registried field names
      • hasField

        public boolean hasField​(String fieldName)
        Parameters:
        fieldName -
        Returns:
        true if there is such a field name
      • getTypeDescriptionForField

        public Optional<TypeDescription> getTypeDescriptionForField​(String fieldName)
        Parameters:
        fieldName -
        Returns:
        the TypeDescription corresponding to a field name
      • getTypeNameForField

        public Optional<String> getTypeNameForField​(String fieldName)
        Parameters:
        fieldName -
        Returns:
        the string type name for a field