Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/css/images/Landing-Page/Foto (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/css/images/Landing-Page/Foto (2).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/css/images/Landing-Page/Foto (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/css/images/Landing-Page/Foto (4).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/css/images/Landing-Page/Foto (5).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/css/images/Landing-Page/Foto (6).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/css/images/Landing-Page/Foto (7).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/css/images/Landing-Page/Foto (8).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/css/images/Landing-Page/MethodologyMenu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/css/images/Landing-Page/OntologyManager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/css/images/Landing-Page/OpenWithOneClick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/css/images/Landing-Page/OurEditor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/css/images/Landing-Page/TipsMenu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/css/images/Landing-Page/WarningsConsole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/css/images/Logo3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/css/images/OntologyManager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/css/images/colors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/css/images/diagram-options-element.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/css/images/diagram-options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/css/images/importing-ontology.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/css/images/properties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/css/images/warningConsole.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/grapheditor/styles/grapheditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,12 @@ aside {

/* /--------------------------------------------ONTO4ALL------------------------------------------------------------*/

.iri-link:hover{
color:#337ab7;
}
.iri-link:focus{
border-color:#d2d6de !important;
}

.geEditor {
font-family:Helvetica,Arial,sans-serif;
Expand Down
2 changes: 1 addition & 1 deletion public/js/Cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ function getInverseOfOptions() {
relations.forEach((relation) => {
if (
!inverseOfValues.includes(relation.getAttribute("label")) ||
cell.getAttribute("inverseOf").includes(relation.id)
currentCell.getAttribute("inverseOf").includes(relation.id)
)
options.push(relation);
});
Expand Down
35 changes: 23 additions & 12 deletions public/js/Compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,14 @@ function compileRelation(relation) {
missingRelationProperties = missingRelationProperties + " range,";

// is_a relations don't have a inverse of
/*
if (
relation.getAttribute("label") !== "is_a" &&
relation.getAttribute("label") !== "é_um " &&
relation.getAttribute("inverseOf") === ""
)
missingRelationProperties = missingRelationProperties + " inverseOf";
*/

if (missingRelationProperties !== "") {
warningsCount++;
Expand Down Expand Up @@ -254,7 +256,8 @@ function compileClass(classCell) {
let classesToCompare = classes.filter(
(item) => item.id !== classCell.id
);
for (let i = 0; i < classesToCompare.length; i++) {
let classesLenght = classesToCompare.length;
for (let i = 0; i < classesLenght; i++) {
if (
classCell.getAttribute("label") ==
classesToCompare[i].getAttribute("label")
Expand Down Expand Up @@ -300,16 +303,18 @@ function compileClass(classCell) {
});
if (isSubClassOf == 0) classCell.setAttribute("SubClassOf", "");

if (classCell.edges.length > 1) {
let classCellEdgesLength = classCell.edges.length;
if (classCellEdgesLength > 1) {
// Shows a error message if two classes has the same relation between them more than one time
let connectedRelations = classCell.edges.filter(
(relation) =>
relation.target !== null &&
relation.source !== null &&
relation.getAttribute("label") !== ""
);
for (let i = 0; i < connectedRelations.length; i++) {
for (let j = 0; j < connectedRelations.length; j++) {
let connectedRelationsLenght = connectedRelations.length;
for (let i = 0; i < connectedRelationsLenght; i++) {
for (let j = 0; j < connectedRelationsLenght; j++) {
if (
connectedRelations[i].id != connectedRelations[j].id &&
connectedRelations[i].getAttribute("label") ==
Expand Down Expand Up @@ -428,6 +433,7 @@ function compileClass(classCell) {
*/
function compileInstance(instance) {
// shows a error if there is any relation besides instance_of connected to a instance
/*
if (instance.edges !== null && instance.edges.length > 0) {
instance.edges.forEach((relation) => {
if (
Expand All @@ -454,6 +460,8 @@ function compileInstance(instance) {
}
});
}
*/

}

/**
Expand Down Expand Up @@ -561,17 +569,18 @@ function getLanguage() {
*/
function getElementsNames(category = "Class") {
let names = [];
let relationsLength = relations.length, classesLength = classes.length, instancesLength = instances.length, datatypePropertiesLength = datatypeProperties.length;
if (category === "Relation") {
for (let i = 0; i < relations.length; i++)
for (let i = 0; i < relationsLength; i++)
names.push(relations[i].getAttribute("label"));
} else if (category === "Class") {
for (let i = 0; i < classes.length; i++)
for (let i = 0; i < classesLength; i++)
names.push(classes[i].getAttribute("label"));
} else if (category === "Instance") {
for (let i = 0; i < instances.length; i++)
for (let i = 0; i < instancesLength; i++)
names.push(instances[i].getAttribute("label"));
} else if (category === "DatatypeProperty") {
for (let i = 0; i < datatypeProperties.length; i++)
for (let i = 0; i < datatypePropertiesLength; i++)
names.push(datatypeProperties[i].getAttribute("label"));
}
return names;
Expand Down Expand Up @@ -791,7 +800,8 @@ function updateConsoleColors(
* Check if the Thing Class exists in the current ontology
*/
function thingClassExists() {
for (let i = 0; i < classes.length; i++)
let classesLength = classes.length;
for (let i = 0; i < classesLength; i++)
if (
classes[i].getAttribute("label").toUpperCase() === "THING" ||
classes[i].getAttribute("label").toUpperCase() === "COISA"
Expand Down Expand Up @@ -847,8 +857,8 @@ function getCellById(id, type) {
else if (type == "Relation") cells = relations;
else if (type == "Instance") cells = instances;
else cells = relations.concat(classes).concat(instances);

for (let i = 0; i < cells.length; i++)
let cellsLength = cells.length;
for (let i = 0; i < cellsLength; i++)
if (cells[i].id == id) return cells[i];
}

Expand All @@ -860,7 +870,8 @@ function getCellById(id, type) {
*/
function removeItemAll(arr, value) {
let i = 0;
while (i < arr.length) {
let arrayLength = arr.length;
while (i < arrayLength) {
if (arr[i] === value) {
arr.splice(i, 1);
} else {
Expand Down
10 changes: 7 additions & 3 deletions public/js/OntologyManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ document.addEventListener("DOMContentLoaded", function() {
// Select the collaborators on the <select> tag
$('#collaborators-select').val(data['collaborators']).trigger('change');

//Allow to click on the IRI input and set route
document.getElementById('ontology-iri').disabled =false;
document.getElementById('iri-link').setAttribute("href", "https://onto4alleditor.com/en/ontologies/"+data['id']);

//Show when the ontology was last updated
document.getElementById('last-update').innerHTML = '<span class="time"><i class="fa fa-clock-o"></i> ' + 'Last update: ' + data['last_update'];
//Update the little star on the navbar
Expand All @@ -104,7 +108,7 @@ document.addEventListener("DOMContentLoaded", function() {
// Fires the Ajax request when the button is clicked

document.getElementById('save-ontology').addEventListener('click', function () {
document.getElementById('save-ontology').innerHTML='<div class="overlay"><i style="color: white !important;" class="fa fa-refresh fa-spin"></i></div>';
document.getElementById('save-ontology').innerHTML='<div class="overlay"><i style="color: white !important;" class="fa fa-spinner fa-spin"></i></div>';
document.getElementById('save-ontology').style.backgroundColor = "#00a65a";
document.getElementById('save-ontology').style.borderColor = "#00a65a";
$.ajax({
Expand Down Expand Up @@ -186,11 +190,11 @@ document.addEventListener("DOMContentLoaded", function() {

// Downloads a .txt file containing all the errors that the user made in the current ontology
document.getElementById('download-errors-txt').addEventListener('click', function(){
// let texts = document.querySelectorAll(".direct-chat-text").textContent;
let consoleMessages = document.getElementsByClassName('direct-chat-text');
let txts;
let txts = "";
for (let i = 0; i < consoleMessages.length; i++)
txts = txts + consoleMessages[i].textContent;

this.href = "data:text/plain;charset=UTF-8," + encodeURIComponent(txts);
});

Expand Down
Loading