Skip to content

Commit

Permalink
Remove console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
bindeali committed Jul 22, 2024
1 parent 2374dbf commit b3dd8e0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 30 deletions.
3 changes: 0 additions & 3 deletions src/panels/detail/components/element/TropeOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
} from "../../../../config/Variables";
import {
drawGraphElement,
getDisplayLabel,
getSelectedLabels,
} from "../../../../function/FunctionDraw";
import { initLanguageObject } from "../../../../function/FunctionEditVars";
Expand Down Expand Up @@ -60,7 +59,6 @@ export const TropeOverlay: React.FC<Props> = (props: Props) => {
getParentOfIntrinsicTropeType(props.id).forEach((id) => {
const elem = graph.getElements().find((elem) => elem.id === id);
if (elem) {
console.log(getDisplayLabel(props.id, AppSettings.canvasLanguage));
drawGraphElement(elem, selectedLanguage, AppSettings.representation);
resizeElem(id);
}
Expand Down Expand Up @@ -148,7 +146,6 @@ export const TropeOverlay: React.FC<Props> = (props: Props) => {
}}
id={props.id}
selectDisplayLabel={(name, language) => {
console.log(name, language);
setSelectedLabel((prev) => ({
...prev,
[language]: name,
Expand Down
35 changes: 17 additions & 18 deletions src/queries/update/UpdateConnectionQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ function constructDefaultLinkRestrictions(
),
...(conn.onClass
? [
qb.po(
"owl:onClass",
inverse ? qb.i(conn.iri) : qb.i(conn.onClass)
),
]
qb.po(
"owl:onClass",
inverse ? qb.i(conn.iri) : qb.i(conn.onClass)
),
]
: []),
qb.po(
qb.i(conn.restriction),
Expand Down Expand Up @@ -142,7 +142,6 @@ function updateDefaultLink(ids: string[]): string {
const source = WorkspaceLinks[id].source;
const target = WorkspaceLinks[id].target;
if (!(source in WorkspaceTerms) || !(target in WorkspaceTerms)) {
console.log(WorkspaceElements[source], WorkspaceElements[target]);
console.error(
"Unable to find source and/or target of relationship " + id
);
Expand Down Expand Up @@ -189,15 +188,15 @@ function updateDefaultLink(ids: string[]): string {
])}
`.WHERE`
${qb.g(contextIRI, [
qb.s(qb.i(WorkspaceLinks[linkID].source), "rdfs:subClassOf", "?b"),
"filter(isBlank(?b)).",
qb.s("?b", "rdf:type", "owl:Restriction"),
qb.s("?b", "owl:onProperty", qb.i(WorkspaceLinks[linkID].iri)),
qb.s("?b", "?pMatch", qb.i(WorkspaceLinks[linkID].target)),
`values ?pMatch {<${Object.keys(RestrictionConfig)
.concat([parsePrefix("owl", "onClass")])
.join("> <")}>}`,
])}`.build(),
qb.s(qb.i(WorkspaceLinks[linkID].source), "rdfs:subClassOf", "?b"),
"filter(isBlank(?b)).",
qb.s("?b", "rdf:type", "owl:Restriction"),
qb.s("?b", "owl:onProperty", qb.i(WorkspaceLinks[linkID].iri)),
qb.s("?b", "?pMatch", qb.i(WorkspaceLinks[linkID].target)),
`values ?pMatch {<${Object.keys(RestrictionConfig)
.concat([parsePrefix("owl", "onClass")])
.join("> <")}>}`,
])}`.build(),
DELETE`${qb.g(contextIRI, [
qb.s(qb.i(WorkspaceLinks[linkID].target), "rdfs:subClassOf", "?ib"),
qb.s("?ibo", "?ibop", "?iboo"),
Expand Down Expand Up @@ -319,9 +318,9 @@ function updateGeneralizationLink(ids: string[]): string {
dels.push(
DELETE`${qb.g(contextIRI, [qb.s(qb.i(iri), "rdfs:subClassOf", "?b")])}`
.WHERE`${qb.g(contextIRI, [
qb.s(qb.i(iri), "rdfs:subClassOf", "?b"),
"filter(!isBlank(?b)).",
])}`.build()
qb.s(qb.i(iri), "rdfs:subClassOf", "?b"),
"filter(!isBlank(?b)).",
])}`.build()
);

const subClasses = _.compact(
Expand Down
17 changes: 8 additions & 9 deletions src/queries/update/UpdateMiscQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export function updateUserSettings(): string {
const userGraph = Users[AppSettings.currentUser!].graph;
const userIRI = AppSettings.currentUser!;
const userSettings = getUserSettings();
console.log(userGraph);

const insert = INSERT.DATA`${qb.g(
userGraph,
Expand Down Expand Up @@ -117,19 +116,19 @@ export function updateDeleteTriples(
deletes.push(
DELETE`${["GRAPH ?graph {", qb.s(qb.i(iri), "?p", "?o"), "}"].join(" ")}`
.WHERE`${[
"GRAPH ?graph {",
qb.s(qb.i(iri), "?p", "?o"),
"} values ?graph {" + contexts.map((c) => `<${c}>`).join(" ") + "}",
].join(" ")}`.build()
"GRAPH ?graph {",
qb.s(qb.i(iri), "?p", "?o"),
"} values ?graph {" + contexts.map((c) => `<${c}>`).join(" ") + "}",
].join(" ")}`.build()
);
if (object)
deletes.push(
DELETE`${["GRAPH ?graph {", qb.s("?s", "?p", qb.i(iri)), "}"].join(" ")}`
.WHERE`${[
"GRAPH ?graph {",
qb.s("?s", "?p", qb.i(iri)),
"} values ?graph {" + contexts.map((c) => `<${c}>`).join(" ") + "}",
].join(" ")}`.build()
"GRAPH ?graph {",
qb.s("?s", "?p", qb.i(iri)),
"} values ?graph {" + contexts.map((c) => `<${c}>`).join(" ") + "}",
].join(" ")}`.build()
);
return qb.combineQueries(...deletes);
}

0 comments on commit b3dd8e0

Please sign in to comment.