Class SubmodelAggregator
- java.lang.Object
-
- org.eclipse.basyx.submodel.aggregator.SubmodelAggregator
-
- All Implemented Interfaces:
ISubmodelAggregator
public class SubmodelAggregator extends Object implements ISubmodelAggregator
A class for aggregating local submodels based on the ISubmodelAPI- Author:
- espen, wege
-
-
Field Summary
Fields Modifier and Type Field Description protected ISubmodelAPIFactory
smApiFactory
Store Submodel API Provider.protected Map<String,ISubmodelAPI>
smApiMap
-
Constructor Summary
Constructors Constructor Description SubmodelAggregator()
SubmodelAggregator(ISubmodelAPIFactory smApiFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createSubmodel(Submodel submodel)
Creates a new Submodel at the endpointvoid
createSubmodel(ISubmodelAPI submodelAPI)
Creates a new Submodel using an APIvoid
deleteSubmodelByIdentifier(IIdentifier identifier)
Deletes a specific Submodelvoid
deleteSubmodelByIdShort(String idShort)
Deletes a specific SubmodelISubmodel
getSubmodel(IIdentifier identifier)
Retrieves a specific SubmodelISubmodelAPI
getSubmodelAPIById(IIdentifier identifier)
Retrieves the API for a specific SubmodelISubmodelAPI
getSubmodelAPIByIdShort(String idShort)
Retrieves the API for a specific SubmodelISubmodel
getSubmodelbyIdShort(String idShort)
Retrieves a specific SubmodelCollection<ISubmodel>
getSubmodelList()
Retrieves all Submodels from the endpointvoid
updateSubmodel(Submodel submodel)
Updates a specific Submodel
-
-
-
Field Detail
-
smApiMap
protected Map<String,ISubmodelAPI> smApiMap
-
smApiFactory
protected ISubmodelAPIFactory smApiFactory
Store Submodel API Provider. By default, uses the VAB Submodel Provider
-
-
Constructor Detail
-
SubmodelAggregator
public SubmodelAggregator()
-
SubmodelAggregator
public SubmodelAggregator(ISubmodelAPIFactory smApiFactory)
-
-
Method Detail
-
getSubmodelList
public Collection<ISubmodel> getSubmodelList()
Description copied from interface:ISubmodelAggregator
Retrieves all Submodels from the endpoint- Specified by:
getSubmodelList
in interfaceISubmodelAggregator
- Returns:
- a List of all found Submodels
-
getSubmodel
public ISubmodel getSubmodel(IIdentifier identifier) throws ResourceNotFoundException
Description copied from interface:ISubmodelAggregator
Retrieves a specific Submodel- Specified by:
getSubmodel
in interfaceISubmodelAggregator
- Parameters:
identifier
- the Id of the Submodel- Returns:
- the requested Submodel
- Throws:
ResourceNotFoundException
-
createSubmodel
public void createSubmodel(Submodel submodel)
Description copied from interface:ISubmodelAggregator
Creates a new Submodel at the endpoint- Specified by:
createSubmodel
in interfaceISubmodelAggregator
- Parameters:
submodel
- the Submodel to be created
-
updateSubmodel
public void updateSubmodel(Submodel submodel) throws ResourceNotFoundException
Description copied from interface:ISubmodelAggregator
Updates a specific Submodel- Specified by:
updateSubmodel
in interfaceISubmodelAggregator
- Parameters:
submodel
- the updated Submodel- Throws:
ResourceNotFoundException
-
createSubmodel
public void createSubmodel(ISubmodelAPI submodelAPI)
Description copied from interface:ISubmodelAggregator
Creates a new Submodel using an API- Specified by:
createSubmodel
in interfaceISubmodelAggregator
- Parameters:
submodelAPI
- the Submodel API to be added
-
getSubmodelbyIdShort
public ISubmodel getSubmodelbyIdShort(String idShort) throws ResourceNotFoundException
Description copied from interface:ISubmodelAggregator
Retrieves a specific Submodel- Specified by:
getSubmodelbyIdShort
in interfaceISubmodelAggregator
- Parameters:
idShort
- the IdShort of the Submodel- Returns:
- the requested Submodel
- Throws:
ResourceNotFoundException
-
deleteSubmodelByIdentifier
public void deleteSubmodelByIdentifier(IIdentifier identifier)
Description copied from interface:ISubmodelAggregator
Deletes a specific Submodel- Specified by:
deleteSubmodelByIdentifier
in interfaceISubmodelAggregator
- Parameters:
identifier
- the ID of the Submodel to be deleted
-
deleteSubmodelByIdShort
public void deleteSubmodelByIdShort(String idShort)
Description copied from interface:ISubmodelAggregator
Deletes a specific Submodel- Specified by:
deleteSubmodelByIdShort
in interfaceISubmodelAggregator
- Parameters:
idShort
- the idShort of the Submodel to be deleted
-
getSubmodelAPIById
public ISubmodelAPI getSubmodelAPIById(IIdentifier identifier) throws ResourceNotFoundException
Description copied from interface:ISubmodelAggregator
Retrieves the API for a specific Submodel- Specified by:
getSubmodelAPIById
in interfaceISubmodelAggregator
- Parameters:
identifier
- the ID of the Submodel- Returns:
- the requested Submodel API
- Throws:
ResourceNotFoundException
-
getSubmodelAPIByIdShort
public ISubmodelAPI getSubmodelAPIByIdShort(String idShort) throws ResourceNotFoundException
Description copied from interface:ISubmodelAggregator
Retrieves the API for a specific Submodel- Specified by:
getSubmodelAPIByIdShort
in interfaceISubmodelAggregator
- Parameters:
idShort
- the idShort of the Submodel- Returns:
- the requested Submodel API
- Throws:
ResourceNotFoundException
-
-