profile-pics
Version:
85 lines • 4.53 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.profilePics = exports.profileSetupCompleted = exports.hasProfilePictures = exports.hasProfilePicture6 = exports.hasProfilePicture5 = exports.hasProfilePicture4 = exports.hasProfilePicture3 = exports.hasProfilePicture2 = exports.hasProfilePicture = exports.crop = exports.image = exports.ProfilePictureSet = exports.ProfilePicture = exports._self = exports.ns = exports.loadData = void 0;
const JSONLD_1 = require("lincd-jsonld/utils/JSONLD");
const NameSpace_1 = require("lincd/utils/NameSpace");
const package_js_1 = require("../package.js");
//import all the exports of this file as one variable called _this (we need this at the end)
const _this = __importStar(require("./profile-pics.js"));
/**
* Load the data of this ontology into memory, thus adding the properties of the entities of this ontology to the local graph.
*/
var loadData = () => {
if (typeof module !== 'undefined' && typeof exports !== 'undefined') {
// CommonJS import
return Promise.resolve().then(() => __importStar(require('../data/profile-pics.json'))).then((data) => JSONLD_1.JSONLD.parse(data));
}
else {
// ESM import
//@ts-ignore
return Promise.resolve().then(() => __importStar(require('../data/profile-pics.json'))).then((data) => JSONLD_1.JSONLD.parse(data.default));
}
};
exports.loadData = loadData;
/**
* The namespace of this ontology, which can be used to create NamedNodes with URI's not listed in this file
*/
exports.ns = (0, NameSpace_1.createNameSpace)('http://lincd.org/ont/profile-pics/');
/**
* The NamedNode of the ontology itself
*/
exports._self = (0, exports.ns)('');
//A list of all the entities (Classes & Properties) of this ontology, each exported as a NamedNode
exports.ProfilePicture = (0, exports.ns)('ProfilePicture');
exports.ProfilePictureSet = (0, exports.ns)('ProfilePictureSet');
exports.image = (0, exports.ns)('image');
exports.crop = (0, exports.ns)('crop');
exports.hasProfilePicture = (0, exports.ns)('hasProfilePicture');
exports.hasProfilePicture2 = (0, exports.ns)('hasProfilePicture2');
exports.hasProfilePicture3 = (0, exports.ns)('hasProfilePicture3');
exports.hasProfilePicture4 = (0, exports.ns)('hasProfilePicture4');
exports.hasProfilePicture5 = (0, exports.ns)('hasProfilePicture5');
exports.hasProfilePicture6 = (0, exports.ns)('hasProfilePicture6');
exports.hasProfilePictures = (0, exports.ns)('hasProfilePictures');
exports.profileSetupCompleted = (0, exports.ns)('profileSetupCompleted');
//An extra grouping object so all the entities can be accessed from the prefix/name
exports.profilePics = {
ProfilePicture: exports.ProfilePicture,
ProfilePictureSet: exports.ProfilePictureSet,
image: exports.image,
crop: exports.crop,
hasProfilePicture: exports.hasProfilePicture,
hasProfilePicture2: exports.hasProfilePicture2,
hasProfilePicture3: exports.hasProfilePicture3,
hasProfilePicture4: exports.hasProfilePicture4,
hasProfilePicture5: exports.hasProfilePicture5,
hasProfilePicture6: exports.hasProfilePicture6,
hasProfilePictures: exports.hasProfilePictures,
profileSetupCompleted: exports.profileSetupCompleted,
};
//Registers this ontology to LINCD.JS, so that data loading can be automated amongst other things
(0, package_js_1.linkedOntology)(_this, exports.ns, 'profile-pics', exports.loadData, '../data/profile-pics.json');
//# sourceMappingURL=profile-pics.js.map