Skip to content

Commit

Permalink
Add Java test data
Browse files Browse the repository at this point in the history
  • Loading branch information
empwilli committed Mar 26, 2024
1 parent 484d088 commit 4d26699
Show file tree
Hide file tree
Showing 203 changed files with 86,654 additions and 0 deletions.
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.
*/
Loading

0 comments on commit 4d26699

Please sign in to comment.