use of opc.i4aas.AASModelingKindDataType in project FAAAST-Service by FraunhoferIOSB.
the class ValueConverter method convertModelingKind.
/**
* Converts the given ModelingKind to the corresponding
* AASModelingKindDataType.
*
* @param value the desired ModelingKind
* @return The corresponding AASModelingKindDataType
*/
public static AASModelingKindDataType convertModelingKind(ModelingKind value) {
AASModelingKindDataType retval;
if (value == null) {
logger.warn("convertModelingKind: value == null");
retval = AASModelingKindDataType.Instance;
} else {
switch(value) {
case INSTANCE:
retval = AASModelingKindDataType.Instance;
break;
case TEMPLATE:
retval = AASModelingKindDataType.Template;
break;
default:
logger.warn("convertModelingKind: unknown value " + value);
throw new IllegalArgumentException("unknown ModelingKind: " + value);
}
}
return retval;
}
use of opc.i4aas.AASModelingKindDataType in project FAAAST-Service by FraunhoferIOSB.
the class AASSubmodelElementTypeNodeBase method getModelingKind.
@Mandatory
@Override
public AASModelingKindDataType getModelingKind() {
UaVariable node = getModelingKindNode();
if (node == null) {
throw new RuntimeException("Mandatory node ModelingKind does not exist");
}
Variant value = node.getValue().getValue();
return (AASModelingKindDataType) value.asEnum(AASModelingKindDataType.class);
}
use of opc.i4aas.AASModelingKindDataType in project FAAAST-Service by FraunhoferIOSB.
the class AASSubmodelTypeImplBase method getModelingKind.
@Mandatory
@Override
public AASModelingKindDataType getModelingKind() {
UaVariable node = getModelingKindNode();
if (node == null) {
return null;
}
Variant value = node.getValue().getValue();
return (AASModelingKindDataType) value.asEnum(AASModelingKindDataType.class);
}
use of opc.i4aas.AASModelingKindDataType in project FAAAST-Service by FraunhoferIOSB.
the class AASSubmodelElementTypeImplBase method getModelingKind.
@Mandatory
@Override
public AASModelingKindDataType getModelingKind() {
UaVariable node = getModelingKindNode();
if (node == null) {
return null;
}
Variant value = node.getValue().getValue();
return (AASModelingKindDataType) value.asEnum(AASModelingKindDataType.class);
}
use of opc.i4aas.AASModelingKindDataType in project FAAAST-Service by FraunhoferIOSB.
the class AASSubmodelTypeNodeBase method getModelingKind.
@Mandatory
@Override
public AASModelingKindDataType getModelingKind() {
UaVariable node = getModelingKindNode();
if (node == null) {
throw new RuntimeException("Mandatory node ModelingKind does not exist");
}
Variant value = node.getValue().getValue();
return (AASModelingKindDataType) value.asEnum(AASModelingKindDataType.class);
}
Aggregations