Skip to content

Instantly share code, notes, and snippets.

@rnsrk
rnsrk / bash
Created January 27, 2025 06:30
Reset hook_updata count
drush sql-query "UPDATE key_value SET value='i:8013;' WHERE collection = 'system.schema' AND name = 'wisski_core';"

Hilfe zur Zeichnung

flowchart TD
A[Probleme mit dem Pathbuilder] -->B(Kann keinen Pfad hinzufügen)
    B --> C{Ontologie geladen?}
    C -->|Ja| D[Robert fragen]
    C -->|Nein| E[Ontologie hinzufügen /admin/config/wisski/ontology]
    E --> F[Reasoner laufen lassen /admin/config/wisski/salz/adapter/default ]
@rnsrk
rnsrk / supported-wisski-syntax.md
Last active August 23, 2024 09:41
Supported OWL DL 1 RDF/XML elements in WissKI

Supported WissKI Ontologies elements

WissKI ontology import and reasoning only supports a reduced OWL DL 1 RDF/XML notation.

Supported elements

Root

<rdf:RDF>
  xml:base="http://example.org/ontology/"
  xmlns:ontology="http://example.org/ontology/"
  xmlns:otherontology="http://another-ontology.com/"
  xmlns:contents="http://example.org/contents/"
@rnsrk
rnsrk / gist:47f7af21083070c184c7e07146a00816
Created August 14, 2024 13:01
Error: Class "XSLTProcessor" not found in build_xml()
# get into the container
apt-get install -y libxslt-dev
docker-php-ext-install xsl
# restart the container
# or add the lines to the Dockerfile
@rnsrk
rnsrk / createRdf4jRepo.ttl
Created March 27, 2024 10:16
Create Repo at rdf4j-Server
# $SERVER_URL=http://http://example.com/rdf4j-server/
# $REPO_ID=example-repo
# curl -X PUT -H "Content-Type: text/turtle" --data-binary @repo-config.ttl $SERVER_URL/repositories/$REPO_ID
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rep: <http://www.openrdf.org/config/repository#>.
@prefix sr: <http://www.openrdf.org/config/repository/sail#>.
@prefix sail: <http://www.openrdf.org/config/sail#>.
@prefix ms: <http://www.openrdf.org/config/sail/memory#>.
@rnsrk
rnsrk / gist:93779848b4150ed40ddd423370ebc2c9
Created August 2, 2023 07:15
Blazegraph n-quad export command
# Replace <namespace> with your namespace.
curl -X POST "http://localhost:9999/bigdata/namespace/<namespace>/sparql?GETSTMTS&includeInferred=false" > data.nq
#!/bin/bash
# Repairs corrupt Solr index
java -cp /opt/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-core-8.11.1.jar -ea:org.apache.lucene... org.apache.lucene.index.CheckIndex /var/solr/data/objektkatalogneu/data/index -exorcise
@rnsrk
rnsrk / selectMutlipleEIDsFromWisski_salz_id2uri.sql
Last active January 4, 2024 18:07
Select multiple EID in wisski_salz_id2uri
# SELECT SQL STATEMENT (SAVE RESULT)
SELECT t1.eid
FROM wisski_salz_id2uri t1
INNER JOIN (
SELECT uri, count(eid), adapter_id, rid
FROM wisski_salz_id2uri
GROUP BY uri, adapter_id
HAVING
COUNT(eid) > 1
AND adapter_id = "boehler_backend") AS t2
@rnsrk
rnsrk / example_wisski_odbc_import_script.xml
Created April 1, 2022 06:56
Template for ODBC import script, used at Manage > Configure > WissKI ODBC Import (WissKI section). Please set url, database, port, user, password, table name, bundle id and field id to your needs. Check the delimiter as well!
<server>
<url>localhost</url>
<database>DATABASE_NAME</database>
<port>3306</port>
<user>DATABASE_USER</user>
<password>DATABASE_PASSWORD</password>
<table>
<select>*</select>
<name>TABLE_NAME_IN_DATABASE</name>
<append></append>
if ($this->batchStateStaticRevisions) {
$form['actions']['eraseBatch'] = [
'#type' => 'submit',
'#value' => $this->t('Reset batch state'),
'#button_type' => 'danger',
'#submit' => [[$this->configFactory->getEditable(static::INDIVIDUALS_IN_BATCH),
'delete',
],
],
];