java.lang.Object
de.fraunhofer.iese.mydata.common.MyDataEntity
de.fraunhofer.iese.mydata.component.information.method.TypeDescription

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

    • SPECIAL_FIELD_FOR_CONTENT_INFORMATION

      public static final String SPECIAL_FIELD_FOR_CONTENT_INFORMATION
      See Also:
  • Constructor Details

    • TypeDescription

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

    • 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