view src/app/relation-type.js @ 62:7787ca310644 webpack tip

update @angular to 4.4.5.
author Robert Casties <casties@mpiwg-berlin.mpg.de>
date Wed, 18 Oct 2017 17:46:41 +0200
parents 3b4046e0cc02
children
line wrap: on
line source

"use strict";
exports.invLabelPrefix = '<- ';
exports.invNamePrefix = '-';
exports.rawLabelPrefix = '(';
exports.rawLabelPostfix = ')';
var RelationType = (function () {
    function RelationType(relType, isOutgoing, label) {
        this.outgoing = isOutgoing;
        this.relType = relType;
        if (isOutgoing) {
            this.name = relType;
        }
        else {
            this.name = exports.invNamePrefix + relType;
        }
        if (label != null) {
            this.label = label;
        }
        else {
            // create label using name
            if (isOutgoing) {
                this.label = exports.rawLabelPrefix + relType + exports.rawLabelPostfix;
            }
            else {
                this.label = exports.rawLabelPrefix + exports.invLabelPrefix + relType + exports.rawLabelPostfix;
            }
        }
    }
    RelationType.prototype.getLabel = function () {
        return this.label;
    };
    RelationType.prototype.getName = function () {
        return this.name;
    };
    RelationType.prototype.getRelType = function () {
        return this.relType;
    };
    RelationType.prototype.isOutgoing = function () {
        return this.outgoing;
    };
    return RelationType;
}());
exports.RelationType = RelationType;
//# sourceMappingURL=relation-type.js.map