java.lang.Object
nl.tno.omt.helpers.OmtFunctions
- Author:
- bergtwvd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int[]Parse the cardinality of an array type.static ArrayDataTypesType.ArrayDatagetArrayDataByName(ObjectModelType[] modules, String datatypeName) static ArrayDataTypesType.ArrayDatagetArrayDataByName(ObjectModelType module, String datatypeName) static ObjectModelTypegetArrayDataModule(ObjectModelType[] modules, String datatypeName) getArrayDataTypesWithEncoding(ObjectModelType[] modules, Set<String> encodings) Gets all array datatype with a given encodinggetBasicDataByName(ObjectModelType[] modules, String representationName) getBasicDataByName(ObjectModelType module, String representationName) getEnumeratedDataByName(ObjectModelType[] modules, String datatypeName) getEnumeratedDataByName(ObjectModelType module, String datatypeName) static ObjectModelTypegetEnumeratedDataModule(ObjectModelType[] modules, String datatypeName) getFixedRecordDataByName(ObjectModelType[] modules, String datatypeName) getFixedRecordDataByName(ObjectModelType module, String datatypeName) static ObjectModelTypegetFixedRecordDataModule(ObjectModelType[] modules, String datatypeName) static InteractionClassgetInteractionClass(ObjectModelType[] modules, String fqName) static InteractionClassgetInteractionClass(ObjectModelType[] modules, String fqName, boolean nullOnScaffolding) static InteractionClassgetInteractionClass(ObjectModelType module, String fqName) static InteractionClassgetInteractionClass(ObjectModelType module, String fqName, boolean nullOnScaffolding) Looks up the InteractionClass for the given FQ OMT name.static ObjectModelTypegetInteractionClassModule(ObjectModelType[] modules, String fqName) static ObjectModelTypegetInteractionClassModule(ObjectModelType[] modules, String fqName, boolean nullOnScaffolding) getInteractionClassParameters(ObjectModelType[] modules, String fqName) static ObjectClassgetObjectClass(ObjectModelType[] modules, String fqName) static ObjectClassgetObjectClass(ObjectModelType[] modules, String fqName, boolean nullOnScaffolding) static ObjectClassgetObjectClass(ObjectModelType module, String fqName) static ObjectClassgetObjectClass(ObjectModelType module, String fqName, boolean nullOnScaffolding) Looks up the ObjectClass for the given FQ OMT name.getObjectClassAttributes(ObjectModelType[] modules, String fqName) static ObjectModelTypegetObjectClassModule(ObjectModelType[] modules, String fqName) static ObjectModelTypegetObjectClassModule(ObjectModelType[] modules, String fqName, boolean nullOnScaffolding) getSimpleDataByName(ObjectModelType[] modules, String datatypeName) getSimpleDataByName(ObjectModelType module, String datatypeName) static ObjectModelTypegetSimpleDataModule(ObjectModelType[] modules, String datatypeName) getTransportationByName(ObjectModelType module, String value) getVariantRecordDataByName(ObjectModelType[] modules, String datatypeName) getVariantRecordDataByName(ObjectModelType module, String datatypeName) static ObjectModelTypegetVariantRecordDataModule(ObjectModelType[] modules, String datatypeName) static booleanstatic booleanstatic ObjectModelTypereadOmt(InputStream input) static ObjectModelTypestatic ObjectModelTypestatic FilewriteOmt(ObjectModelType omt, File output) static FilewriteOmt(ObjectModelType omt, File output, boolean formatted) static OutputStreamwriteOmt(ObjectModelType omt, OutputStream output) static OutputStreamwriteOmt(ObjectModelType omt, OutputStream output, boolean formatted) static WriterwriteOmt(ObjectModelType omt, Writer output) static WriterwriteOmt(ObjectModelType omt, Writer output, boolean formatted)
-
Constructor Details
-
OmtFunctions
public OmtFunctions()
-
-
Method Details
-
readOmt
- Throws:
IOException
-
readOmt
- Throws:
IOException
-
readOmt
- Throws:
IOException
-
writeOmt
public static Writer writeOmt(ObjectModelType omt, Writer output, boolean formatted) throws IOException - Throws:
IOException
-
writeOmt
- Throws:
IOException
-
writeOmt
- Throws:
IOException
-
writeOmt
- Throws:
IOException
-
writeOmt
public static OutputStream writeOmt(ObjectModelType omt, OutputStream output, boolean formatted) throws IOException - Throws:
IOException
-
writeOmt
- Throws:
IOException
-
isScaffoldingClass
-
isScaffoldingClass
-
getObjectClassModule
-
getObjectClassModule
public static ObjectModelType getObjectClassModule(ObjectModelType[] modules, String fqName, boolean nullOnScaffolding) -
getObjectClass
-
getObjectClass
public static ObjectClass getObjectClass(ObjectModelType[] modules, String fqName, boolean nullOnScaffolding) -
getObjectClass
-
getObjectClass
public static ObjectClass getObjectClass(ObjectModelType module, String fqName, boolean nullOnScaffolding) Looks up the ObjectClass for the given FQ OMT name. The returned value is an ObjectClass or null if none found. The returned ObjectClass may be a non-null scaffolding class, depending in the setting of nullOnScaffolding. If nullOnScaffolding is true then a null value is returned if the found ObjectClass is a scaffolding class, otherwise the found ObjectClass is returned.- Parameters:
module- : module to searchfqName- : FQ OMT namenullOnScaffolding- : setting for scaffolding classes- Returns:
- the ObjectClass or null
-
getObjectClassAttributes
-
getInteractionClassModule
-
getInteractionClassModule
public static ObjectModelType getInteractionClassModule(ObjectModelType[] modules, String fqName, boolean nullOnScaffolding) -
getInteractionClass
-
getInteractionClass
public static InteractionClass getInteractionClass(ObjectModelType[] modules, String fqName, boolean nullOnScaffolding) -
getInteractionClass
-
getInteractionClass
public static InteractionClass getInteractionClass(ObjectModelType module, String fqName, boolean nullOnScaffolding) Looks up the InteractionClass for the given FQ OMT name. The returned value is an InteractionClass or null if none found. The returned InteractionClass may be a non-null scaffolding class, depending in the setting of nullOnScaffolding. If nullOnScaffolding is true then a null value is returned if the found InteractionClass is a scaffolding class, otherwise the found InteractionClass is returned.- Parameters:
module- : module to searchfqName- : FQ OMT namenullOnScaffolding- : setting for scaffolding classes- Returns:
- the ObjectClass or null
-
getInteractionClassParameters
public static Set<Parameter> getInteractionClassParameters(ObjectModelType[] modules, String fqName) -
getBasicDataByName
public static BasicDataRepresentationsType.BasicData getBasicDataByName(ObjectModelType[] modules, String representationName) -
getBasicDataByName
public static BasicDataRepresentationsType.BasicData getBasicDataByName(ObjectModelType module, String representationName) -
getSimpleDataModule
-
getSimpleDataByName
public static SimpleDataTypesType.SimpleData getSimpleDataByName(ObjectModelType[] modules, String datatypeName) -
getSimpleDataByName
public static SimpleDataTypesType.SimpleData getSimpleDataByName(ObjectModelType module, String datatypeName) -
getFixedRecordDataModule
public static ObjectModelType getFixedRecordDataModule(ObjectModelType[] modules, String datatypeName) -
getFixedRecordDataByName
public static FixedRecordDataTypesType.FixedRecordData getFixedRecordDataByName(ObjectModelType[] modules, String datatypeName) -
getFixedRecordDataByName
public static FixedRecordDataTypesType.FixedRecordData getFixedRecordDataByName(ObjectModelType module, String datatypeName) -
getVariantRecordDataModule
public static ObjectModelType getVariantRecordDataModule(ObjectModelType[] modules, String datatypeName) -
getVariantRecordDataByName
public static VariantRecordDataTypesType.VariantRecordData getVariantRecordDataByName(ObjectModelType[] modules, String datatypeName) -
getVariantRecordDataByName
public static VariantRecordDataTypesType.VariantRecordData getVariantRecordDataByName(ObjectModelType module, String datatypeName) -
getEnumeratedDataModule
public static ObjectModelType getEnumeratedDataModule(ObjectModelType[] modules, String datatypeName) -
getEnumeratedDataByName
public static EnumeratedDataTypesType.EnumeratedData getEnumeratedDataByName(ObjectModelType[] modules, String datatypeName) -
getEnumeratedDataByName
public static EnumeratedDataTypesType.EnumeratedData getEnumeratedDataByName(ObjectModelType module, String datatypeName) -
getArrayDataModule
-
getArrayDataByName
public static ArrayDataTypesType.ArrayData getArrayDataByName(ObjectModelType[] modules, String datatypeName) -
getArrayDataByName
public static ArrayDataTypesType.ArrayData getArrayDataByName(ObjectModelType module, String datatypeName) -
getTransportationByName
public static TransportationsType.Transportation getTransportationByName(ObjectModelType module, String value) -
geCardinality
Parse the cardinality of an array type. Syntax is: '[''..' ']' | | 'Dynamic' - Parameters:
dt- Array datatype- Returns:
- cardinality (>= 0) or null on error
-
getArrayDataTypesWithEncoding
public static Set<String> getArrayDataTypesWithEncoding(ObjectModelType[] modules, Set<String> encodings) Gets all array datatype with a given encoding- Parameters:
modules- : modules to be searchedencodings- : set of encodings to look for- Returns:
-