Skip to content
This repository has been archived by the owner on Dec 23, 2022. It is now read-only.

Commit

Permalink
Fix #13 - add enum for Nameplate mandatory properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
farmakiG committed Oct 10, 2022
1 parent d3771f6 commit 3dc181c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* *****************************************************************************
*
* <p>Copyright FUJITSU LIMITED 2022
*
* <p>Creation Date: 10.10.2022
*
* <p>*****************************************************************************
*/
package org.oscm.basyx.parser;

/** @author farmaki */
public enum NameplateMandatoryProperties {
MANUFACTURER_NAME("ManufactName"),
MANUFACTURER_PRODUCT_DESIGNATION("ManufacturerProductDesignation"),
MANUFACTURER_PRODUCT_FAMILY("ManufacturerProductFamily"),
YEAR_OF_CONSTRUCTION("YearOfConstruction");

protected String idShort = null;

NameplateMandatoryProperties(String idShort) {
this.setIdShort(idShort);
}

public String getIdShort() {
return idShort;
}

public void setIdShort(String idShort) {
this.idShort = idShort;
}
}
3 changes: 3 additions & 0 deletions src/test/java/org/oscm/basyx/parser/NameplateBasyxTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import org.eclipse.basyx.submodel.metamodel.api.ISubmodel;
import org.eclipse.basyx.submodel.metamodel.api.identifier.IdentifierType;
import org.eclipse.basyx.submodel.metamodel.api.qualifier.haskind.ModelingKind;
import org.eclipse.basyx.submodel.metamodel.map.Submodel;
import org.eclipse.basyx.submodel.metamodel.map.identifier.Identifier;
import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
Expand Down Expand Up @@ -42,6 +43,8 @@ ISubmodel givenNameplate() {
Property manufactNameProp = new Property();
manufactNameProp.setIdShort("ManufactName");
manufactNameProp.setValue("Bob Manufacturer");
manufactNameProp.setKind(ModelingKind.INSTANCE);
manufactNameProp.setCategory("PARAMETER");

submodel.addSubmodelElement(manufactNameProp);
return submodel;
Expand Down

0 comments on commit 3dc181c

Please sign in to comment.