Skip to content

Instantly share code, notes, and snippets.

View hcayless's full-sized avatar

Hugh A. Cayless hcayless

View GitHub Profile
@hcayless
hcayless / gist:9120829
Created February 20, 2014 19:03
RDF example for encoding TM data
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:cito="http://purl.org/spar/cito/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:lawd="http://lawd.info/ontology/"
xmlns:rels="http://snapdrgn.org/relationships/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<!-- Assumes:
the LAWD ontology defines the following types: Person, PersonalName,
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix cito: <http://purl.org/spar/cito/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix lawd: <http://lawd.info/ontology/> .
@prefix rels: <http://snapdrgn.org/relationships/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://www.trismegistos.org/name/1303#this>
lawd:attestation <http://www.trismegistos.org/ref/30558#name> ;
lawd:primaryExpression "Tasemis"@grc-latn, "Τασῆμις"@grc ;
@hcayless
hcayless / gist:9888394
Created March 31, 2014 09:10
example SNAP assertion
# Input Persons:
<http://www.trismegistos.org/person/412#this>
a lawd:Person ;
dc:publisher <http://www.trismegistos.org> ;
lawd:hasName <http://www.trismegistos.org/name/1#this> ;
lawd:hasAttestation <http://www.trismegistos.org/ref/1661#this> .
<http://data.snapdrgn.net/person/1231>
a lawd:Person ;
@hcayless
hcayless / gist:9911921
Last active August 29, 2015 13:57
EDH example SNAP mapping
@prefix cito: <http://purl.org/spar/cito> .
@prefix cnt: <http://www.w3.org/2011/content> .
@prefix dc: <http://purl.org/dc/terms> .
@prefix lawd: <http://lawd.info/ontology> .
<http://edh-www.adw.uni-heidelberg.de/resources/people/HD000001/1>
a lawd:Person ;
dc:publisher <http://edh-www.adw.uni-heidelberg.de> ;
lawd:hasName <http://edh-www.adw.uni-heidelberg.de/resources/people/HD000001/1#name> ;
lawd:hasAttestation <http://edh-www.adw.uni-heidelberg.de/resources/people/HD000001/1#attestation> .
INFO: An exception happened during JRuby-Rack startup
no such file to load -- lib/rxsugar/lib/jruby_helper
--- System
jruby 1.7.12 (1.9.3p392) 2014-04-15 643e292 on Java HotSpot(TM) 64-Bit Server VM 1.6.0_45-b06 [linux-amd64]
Time: 2014-05-13 08:50:13 -0400
Server: Apache Tomcat/7.0.16
jruby.home: file:/usr/local/tomcat-sosol/webapps/editor/WEB-INF/lib/jruby-stdlib-complete-1.7.12.jar!/META-INF/jruby.home
--- Context Init Parameters:
public.root = /
1) Error:
test: a new publication from templates should delete its branch upon destruction. (PublicationTest):
RuntimeError: Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
/test/unit/publication_test.rb:29:in `__bind_1267550211_440000'
vendor/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/context.rb:375:in `run_all_teardown_blocks'
vendor/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/context.rb:374:in `each'
vendor/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/context.rb:374:in `run_all_teardown_blocks'
vendor/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/context.rb:353:in `test: a new publication from templates should delete its branch upon destruction. '
2) Error:
cayless@msdlib$ ls -l db/test/git/users/name_29.git/
total 4
drwxr-xr-x 11 cayless dlib 11 Mar 2 14:09 objects
cayless@msdlib$ ls -l db/test/git/users/name_30.git/
total 32
drwxr-xr-x 2 cayless dlib 2 Mar 2 14:09 branches
-rw-r--r-- 1 cayless dlib 66 Mar 2 14:09 config
-rw-r--r-- 1 cayless dlib 73 Mar 2 14:09 description
-rw-r--r-- 1 cayless dlib 23 Mar 2 14:09 HEAD
drwxr-xr-x 2 cayless dlib 12 Mar 2 14:09 hooks
$ git status
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use "git add" to track)
$ git branch -a
trunk
NativeException (java.io.IOException: Server returned HTTP response code: 502 for URL: http://epidoc.googlecode.com/files/exp-epidoc.rng):
sun/net/www/protocol/http/HttpURLConnection.java:1313:in `getInputStream'
com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java:677:in `setupCurrentEntity'
com/sun/org/apache/xerces/internal/impl/XMLVersionDetector.java:186:in `determineDocVersion'
com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java:771:in `parse'
com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java:737:in `parse'
com/sun/org/apache/xerces/internal/parsers/XMLParser.java:107:in `parse'
com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java:1205:in `parse'
com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java:522:in `parse'
com.thaiopensource.relaxng.parse.sax.SAXParseable:-1:in `parse'
NoMethodError (private method `sub' called for nil:NilClass):
lib/numbers_rdf.rb:15:in `identifier_to_local_identifier'
lib/numbers_rdf.rb:28:in `identifier_to_path'
lib/numbers_rdf.rb:49:in `identifier_to_numbers_server_response'
lib/numbers_rdf.rb:76:in `apply_xpath_to_identifier'
lib/numbers_rdf.rb:81:in `identifier_to_identifiers'
app/controllers/publications_controller.rb:291:in `create_from_selector'
haml (2.2.4) [v] lib/sass/plugin/rails.rb:19:in `process'
file:lib/jruby-rack-0.9.5.jar!/rack/adapter/rails.rb:35:in `serve_rails'
file:lib/jruby-rack-0.9.5.jar!/rack/adapter/rails.rb:40:in `call'