Class ModelRegistry
java.lang.Object
de.fraunhofer.iosb.ilt.frostclient.model.ModelRegistry
The modelRegistry holds the registered EntityTypes and PropertyTypes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EntityPropertyMain<String>The global EntityProperty SelfLink. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDataModel(DataModel model) final EntityTypegetEntityTypeForName(String typeName) Get the entity type with the given name.final Set<EntityType><T extends DataModel>
Tfinal PropertyTypegetPropertyType(String name) <T extends DataModel>
booleanvoidbooleanfinal ModelRegistryregisterEntityContainer(String name, EntityType type) final ModelRegistryregisterEntityType(EntityType type) Register a new entity type.
-
Field Details
-
EP_SELFLINK
The global EntityProperty SelfLink.
-
-
Constructor Details
-
ModelRegistry
public ModelRegistry()
-
-
Method Details
-
registerEntityType
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 anIllegalArgumentException.- Parameters:
type- The entity type to register.- Returns:
- this ModelRegistry.
-
registerEntityContainer
-
getEntityTypeForName
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
-
getContainers
-
getEntityTypeForContainer
-
registerPropertyType
-
getPropertyType
-
getPropertyTypes
-
getModel
-
hasModel
-
addDataModel
-
initFinalise
public void initFinalise() -
isInitialised
public boolean isInitialised()
-