-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
203 changed files
with
86,654 additions
and
0 deletions.
There are no files selected for viewing
188 changes: 188 additions & 0 deletions
188
test_data/java/test_main/aas_core_meta.v3/expected_output/constants/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
/* | ||
* This code has been automatically generated by aas-core-codegen. | ||
* Do NOT edit or append. | ||
*/ | ||
|
||
package aas_core.aas3_0.constants; | ||
|
||
import java.util.Collections; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
import java.util.stream.Collector; | ||
import java.util.stream.Stream; | ||
|
||
import aas_core.aas3_0.types.enums.DataTypeIec61360; | ||
import aas_core.aas3_0.types.enums.KeyTypes; | ||
|
||
// Helper to generate read-only collections with less boilerplate. | ||
// See: https://stackoverflow.com/a/37406054 | ||
class ImmutableCollector { | ||
public static <T> Collector<T, Set<T>, Set<T>> toImmutableSet() { | ||
return Collector.of(HashSet::new, Set::add, (l, r) -> { | ||
l.addAll(r); | ||
return l; | ||
}, Collections::unmodifiableSet); | ||
} | ||
} | ||
|
||
/** | ||
* Provide constant values of the meta-model. | ||
*/ | ||
public class Constants { | ||
public static final Set<String> validCategoriesForDataElement = Stream.of( | ||
"CONSTANT", | ||
"PARAMETER", | ||
"VARIABLE" | ||
).collect(ImmutableCollector.toImmutableSet()); | ||
|
||
public static final Set<KeyTypes> genericFragmentKeys = Stream.of( | ||
KeyTypes.FRAGMENT_REFERENCE | ||
).collect(ImmutableCollector.toImmutableSet()); | ||
|
||
public static final Set<KeyTypes> genericGloballyIdentifiables = Stream.of( | ||
KeyTypes.GLOBAL_REFERENCE | ||
).collect(ImmutableCollector.toImmutableSet()); | ||
|
||
public static final Set<KeyTypes> aasIdentifiables = Stream.of( | ||
KeyTypes.ASSET_ADMINISTRATION_SHELL, | ||
KeyTypes.CONCEPT_DESCRIPTION, | ||
KeyTypes.IDENTIFIABLE, | ||
KeyTypes.SUBMODEL | ||
).collect(ImmutableCollector.toImmutableSet()); | ||
|
||
public static final Set<KeyTypes> aasSubmodelElementsAsKeys = Stream.of( | ||
KeyTypes.ANNOTATED_RELATIONSHIP_ELEMENT, | ||
KeyTypes.BASIC_EVENT_ELEMENT, | ||
KeyTypes.BLOB, | ||
KeyTypes.CAPABILITY, | ||
KeyTypes.DATA_ELEMENT, | ||
KeyTypes.ENTITY, | ||
KeyTypes.EVENT_ELEMENT, | ||
KeyTypes.FILE, | ||
KeyTypes.MULTI_LANGUAGE_PROPERTY, | ||
KeyTypes.OPERATION, | ||
KeyTypes.PROPERTY, | ||
KeyTypes.RANGE, | ||
KeyTypes.REFERENCE_ELEMENT, | ||
KeyTypes.RELATIONSHIP_ELEMENT, | ||
KeyTypes.SUBMODEL_ELEMENT, | ||
KeyTypes.SUBMODEL_ELEMENT_COLLECTION, | ||
KeyTypes.SUBMODEL_ELEMENT_LIST | ||
).collect(ImmutableCollector.toImmutableSet()); | ||
|
||
public static final Set<KeyTypes> aasReferableNonIdentifiables = Stream.of( | ||
KeyTypes.ANNOTATED_RELATIONSHIP_ELEMENT, | ||
KeyTypes.BASIC_EVENT_ELEMENT, | ||
KeyTypes.BLOB, | ||
KeyTypes.CAPABILITY, | ||
KeyTypes.DATA_ELEMENT, | ||
KeyTypes.ENTITY, | ||
KeyTypes.EVENT_ELEMENT, | ||
KeyTypes.FILE, | ||
KeyTypes.MULTI_LANGUAGE_PROPERTY, | ||
KeyTypes.OPERATION, | ||
KeyTypes.PROPERTY, | ||
KeyTypes.RANGE, | ||
KeyTypes.REFERENCE_ELEMENT, | ||
KeyTypes.RELATIONSHIP_ELEMENT, | ||
KeyTypes.SUBMODEL_ELEMENT, | ||
KeyTypes.SUBMODEL_ELEMENT_COLLECTION, | ||
KeyTypes.SUBMODEL_ELEMENT_LIST | ||
).collect(ImmutableCollector.toImmutableSet()); | ||
|
||
public static final Set<KeyTypes> aasReferables = Stream.of( | ||
KeyTypes.ASSET_ADMINISTRATION_SHELL, | ||
KeyTypes.CONCEPT_DESCRIPTION, | ||
KeyTypes.IDENTIFIABLE, | ||
KeyTypes.SUBMODEL, | ||
KeyTypes.ANNOTATED_RELATIONSHIP_ELEMENT, | ||
KeyTypes.BASIC_EVENT_ELEMENT, | ||
KeyTypes.BLOB, | ||
KeyTypes.CAPABILITY, | ||
KeyTypes.DATA_ELEMENT, | ||
KeyTypes.ENTITY, | ||
KeyTypes.EVENT_ELEMENT, | ||
KeyTypes.FILE, | ||
KeyTypes.MULTI_LANGUAGE_PROPERTY, | ||
KeyTypes.OPERATION, | ||
KeyTypes.PROPERTY, | ||
KeyTypes.RANGE, | ||
KeyTypes.REFERENCE_ELEMENT, | ||
KeyTypes.REFERABLE, | ||
KeyTypes.RELATIONSHIP_ELEMENT, | ||
KeyTypes.SUBMODEL_ELEMENT, | ||
KeyTypes.SUBMODEL_ELEMENT_COLLECTION, | ||
KeyTypes.SUBMODEL_ELEMENT_LIST | ||
).collect(ImmutableCollector.toImmutableSet()); | ||
|
||
public static final Set<KeyTypes> globallyIdentifiables = Stream.of( | ||
KeyTypes.GLOBAL_REFERENCE, | ||
KeyTypes.ASSET_ADMINISTRATION_SHELL, | ||
KeyTypes.CONCEPT_DESCRIPTION, | ||
KeyTypes.IDENTIFIABLE, | ||
KeyTypes.SUBMODEL | ||
).collect(ImmutableCollector.toImmutableSet()); | ||
|
||
public static final Set<KeyTypes> fragmentKeys = Stream.of( | ||
KeyTypes.ANNOTATED_RELATIONSHIP_ELEMENT, | ||
KeyTypes.BASIC_EVENT_ELEMENT, | ||
KeyTypes.BLOB, | ||
KeyTypes.CAPABILITY, | ||
KeyTypes.DATA_ELEMENT, | ||
KeyTypes.ENTITY, | ||
KeyTypes.EVENT_ELEMENT, | ||
KeyTypes.FILE, | ||
KeyTypes.FRAGMENT_REFERENCE, | ||
KeyTypes.MULTI_LANGUAGE_PROPERTY, | ||
KeyTypes.OPERATION, | ||
KeyTypes.PROPERTY, | ||
KeyTypes.RANGE, | ||
KeyTypes.REFERENCE_ELEMENT, | ||
KeyTypes.RELATIONSHIP_ELEMENT, | ||
KeyTypes.SUBMODEL_ELEMENT, | ||
KeyTypes.SUBMODEL_ELEMENT_COLLECTION, | ||
KeyTypes.SUBMODEL_ELEMENT_LIST | ||
).collect(ImmutableCollector.toImmutableSet()); | ||
|
||
public static final Set<DataTypeIec61360> dataTypeIec61360ForPropertyOrValue = Stream.of( | ||
DataTypeIec61360.DATE, | ||
DataTypeIec61360.STRING, | ||
DataTypeIec61360.STRING_TRANSLATABLE, | ||
DataTypeIec61360.INTEGER_MEASURE, | ||
DataTypeIec61360.INTEGER_COUNT, | ||
DataTypeIec61360.INTEGER_CURRENCY, | ||
DataTypeIec61360.REAL_MEASURE, | ||
DataTypeIec61360.REAL_COUNT, | ||
DataTypeIec61360.REAL_CURRENCY, | ||
DataTypeIec61360.BOOLEAN, | ||
DataTypeIec61360.RATIONAL, | ||
DataTypeIec61360.RATIONAL_MEASURE, | ||
DataTypeIec61360.TIME, | ||
DataTypeIec61360.TIMESTAMP | ||
).collect(ImmutableCollector.toImmutableSet()); | ||
|
||
public static final Set<DataTypeIec61360> dataTypeIec61360ForReference = Stream.of( | ||
DataTypeIec61360.STRING, | ||
DataTypeIec61360.IRI, | ||
DataTypeIec61360.IRDI | ||
).collect(ImmutableCollector.toImmutableSet()); | ||
|
||
public static final Set<DataTypeIec61360> dataTypeIec61360ForDocument = Stream.of( | ||
DataTypeIec61360.FILE, | ||
DataTypeIec61360.BLOB, | ||
DataTypeIec61360.HTML | ||
).collect(ImmutableCollector.toImmutableSet()); | ||
|
||
public static final Set<DataTypeIec61360> iec61360DataTypesWithUnit = Stream.of( | ||
DataTypeIec61360.INTEGER_MEASURE, | ||
DataTypeIec61360.REAL_MEASURE, | ||
DataTypeIec61360.RATIONAL_MEASURE, | ||
DataTypeIec61360.INTEGER_CURRENCY, | ||
DataTypeIec61360.REAL_CURRENCY | ||
).collect(ImmutableCollector.toImmutableSet()); | ||
} | ||
|
||
/* | ||
* This code has been automatically generated by aas-core-codegen. | ||
* Do NOT edit or append. | ||
*/ |
Oops, something went wrong.