Class Verification
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandataSpecificationIec61360sForDocumentHaveAppropriateDataType(Iterable<? extends IEmbeddedDataSpecification> embeddedDataSpecifications) Check that thedataTypeis defined appropriately for all data specifications whose content is given as IEC 61360.static booleandataSpecificationIec61360sForPropertyOrValueHaveAppropriateDataType(Iterable<? extends IEmbeddedDataSpecification> embeddedDataSpecifications) Check that thedataTypeis defined appropriately for all data specifications whose content is given as IEC 61360.static booleandataSpecificationIec61360sForReferenceHaveAppropriateDataType(Iterable<? extends IEmbeddedDataSpecification> embeddedDataSpecifications) Check that thedataTypeis defined appropriately for all data specifications whose content is given as IEC 61360.static booleandataSpecificationIec61360sHaveDataType(Iterable<? extends IEmbeddedDataSpecification> embeddedDataSpecifications) Check that thedataTypeis defined for all data specifications whose content is given as IEC 61360.static booleandataSpecificationIec61360sHaveDefinitionAtLeastInEnglish(Iterable<? extends IEmbeddedDataSpecification> embeddedDataSpecifications) Check that thedefinitionis defined for all data specifications whose content is given as IEC 61360 at least in English.static booleandataSpecificationIec61360sHaveValue(Iterable<? extends IEmbeddedDataSpecification> embeddedDataSpecifications) Check that thevalueis defined for all data specifications whose content is given as IEC 61360.static booleanextensionNamesAreUnique(Iterable<? extends IExtension> extensions) Check that allnameare unique among extensions.static booleanidShortsAreUnique(Iterable<? extends IReferable> referables) Check that allidShortare unique among referables.static booleanidShortsOfVariablesAreUnique(Iterable<? extends IOperationVariable> inputVariables, Iterable<? extends IOperationVariable> outputVariables, Iterable<? extends IOperationVariable> inoutputVariables) Check that allidShort's are among all the inputVariables, outputVariables and inoutputVariables are unique.static BooleanisBcp47ForEnglish(String text) Check that thetextcorresponds to a BCP47 code for english.static booleanisLeapYear(BigInteger year) Check whether the given year is a leap year.static BooleanisModelReferenceTo(IReference reference, KeyTypes expectedType) Check that the target of the model reference matches theexpectedType.static BooleanisModelReferenceToReferable(IReference reference) Check that the target of the reference matches aConstants.aasReferables.static booleanisXsDateTime(String value) Check that value is a xs:dateTime with the time zone set to UTC.static booleanisXsDateTimeUtc(String value) Check that value is a xs:dateTime with the time zone set to UTC.static booleanlangStringsHaveUniqueLanguages(Iterable<? extends IAbstractLangString> langStrings) Check thatlangStringsare specified each for a unique language.static BooleanmatchesBcp47(String text) Check thattextis a valid BCP 47 language tag.static BooleanmatchesIdShort(String text) Check thattextis a valid short ID.static BooleanmatchesMimeType(String text) Check thattextconforms to the pattern of MIME type.static BooleanmatchesRevisionType(String text) Check thattextis a valid revision string.static BooleanmatchesRfc2396(String text) Check thattextmatches to the URI pattern defined in RFC 2396static BooleanmatchesVersionType(String text) Check thattextis a valid version string.static BooleanCheck thattextconforms to the pattern of the Constraint AASd-130.static BooleanmatchesXsAnyUri(String text) Check thattextconforms to the pattern of anxs:anyURI.static BooleanmatchesXsBase64Binary(String text) Check thattextconforms to the pattern of anxs:base64Binary.static BooleanmatchesXsBoolean(String text) Check thattextconforms to the pattern of anxs:boolean.static BooleanmatchesXsByte(String text) Check thattextconforms to the pattern of anxs:byte.static BooleanmatchesXsDate(String text) Check thattextconforms to the pattern of anxs:date.static BooleanmatchesXsDateTime(String text) Check thattextconforms to the pattern of anxs:dateTime.static BooleanmatchesXsDateTimeUtc(String text) Check thattextconforms to the pattern of anxs:dateTime.static BooleanmatchesXsDecimal(String text) Check thattextconforms to the pattern of anxs:decimal.static BooleanmatchesXsDouble(String text) Check thattextconforms to the pattern of anxs:double.static BooleanmatchesXsDuration(String text) Check thattextconforms to the pattern of anxs:duration.static BooleanmatchesXsFloat(String text) Check thattextconforms to the pattern of anxs:float.static BooleanmatchesXsGDay(String text) Check thattextconforms to the pattern of anxs:gDay.static BooleanmatchesXsGMonth(String text) Check thattextconforms to the pattern of anxs:gMonth.static BooleanmatchesXsGMonthDay(String text) Check thattextconforms to the pattern of anxs:gMonthDay.static BooleanmatchesXsGYear(String text) Check thattextconforms to the pattern of anxs:gYear.static BooleanmatchesXsGYearMonth(String text) Check thattextconforms to the pattern of anxs:gYearMonth.static BooleanmatchesXsHexBinary(String text) Check thattextconforms to the pattern of anxs:hexBinary.static BooleanmatchesXsInt(String text) Check thattextconforms to the pattern of anxs:int.static BooleanmatchesXsInteger(String text) Check thattextconforms to the pattern of anxs:integer.static BooleanmatchesXsLong(String text) Check thattextconforms to the pattern of anxs:long.static BooleanCheck thattextconforms to the pattern of anxs:negativeInteger.static BooleanCheck thattextconforms to the pattern of anxs:nonNegativeInteger.static BooleanCheck thattextconforms to the pattern of anxs:nonPositiveInteger.static BooleanCheck thattextconforms to the pattern of anxs:positiveInteger.static BooleanmatchesXsShort(String text) Check thattextconforms to the pattern of anxs:short.static BooleanmatchesXsString(String text) Check thattextconforms to the pattern of anxs:string.static BooleanmatchesXsTime(String text) Check thattextconforms to the pattern of anxs:time.static BooleanmatchesXsUnsignedByte(String text) Check thattextconforms to the pattern of anxs:unsignedByte.static BooleanmatchesXsUnsignedInt(String text) Check thattextconforms to the pattern of anxs:unsignedInt.static BooleanmatchesXsUnsignedLong(String text) Check thattextconforms to the pattern of anxs:unsignedLong.static BooleanmatchesXsUnsignedShort(String text) Check thattextconforms to the pattern of anxs:unsignedShort.static booleanpropertiesOrRangesHaveValueType(Iterable<? extends ISubmodelElement> elements, DataTypeDefXsd valueType) static booleanqualifierTypesAreUnique(Iterable<IQualifier> qualifiers) Check that there are no duplicatetype's in the qualifiers.static booleanreferenceKeyValuesEqual(IReference that, IReference other) static booleansubmodelElementIsOfType(ISubmodelElement element, AasSubmodelElements expectedType) static booleansubmodelElementsHaveIdenticalSemanticIds(Iterable<? extends ISubmodelElement> elements) Check that all elements have the identicalsemanticId's.static booleanvalueConsistentWithXsdType(String value, DataTypeDefXsd valueType) Check that the value is consistent with the given valueType.static Iterable<Reporting.Error> Verify the constraints ofthatrecursively.static Stream<Reporting.Error> Verify thatthatis a valid enumeration value.static Stream<Reporting.Error> verifyAssetKind(AssetKind that) Verify thatthatis a valid enumeration value.static Stream<Reporting.Error> verifyBcp47LanguageTag(String that) Verify the constraints ofthat.static Stream<Reporting.Error> verifyBlobType(byte[] that) Verify the constraints ofthat.static Stream<Reporting.Error> verifyContentType(String that) Verify the constraints ofthat.static Stream<Reporting.Error> Verify thatthatis a valid enumeration value.static Stream<Reporting.Error> Verify thatthatis a valid enumeration value.static Stream<Reporting.Error> verifyDateTimeUtc(String that) Verify the constraints ofthat.static Stream<Reporting.Error> verifyDirection(Direction that) Verify thatthatis a valid enumeration value.static Stream<Reporting.Error> verifyDuration(String that) Verify the constraints ofthat.static Stream<Reporting.Error> verifyEntityType(EntityType that) Verify thatthatis a valid enumeration value.static Stream<Reporting.Error> verifyIdentifier(String that) Verify the constraints ofthat.static Stream<Reporting.Error> verifyIdShortType(String that) Verify the constraints ofthat.static Stream<Reporting.Error> verifyKeyTypes(KeyTypes that) Verify thatthatis a valid enumeration value.static Stream<Reporting.Error> verifyLabelType(String that) Verify the constraints ofthat.static Stream<Reporting.Error> verifyMessageTopicType(String that) Verify the constraints ofthat.static Stream<Reporting.Error> Verify thatthatis a valid enumeration value.static Stream<Reporting.Error> verifyNameType(String that) Verify the constraints ofthat.static Stream<Reporting.Error> Verify the constraints ofthat.static Stream<Reporting.Error> verifyPathType(String that) Verify the constraints ofthat.static Stream<Reporting.Error> Verify thatthatis a valid enumeration value.static Stream<Reporting.Error> verifyQualifierType(String that) Verify the constraints ofthat.static Stream<Reporting.Error> Verify thatthatis a valid enumeration value.static Stream<Reporting.Error> verifyRevisionType(String that) Verify the constraints ofthat.static Stream<Reporting.Error> Verify thatthatis a valid enumeration value.static Stream<Reporting.Error> verifyToErrorStream(IClass that) static Stream<Reporting.Error> verifyValueDataType(String that) Verify the constraints ofthat.static Stream<Reporting.Error> Verify the constraints ofthat.static Stream<Reporting.Error> verifyVersionType(String that) Verify the constraints ofthat.static Stream<Reporting.Error> Verify the constraints ofthat.
-
Constructor Details
-
Verification
public Verification()
-
-
Method Details
-
matchesIdShort
Check thattextis a valid short ID. -
matchesVersionType
Check thattextis a valid version string. -
matchesRevisionType
Check thattextis a valid revision string. -
matchesXsDateTimeUtc
Check thattextconforms to the pattern of anxs:dateTime.The time zone must be fixed to UTC. We verify only that the
textmatches a pre-defined pattern. We do not verify that the day of month is correct nor do we check for leap seconds.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
isXsDateTimeUtc
Check that value is a xs:dateTime with the time zone set to UTC.- Parameters:
value- the value to check
-
matchesMimeType
Check thattextconforms to the pattern of MIME type.The definition has been taken from: https://www.rfc-editor.org/rfc/rfc7231#section-3.1.1.1, https://www.rfc-editor.org/rfc/rfc7230#section-3.2.3 and https://www.rfc-editor.org/rfc/rfc7230#section-3.2.6.
- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesRfc2396
Check thattextmatches to the URI pattern defined in RFC 2396The definition has been taken from: https://datatracker.ietf.org/doc/html/rfc2396
Note that RFX 2396 alone is not enough for specifying
xs:anyURIfor XSD version 1.0, as that specifies URI together with the amendment of RFC 2732.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesBcp47
Check thattextis a valid BCP 47 language tag. -
langStringsHaveUniqueLanguages
public static boolean langStringsHaveUniqueLanguages(Iterable<? extends IAbstractLangString> langStrings) Check thatlangStringsare specified each for a unique language.- Parameters:
langStrings- the langStrings.
-
qualifierTypesAreUnique
Check that there are no duplicatetype's in the qualifiers.- Parameters:
qualifiers- the qualifiers
-
matchesXmlSerializableString
Check thattextconforms to the pattern of the Constraint AASd-130.Ensures that encoding is possible and interoperability between different serializations is possible.
- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsAnyUri
Check thattextconforms to the pattern of anxs:anyURI.See: https://www.w3.org/TR/xmlschema-2/#anyURI and https://datatracker.ietf.org/doc/html/rfc3987
- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsBase64Binary
Check thattextconforms to the pattern of anxs:base64Binary.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsBoolean
Check thattextconforms to the pattern of anxs:boolean.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsDate
- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsDateTime
Check thattextconforms to the pattern of anxs:dateTime.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
isLeapYear
Check whether the given year is a leap year. Year 1 BCE is a leap year.- Parameters:
year- to be checked- Returns:
- True if 'year' is a leap year
-
isXsDateTime
Check that value is a xs:dateTime with the time zone set to UTC.- Parameters:
value- to check
-
matchesXsDecimal
Check thattextconforms to the pattern of anxs:decimal.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsDouble
Check thattextconforms to the pattern of anxs:double.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsDuration
Check thattextconforms to the pattern of anxs:duration.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsFloat
Check thattextconforms to the pattern of anxs:float.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsGDay
- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsGMonth
Check thattextconforms to the pattern of anxs:gMonth.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsGMonthDay
Check thattextconforms to the pattern of anxs:gMonthDay.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsGYear
Check thattextconforms to the pattern of anxs:gYear.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsGYearMonth
Check thattextconforms to the pattern of anxs:gYearMonth.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsHexBinary
Check thattextconforms to the pattern of anxs:hexBinary.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsTime
- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsInteger
Check thattextconforms to the pattern of anxs:integer.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsLong
- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsInt
- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsShort
Check thattextconforms to the pattern of anxs:short.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsByte
- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsNonNegativeInteger
Check thattextconforms to the pattern of anxs:nonNegativeInteger.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsPositiveInteger
Check thattextconforms to the pattern of anxs:positiveInteger.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsUnsignedLong
Check thattextconforms to the pattern of anxs:unsignedLong.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsUnsignedInt
Check thattextconforms to the pattern of anxs:unsignedInt.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsUnsignedShort
Check thattextconforms to the pattern of anxs:unsignedShort.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsUnsignedByte
Check thattextconforms to the pattern of anxs:unsignedByte.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsNonPositiveInteger
Check thattextconforms to the pattern of anxs:nonPositiveInteger.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsNegativeInteger
Check thattextconforms to the pattern of anxs:negativeInteger.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
matchesXsString
Check thattextconforms to the pattern of anxs:string.- Parameters:
text- Text to be checked- Returns:
- True if the
textconforms to the pattern
-
valueConsistentWithXsdType
Check that the value is consistent with the given valueType.- Parameters:
value- the value to checkvalueType- the value type
-
isModelReferenceTo
Check that the target of the model reference matches theexpectedType. -
isModelReferenceToReferable
Check that the target of the reference matches aConstants.aasReferables. -
idShortsAreUnique
Check that allidShortare unique among referables.- Parameters:
referables- the referables.
-
idShortsOfVariablesAreUnique
public static boolean idShortsOfVariablesAreUnique(Iterable<? extends IOperationVariable> inputVariables, Iterable<? extends IOperationVariable> outputVariables, Iterable<? extends IOperationVariable> inoutputVariables) Check that allidShort's are among all the inputVariables, outputVariables and inoutputVariables are unique.- Parameters:
inputVariables- the inputVariablesoutputVariables- the outputVariablesinoutputVariables- the inoutputVariables
-
extensionNamesAreUnique
Check that allnameare unique among extensions.- Parameters:
extensions- the extensions
-
submodelElementsHaveIdenticalSemanticIds
public static boolean submodelElementsHaveIdenticalSemanticIds(Iterable<? extends ISubmodelElement> elements) Check that all elements have the identicalsemanticId's. -
submodelElementIsOfType
public static boolean submodelElementIsOfType(ISubmodelElement element, AasSubmodelElements expectedType) -
propertiesOrRangesHaveValueType
public static boolean propertiesOrRangesHaveValueType(Iterable<? extends ISubmodelElement> elements, DataTypeDefXsd valueType) - Parameters:
elements- the elements.valueType- the valueType.
-
referenceKeyValuesEqual
-
dataSpecificationIec61360sForPropertyOrValueHaveAppropriateDataType
public static boolean dataSpecificationIec61360sForPropertyOrValueHaveAppropriateDataType(Iterable<? extends IEmbeddedDataSpecification> embeddedDataSpecifications) Check that thedataTypeis defined appropriately for all data specifications whose content is given as IEC 61360. -
dataSpecificationIec61360sForReferenceHaveAppropriateDataType
public static boolean dataSpecificationIec61360sForReferenceHaveAppropriateDataType(Iterable<? extends IEmbeddedDataSpecification> embeddedDataSpecifications) Check that thedataTypeis defined appropriately for all data specifications whose content is given as IEC 61360. -
dataSpecificationIec61360sForDocumentHaveAppropriateDataType
public static boolean dataSpecificationIec61360sForDocumentHaveAppropriateDataType(Iterable<? extends IEmbeddedDataSpecification> embeddedDataSpecifications) Check that thedataTypeis defined appropriately for all data specifications whose content is given as IEC 61360. -
dataSpecificationIec61360sHaveDataType
public static boolean dataSpecificationIec61360sHaveDataType(Iterable<? extends IEmbeddedDataSpecification> embeddedDataSpecifications) Check that thedataTypeis defined for all data specifications whose content is given as IEC 61360. -
dataSpecificationIec61360sHaveValue
public static boolean dataSpecificationIec61360sHaveValue(Iterable<? extends IEmbeddedDataSpecification> embeddedDataSpecifications) Check that thevalueis defined for all data specifications whose content is given as IEC 61360. -
dataSpecificationIec61360sHaveDefinitionAtLeastInEnglish
public static boolean dataSpecificationIec61360sHaveDefinitionAtLeastInEnglish(Iterable<? extends IEmbeddedDataSpecification> embeddedDataSpecifications) Check that thedefinitionis defined for all data specifications whose content is given as IEC 61360 at least in English. -
isBcp47ForEnglish
Check that thetextcorresponds to a BCP47 code for english. -
verifyToErrorStream
-
verify
Verify the constraints ofthatrecursively.- Parameters:
that- The instance of the meta-model to be verified
-
verifyXmlSerializableString
Verify the constraints ofthat. -
verifyNonEmptyXmlSerializableString
Verify the constraints ofthat. -
verifyDateTimeUtc
Verify the constraints ofthat. -
verifyDuration
Verify the constraints ofthat. -
verifyBlobType
Verify the constraints ofthat. -
verifyIdentifier
Verify the constraints ofthat. -
verifyValueTypeIec61360
Verify the constraints ofthat. -
verifyNameType
Verify the constraints ofthat. -
verifyVersionType
Verify the constraints ofthat. -
verifyRevisionType
Verify the constraints ofthat. -
verifyLabelType
Verify the constraints ofthat. -
verifyMessageTopicType
Verify the constraints ofthat. -
verifyBcp47LanguageTag
Verify the constraints ofthat. -
verifyContentType
Verify the constraints ofthat. -
verifyPathType
Verify the constraints ofthat. -
verifyQualifierType
Verify the constraints ofthat. -
verifyValueDataType
Verify the constraints ofthat. -
verifyIdShortType
Verify the constraints ofthat. -
verifyModellingKind
Verify thatthatis a valid enumeration value. -
verifyQualifierKind
Verify thatthatis a valid enumeration value. -
verifyAssetKind
Verify thatthatis a valid enumeration value. -
verifyAasSubmodelElements
Verify thatthatis a valid enumeration value. -
verifyEntityType
Verify thatthatis a valid enumeration value. -
verifyDirection
Verify thatthatis a valid enumeration value. -
verifyStateOfEvent
Verify thatthatis a valid enumeration value. -
verifyReferenceTypes
Verify thatthatis a valid enumeration value. -
verifyKeyTypes
Verify thatthatis a valid enumeration value. -
verifyDataTypeDefXsd
Verify thatthatis a valid enumeration value. -
verifyDataTypeIec61360
Verify thatthatis a valid enumeration value.
-