mxdocgen
Version:
A small tool that mimics the documentation generation capabilities offered in Mendix Studio Pro, but with greater flexibility. It uses the Mendix Model SDK to extract information from a Mendix model, which is then fed into a set of templates to generate
95 lines • 5.03 kB
JavaScript
exports.__esModule = true;
var mendixmodelsdk_1 = require("mendixmodelsdk");
var BinaryAttributeType = mendixmodelsdk_1.domainmodels.BinaryAttributeType;
var AutoNumberAttributeType = mendixmodelsdk_1.domainmodels.AutoNumberAttributeType;
var BooleanAttributeType = mendixmodelsdk_1.domainmodels.BooleanAttributeType;
var CurrencyAttributeType = mendixmodelsdk_1.domainmodels.CurrencyAttributeType;
var DateTimeAttributeType = mendixmodelsdk_1.domainmodels.DateTimeAttributeType;
var LongAttributeType = mendixmodelsdk_1.domainmodels.LongAttributeType;
var StringAttributeType = mendixmodelsdk_1.domainmodels.StringAttributeType;
var DecimalAttributeType = mendixmodelsdk_1.domainmodels.DecimalAttributeType;
var IntegerAttributeTypeBase = mendixmodelsdk_1.domainmodels.IntegerAttributeTypeBase;
var DecimalAttributeTypeBase = mendixmodelsdk_1.domainmodels.DecimalAttributeTypeBase;
var FloatAttributeTypeBase = mendixmodelsdk_1.domainmodels.FloatAttributeTypeBase;
var FloatAttributeType = mendixmodelsdk_1.domainmodels.FloatAttributeType;
var HashedStringAttributeType = mendixmodelsdk_1.domainmodels.HashedStringAttributeType;
var IntegerAttributeType = mendixmodelsdk_1.domainmodels.IntegerAttributeType;
var EnumerationAttributeType = mendixmodelsdk_1.domainmodels.EnumerationAttributeType;
var NumericAttributeTypeBase = mendixmodelsdk_1.domainmodels.NumericAttributeTypeBase;
exports.isAutoNumberAttributeType = function (attributeType) {
return attributeType.structureTypeName === AutoNumberAttributeType.structureTypeName;
};
exports.isBinaryAttributeType = function (attributeType) {
return attributeType.structureTypeName === BinaryAttributeType.structureTypeName;
};
exports.isBooleanAttributeType = function (attributeType) {
return attributeType.structureTypeName === BooleanAttributeType.structureTypeName;
};
exports.isCurrencyAttributeType = function (attributeType) {
return attributeType.structureTypeName === CurrencyAttributeType.structureTypeName;
};
exports.isDateTimeAttributeType = function (attributeType) {
return attributeType.structureTypeName === DateTimeAttributeType.structureTypeName;
};
exports.isDecimalAttributeType = function (attributeType) {
return attributeType.structureTypeName === DecimalAttributeType.structureTypeName;
};
exports.isDecimalAttributeTypeBase = function (attributeType) {
return attributeType.structureTypeName === DecimalAttributeTypeBase.structureTypeName;
};
exports.isEnumerationAttributeType = function (attributeType) {
return attributeType.structureTypeName === EnumerationAttributeType.structureTypeName;
};
exports.isFloatAttributeType = function (attributeType) {
return attributeType.structureTypeName === FloatAttributeType.structureTypeName;
};
exports.isFloatAttributeTypeBase = function (attributeType) {
return attributeType.structureTypeName === FloatAttributeTypeBase.structureTypeName;
};
exports.isHashedStringAttributeType = function (attributeType) {
return attributeType.structureTypeName === HashedStringAttributeType.structureTypeName;
};
exports.isIntegerAttributeType = function (attributeType) {
return attributeType.structureTypeName === IntegerAttributeType.structureTypeName;
};
exports.isIntegerAttributeTypeBase = function (attributeType) {
return attributeType.structureTypeName === IntegerAttributeTypeBase.structureTypeName;
};
exports.isLongAttributeType = function (attributeType) {
return attributeType.structureTypeName === LongAttributeType.structureTypeName;
};
exports.isNumericAttributeTypeBase = function (attributeType) {
return attributeType.structureTypeName === NumericAttributeTypeBase.structureTypeName;
};
exports.isStringAttributeType = function (attributeType) {
return attributeType.structureTypeName === StringAttributeType.structureTypeName;
};
exports.humanReadableAttributeType = function (attributeType) {
if (exports.isAutoNumberAttributeType(attributeType))
return "AutoNumber";
if (exports.isBinaryAttributeType(attributeType))
return "Binary";
if (exports.isBooleanAttributeType(attributeType))
return "Boolean";
if (exports.isCurrencyAttributeType(attributeType))
return "Currency";
if (exports.isDateTimeAttributeType(attributeType))
return "DateTime";
if (exports.isDecimalAttributeType(attributeType))
return "Decimal";
if (exports.isEnumerationAttributeType(attributeType))
return "Enumeration";
if (exports.isFloatAttributeType(attributeType))
return "Float";
if (exports.isHashedStringAttributeType(attributeType))
return "HashedString";
if (exports.isIntegerAttributeType(attributeType))
return "Integer";
if (exports.isLongAttributeType(attributeType))
return "Long";
if (exports.isStringAttributeType(attributeType))
return "String (" + (attributeType.length > 0 ? attributeType.length : "unlimited") + ")";
return "Unknown";
};
//# sourceMappingURL=attributetypes.js.map
;