Class AasType
java.lang.Object
de.iip_ecosphere.platform.configuration.aas.AbstractAasElement
de.iip_ecosphere.platform.configuration.aas.AasType
Represents an AAS type, i.e., Submodel, SubmodelElementCollection, Entity.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate AasType.EntityTypeprivate booleanprivate booleanprivate booleanprivate List<AasOperation> private booleanprivate Stringstatic final Stringprivate AasSmeType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidAdds a field.(package private) voidaddOperation(AasOperation operation) Adds an operation.fields()Returns the fields of this type.Returns the entity type.intThe number of fields declared for this type.getMappedSemanticId(String idShort) In case ofisAspect(), return a specific/mapped semanticId for the given type via itsidShort.intThe number of operations declared for this type.The name of the parent.Returns the SME type.booleanReturns whether this type has fields.booleanReturns whether an AAS shall be the parent of the this type.booleanReturns whether duplicates are allowed within the type.booleanisAspect()Returns whether this type is an aspect (of it'sAbstractAasElement.getIdShort()).booleanReturns whether the idShort shall always be stated as given.(package private) booleanReturns whether the given field is the last one infields().booleanReturns whether the type is multi-valued (with counting idShort).booleanReturns whether elements within the type are ordered.Returns the operations of this type.(package private) voidsetAllowDuplicates(boolean allowDuplicates) Defines whether duplicates are allowed within the type.(package private) voidsetAspect(boolean isAspect) Changes the aspect flag.(package private) voidsetEntityType(AasType.EntityType entityType) Sets the entity type.(package private) voidsetMappedSemanticIds(Map<String, String> mappedSemanticIds) In case ofisAspect(), set specific semanticIds per type.(package private) voidsetOrdered(boolean ordered) Defines whether elements within the type are ordered.(package private) voidSets name of the parent, usually a submodel element collection, may bePARENT_AAS.(package private) voidsetSmeType(AasSmeType smeType) Defines the SME type.toString()Methods inherited from class de.iip_ecosphere.platform.configuration.aas.AbstractAasElement
getDescription, getDisplayName, getIdShort, getIsCaseOf, getSemanticId, hasMultiSemanticIds, isGeneric, setDescription, setDisplayName, setGeneric, setIdShort, setIsCaseOf, setMultiSemanticIds, setSemanticId
-
Field Details
-
PARENT_AAS
- See Also:
-
allowDuplicates
private boolean allowDuplicates -
ordered
private boolean ordered -
fixedIdShort
private boolean fixedIdShort -
isMultiValued
private boolean isMultiValued -
smeType
-
parent
-
fields
-
operations
-
entityType
-
isAspect
private boolean isAspect -
mappedSemanticIds
-
-
Constructor Details
-
AasType
Creates an AAS type.- Parameters:
idShort- the idShort of the type without multi-value counting suffix.fixedIdShort- whether the idShort shall always be stated as givenisMultiValued- whether the type is multi-valued (with counting idShort)
-
AasType
AasType(AasType type) Creates a new instance by deepely copyingtype.- Parameters:
type- the type
-
-
Method Details
-
isFixedIdShort
public boolean isFixedIdShort()Returns whether the idShort shall always be stated as given.- Returns:
trueif the idShort shall always be stated as given,falseelse
-
isMultiValued
public boolean isMultiValued()Returns whether the type is multi-valued (with counting idShort).- Returns:
trueif the type is multi-valued,falseelse
-
isAllowDuplicates
public boolean isAllowDuplicates()Returns whether duplicates are allowed within the type.- Returns:
truefor duplicates,falseelse
-
isAspect
public boolean isAspect()Returns whether this type is an aspect (of it'sAbstractAasElement.getIdShort()).- Returns:
- whether this type is an aspect (of it's
AbstractAasElement.getIdShort()) or not.
-
setAspect
void setAspect(boolean isAspect) Changes the aspect flag.- Parameters:
isAspect- whether this type is an aspect (of it'sAbstractAasElement.getIdShort()) or not.
-
setAllowDuplicates
void setAllowDuplicates(boolean allowDuplicates) Defines whether duplicates are allowed within the type.- Parameters:
allowDuplicates-truefor duplicates,falseelse
-
isOrdered
public boolean isOrdered()Returns whether elements within the type are ordered.- Returns:
truefor ordered,falseelse
-
setOrdered
void setOrdered(boolean ordered) Defines whether elements within the type are ordered.- Parameters:
ordered-truefor ordered,falseelse
-
setEntityType
Sets the entity type.- Parameters:
entityType- the entity type
-
getEntityType
Returns the entity type.- Returns:
- the entity type
-
getSmeType
Returns the SME type.- Returns:
- the SME type
-
setSmeType
Defines the SME type.- Parameters:
smeType- the SME type
-
setParent
Sets name of the parent, usually a submodel element collection, may bePARENT_AAS.- Parameters:
parent- the parent, may bePARENT_AASto indicate an unspecified AAS as parent- See Also:
-
getParent
The name of the parent.- Returns:
- the parent, may be
PARENT_AAS - See Also:
-
isAasParent
public boolean isAasParent()Returns whether an AAS shall be the parent of the this type.- Returns:
truefor AAS,falseelse- See Also:
-
addOperation
Adds an operation.- Parameters:
operation- the operation to be added (may be null, ignored then)
-
addField
Adds a field.- Parameters:
field- the field to be added (may be null, ignored then)
-
fields
Returns the fields of this type.- Returns:
- the fields
-
hasFields
public boolean hasFields()Returns whether this type has fields.- Returns:
trueif there are fields,falseelse
-
getFieldsCount
public int getFieldsCount()The number of fields declared for this type.- Returns:
- the number of fields
-
operations
Returns the operations of this type.- Returns:
- the operations
-
getOperationsCount
public int getOperationsCount()The number of operations declared for this type.- Returns:
- the number of operations
-
isLast
Returns whether the given field is the last one infields().- Parameters:
field- the field- Returns:
truefor the last one,falseelse
-
setMappedSemanticIds
In case ofisAspect(), set specific semanticIds per type. Sets the given value if there were no mapped semantic ids before, else merges them into the existing ones.- Parameters:
mappedSemanticIds- the mapped semantic IDs
-
getMappedSemanticId
In case ofisAspect(), return a specific/mapped semanticId for the given type via itsidShort.- Parameters:
idShort- the target idShort- Returns:
- the specific/mapped semantic id or null for none
-
toString
- Overrides:
toStringin classAbstractAasElement
-