Class MapRegistryHandler
- java.lang.Object
-
- org.eclipse.basyx.aas.registration.memory.MapRegistryHandler
-
- All Implemented Interfaces:
IRegistryHandler
public class MapRegistryHandler extends Object implements IRegistryHandler
Implements a preconfigured registry based on the Map interface
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,AASDescriptor>
descriptorMap
-
Constructor Summary
Constructors Constructor Description MapRegistryHandler(Map<String,AASDescriptor> rootMap)
Constructor that takes a reference to a map as a base for the registry entries
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(IIdentifier id)
Queries the registry datasource to check, if an entry with the given identifier exists.AASDescriptor
get(IIdentifier id)
Queries the registry datasource for a entry with the given identifier.List<AASDescriptor>
getAll()
Returns a list of all descriptors contained in the registry datasource.void
insert(AASDescriptor descriptor)
Inserts a new descriptor into the registry datasource.void
remove(IIdentifier id)
Removes an entry with a given identifier from the registry datasourcevoid
update(AASDescriptor descriptor)
Updates a given descriptor.
-
-
-
Field Detail
-
descriptorMap
protected Map<String,AASDescriptor> descriptorMap
-
-
Constructor Detail
-
MapRegistryHandler
public MapRegistryHandler(Map<String,AASDescriptor> rootMap)
Constructor that takes a reference to a map as a base for the registry entries
-
-
Method Detail
-
contains
public boolean contains(IIdentifier id)
Description copied from interface:IRegistryHandler
Queries the registry datasource to check, if an entry with the given identifier exists.- Specified by:
contains
in interfaceIRegistryHandler
- Parameters:
id
- The asset- or AAS-identifier that will be checked- Returns:
- True, if an entry with the given identifier exists
-
remove
public void remove(IIdentifier id)
Description copied from interface:IRegistryHandler
Removes an entry with a given identifier from the registry datasource- Specified by:
remove
in interfaceIRegistryHandler
- Parameters:
id
- The asset- or AAS-identifier that will be removed
-
insert
public void insert(AASDescriptor descriptor)
Description copied from interface:IRegistryHandler
Inserts a new descriptor into the registry datasource.- Specified by:
insert
in interfaceIRegistryHandler
- Parameters:
descriptor
- The descriptor that will be inserted.
-
update
public void update(AASDescriptor descriptor)
Description copied from interface:IRegistryHandler
Updates a given descriptor. It is assumed that an entry with the same AAS id already exists in the registry datasource.- Specified by:
update
in interfaceIRegistryHandler
- Parameters:
descriptor
- The descriptor that will be inserted.
-
get
public AASDescriptor get(IIdentifier id)
Description copied from interface:IRegistryHandler
Queries the registry datasource for a entry with the given identifier.- Specified by:
get
in interfaceIRegistryHandler
- Parameters:
id
- The asset- or AAS-identifier for which the descriptor should be retrieved.- Returns:
- The found descriptor from the registry datasource matching the id.
-
getAll
public List<AASDescriptor> getAll()
Description copied from interface:IRegistryHandler
Returns a list of all descriptors contained in the registry datasource.- Specified by:
getAll
in interfaceIRegistryHandler
- Returns:
- The list of AASDescriptors.
-
-