Class NameplateSetup
java.lang.Object
de.iip_ecosphere.platform.support.iip_aas.NameplateSetup
Describes static information about a device in the style of an ZVEI Digital Nameplate for industrial equipment V1.0.
This class is intentionally neither a base nor a derived class of
ApplicationSetup as this class shall
(somewhen) follow the spec, ApplicationSetup shall then follow the software nameplate.- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a product classification item.static classRepresents a device-provided service. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ApplicationSetup.Addressprivate Stringprivate Stringprivate Stringprivate Stringprivate Stringprivate Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate List<NameplateSetup.Service> static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionde.iip_ecosphere.platform.support.aas.AascreateAas(String urn, String id, Consumer<de.iip_ecosphere.platform.support.aas.Aas.AasBuilder> further) Creates an AAS for this nameplate setup.private voidcreateTechnicalDataNameplate(de.iip_ecosphere.platform.support.aas.Aas.AasBuilder aasBuilder, String urn) Creates the technical data nameplate.static StringExpands the last part of an URN by the givenexpansion.Returns the address.Returns the manufacturer article number.Returns the optional manufacturer logo.Returns the manufacturer name.Returns the manufacturer order code.Returns the manufacturer product designation.Returns the optional product image.getService(String key) Returns the (first specified) service with the givenkey.Returns the services.static Map<String, NameplateSetup.Service> getServicesAsMap(List<NameplateSetup.Service> services) Returns the given services as map.private static StringgetStringProperty(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection coll, String idShort) Returns the value of a string property.static NameplateSetupPreliminary way to find the nameplate YML.static NameplateSetupreadFromAas(de.iip_ecosphere.platform.support.aas.Aas aas) Reads the AAS back as nameplate setup.private static List<NameplateSetup.Service> readServices(de.iip_ecosphere.platform.support.aas.Submodel sub) Reads services from the givensubmodel.static de.iip_ecosphere.platform.support.aas.AasResolves anidentifierto the respective AAS.static NameplateSetupResolves the nameplate setup from the IIP-Ecosphere platform AAS via the device id.static InputStreamBasic way of resolving a nameplate setup.static NameplateSetup.ServiceResolves the service with the givenkeyfrom the IIP-Ecosphere platform AAS.voidsetAddress(ApplicationSetup.Address address) Changes the address.voidsetManufacturerArticleNumber(String manufacturerArticleNumber) Changes the manufacturer article number.voidsetManufacturerLogo(String manufacturerLogo) Defines the optional manufacturer logo.voidsetManufacturerName(String manufacturerName) Changes the manufacturer name.voidsetManufacturerOrderCodeNumber(String manufacturerOrderCodeNumber) Changes the manufacturer order code.voidsetManufacturerProductDesignation(String manufacturerProductDesignation) Changes the manufacturer product designation.voidsetProductImage(String productImage) Changes the optional product image.voidsetServices(List<NameplateSetup.Service> services) Changes the services.
-
Field Details
-
SUBMODEL_SERVICES
- See Also:
-
PROPERTY_KEY
- See Also:
-
PROPERTY_PORT
- See Also:
-
PROPERTY_HOST
- See Also:
-
PROPERTY_NETMASK
- See Also:
-
PROPERTY_VERSION
- See Also:
-
manufacturerName
-
manufacturerProductDesignation
-
manufacturerArticleNumber
-
manufacturerOrderCodeNumber
-
productImage
-
manufacturerLogo
-
productClassificationItems
-
address
-
services
-
-
Constructor Details
-
NameplateSetup
public NameplateSetup()For snakeyaml. -
NameplateSetup
Copy constructor.- Parameters:
setup- the instance to copy from
-
-
Method Details
-
getManufacturerName
Returns the manufacturer name.- Returns:
- the manufacturer name
-
setManufacturerName
Changes the manufacturer name. [snakeyaml]- Parameters:
manufacturerName- the manufacturer name
-
getManufacturerArticleNumber
Returns the manufacturer article number.- Returns:
- the manufacturer article number
-
setManufacturerArticleNumber
Changes the manufacturer article number. [snakeyaml]- Parameters:
manufacturerArticleNumber- the manufacturer article number
-
getManufacturerOrderCodeNumber
Returns the manufacturer order code.- Returns:
- the manufacturer order code
-
setManufacturerOrderCodeNumber
Changes the manufacturer order code. [snakeyaml]- Parameters:
manufacturerOrderCodeNumber- the manufacturer order code
-
getManufacturerProductDesignation
Returns the manufacturer product designation.- Returns:
- the designation (may be null for none)
-
getService
Returns the (first specified) service with the givenkey.- Parameters:
key- the key- Returns:
- the service, may be null for none
-
getServices
Returns the services.- Returns:
- the services
-
getServicesAsMap
public static Map<String,NameplateSetup.Service> getServicesAsMap(List<NameplateSetup.Service> services) Returns the given services as map.- Parameters:
services- the services (may be null)- Returns:
- the services as map, indexed by their keys
-
setServices
Changes the services. [snakeyaml]- Parameters:
services- the services
-
setManufacturerProductDesignation
Changes the manufacturer product designation. [snakeyaml]- Parameters:
manufacturerProductDesignation- the designation
-
getAddress
Returns the address.- Returns:
- the address
-
setAddress
Changes the address. [snakeyaml]- Parameters:
address- the address
-
getProductImage
Returns the optional product image.- Returns:
- the image (local resolvable name or URI to image)
-
setProductImage
Changes the optional product image. [snakeyaml]- Parameters:
productImage- the image (local resolvable name or URI to image)
-
getManufacturerLogo
Returns the optional manufacturer logo.- Returns:
- the logo (local resolvable name or URI to image)
-
setManufacturerLogo
Defines the optional manufacturer logo. [snakeyaml]- Parameters:
manufacturerLogo- the logo (local resolvable name or URI to image)
-
expandUrn
Expands the last part of an URN by the givenexpansion.- Parameters:
urn- the URN to expandexpansion- the expansion- Returns:
- the expanded URN
-
createAas
public de.iip_ecosphere.platform.support.aas.Aas createAas(String urn, String id, Consumer<de.iip_ecosphere.platform.support.aas.Aas.AasBuilder> further) Creates an AAS for this nameplate setup.- Parameters:
urn- the URN of the AAS to createid- the id short to createfurther- further build steps on the AAS, may be null- Returns:
- the AAS
- See Also:
-
createTechnicalDataNameplate
private void createTechnicalDataNameplate(de.iip_ecosphere.platform.support.aas.Aas.AasBuilder aasBuilder, String urn) Creates the technical data nameplate. [legacy]- Parameters:
aasBuilder- the parent AAS builderurn- the URN of the platform AAS
-
resolveNameplateSetup
Basic way of resolving a nameplate setup.- Returns:
- the input stream containing the setup, may be null for none
-
obtainNameplateSetup
Preliminary way to find the nameplate YML.- Returns:
- the setup representing the nameplate YML
- Throws:
IOException- if the setup file cannot be read- See Also:
-
readFromAas
Reads the AAS back as nameplate setup. Currently, we read only the services back.- Parameters:
aas- the AAS to read out (may be null)- Returns:
- the nameplate setup
-
readServices
private static List<NameplateSetup.Service> readServices(de.iip_ecosphere.platform.support.aas.Submodel sub) Reads services from the givensubmodel.- Parameters:
sub- the submodel- Returns:
- the services
-
getStringProperty
private static String getStringProperty(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection coll, String idShort) Returns the value of a string property.- Parameters:
coll- the collection to take the property fromidShort- the short id of the property- Returns:
- the value or null
-
resolveFromAas
Resolves the nameplate setup from the IIP-Ecosphere platform AAS via the device id.- Returns:
- the nameplate setup, may be null if there is none
- Throws:
IOException- if resolving the AASs fails for some reason
-
resolveServiceFromAas
Resolves the service with the givenkeyfrom the IIP-Ecosphere platform AAS.- Parameters:
key- the key of the service to resolve, may be null and leads to null- Returns:
- the service, may be null for none
-
resolve
public static de.iip_ecosphere.platform.support.aas.Aas resolve(String identifier) throws IOException Resolves anidentifierto the respective AAS.- Parameters:
identifier- the identifier, URN, URL to resolve- Returns:
- the resolved AAS or null for none
- Throws:
IOException- if the resolution failed
-