Class ModelRegistry

java.lang.Object
de.fraunhofer.iosb.ilt.frostclient.model.ModelRegistry

public class ModelRegistry extends Object
The modelRegistry holds the registered EntityTypes and PropertyTypes.
  • Field Details

  • Constructor Details

    • ModelRegistry

      public ModelRegistry()
  • Method Details

    • registerEntityType

      public final ModelRegistry registerEntityType(EntityType type)
      Register a new entity type. Registering the same type twice is a no-op, registering a new entity type with a name that already exists causes an IllegalArgumentException.
      Parameters:
      type - The entity type to register.
      Returns:
      this ModelRegistry.
    • getEntityTypeForName

      public final EntityType getEntityTypeForName(String typeName)
      Get the entity type with the given name.
      Parameters:
      typeName - The name of the entity type to find.
      Returns:
      the entity type with the given name, or null.
    • getEntityTypes

      public final Set<EntityType> getEntityTypes()
    • registerPropertyType

      public ModelRegistry registerPropertyType(PropertyType type)
    • getPropertyType

      public final PropertyType getPropertyType(String name)
    • getPropertyTypes

      public Map<String,PropertyType> getPropertyTypes()
    • getModel

      public <T extends DataModel> T getModel(Class<T> clazz)
    • hasModel

      public <T extends DataModel> boolean hasModel(Class<T> clazz)
    • addDataModel

      public ModelRegistry addDataModel(DataModel model)
    • initFinalise

      public void initFinalise()