'''Half Day'''
- Tom Johnson, DPLA, tom@dp.la
Abstract:
Sep 16 09:35:38 akara[8157]: [ERROR] Uncaught exception from 'geocode' ('http://purl.org/la/dp/geocode') | |
Traceback (most recent call last): | |
File "/home/tjohnson/src/dpla/ingestion/ENV/lib/python2.7/site-packages/akara/multiprocess_http.py", line 304, in _wsgi_application | |
result = service.handler(environ, start_response_) | |
File "/home/tjohnson/src/dpla/ingestion/ENV/lib/python2.7/site-packages/akara/services.py", line 417, in wrapper | |
result = func(*args, **kwargs) | |
File "/home/tjohnson/src/dpla/ingestion/ENV/lib/python2.7/site-packages/dplaingestion/akamod/geocode.py", line 63, in geocode | |
place.enrich_geodata(DplaGeonamesGeocoder()) | |
File "/home/tjohnson/src/dpla/ingestion/ENV/lib/python2.7/site-packages/dplaingestion/akamod/geocode.py", line 526, in enrich_geodata | |
coded_place = geocoder.enrich_place(self) |
<http://purl.org/dc/dcmitype/Image> a <http://www.w3.org/2000/01/rdf-schema#Class> . | |
<http://vocab.getty.edu/aat/300132472> a <http://vocab.getty.edu/ontology#Concept> . | |
[ | |
a <http://www.w3.org/ns/oa#Annotation>; | |
<http://www.w3.org/ns/oa#annotatedAt> "2014-09-19T10:33:56-07:00"^^<http://www.w3.org/2001/XMLSchema#dateTime>; | |
<http://www.w3.org/ns/oa#hasBody> [ | |
a <http://www.w3.org/2011/content#ContentAsText>; | |
<http://purl.org/dc/elements/1.1/format> "text/plain"; |
'''Half Day'''
Abstract:
/** | |
* Single endpoint for direct post queries (not yet implemented) | |
* | |
* @param request | |
* @return | |
*/ | |
@POST | |
public Response post(@Context HttpServletRequest request) { | |
//String query = CharStreams.toString(request.getReader()); | |
//TODO: introspect the query to determine the operation type |
TASK: [postgresql | Make sure our databases exist] **************************** | |
failed: [webapp1] => (item=dpla_portal) => {"failed": true, "item": "dpla_portal"} | |
msg: Database query failed: encoding UTF8 does not match locale en_US | |
DETAIL: The chosen LC_CTYPE setting requires encoding LATIN1. |
subject.query_client.ask.whether([:s, :p, :o]).to_s | |
# => "ASK WHERE { ?s ?p ?o . }" | |
subject.query_client.ask.whether([:s, :p, :o]).true? | |
# => true | |
subject.query_client.ask.whether([:s, RDF::DC.title, 'my item']).to_s | |
# => "ASK WHERE { ?s <http://purl.org/dc/terms/title> \"my item\" . }" | |
subject.query_client.ask.whether([:s, RDF::DC.title, 'my item']).true? |
require 'mime/type' #=> NameError: uninitialized constant MIME | |
require 'mime' # works fine, but then `Mime` exists and `MIME` does not |
require 'factory_girl' | |
include FactoryGirl::Syntax::Methods | |
require 'dpla/map/factories' | |
agg = build(:aggregation) | |
agg.to_json | |
# => => "{\"aggregatedCHO\":[{\"alternateTitle\":[\"Stonewall Inn Graffiti\"],\"collection\":[{\"title\":[\"Diana Davies photographs, 1965-1978\"],\"description\":[\"Photographs of Diana Davies; LGBT and HIV/AIDS Activist Collections\"]}],\"contributor\":[{\"label\":[\"Norma Ford\"],\"providedLabel\":[\"Norma Ford\"],\"exactMatch\":[],\"closeMatch\":[]}],\"creator\":[{\"label\":[\"Davies, Diana (1938-)\"],\"providedLabel\":[\"Norma Ford\"],\"exactMatch\":[],\"closeMatch\":[]}],\"date\":[{\"providedLabel\":[\"1969.\"],\"begin\":[\"1969-01-01\"],\"end\":[\"1969-12-31\"]}],\"description\":[\"Window of the Stonewall Bar N.Y. 1969. The other half of the graffiti was erased by the time Diana photographed it.\"],\"extent\":[\"10x12 cm\"],\"format\":[\"Silver Gelatin Print\"],\"genre\":[{\"id\":\"http://vocab.getty.edu/aat/300132472\",\"prefLabel\":[],\"providedLabel\":[],\"exactMatch\":[], |
puts agg.dump(:jsonld, {standard_prefixes: true}) | |
{ | |
"@context": { | |
"aat": "http://vocab.getty.edu/aat/", | |
"dc": "http://purl.org/dc/terms/", | |
"dc11": "http://purl.org/dc/elements/1.1/", | |
"dcmitype": "http://purl.org/dc/dcmitype/", | |
"dpla": "http://dp.la/about/map/", | |
"edm": "http://www.europeana.eu/schemas/edm/", | |
"iso_639_3": "http://lexvo.org/id/iso639-3/", |
{ | |
"@context": { | |
"aat": "http://vocab.getty.edu/aat/", | |
"dc": "http://purl.org/dc/terms/", | |
"dc11": "http://purl.org/dc/elements/1.1/", | |
"dcmitype": "http://purl.org/dc/dcmitype/", | |
"dpla": "http://dp.la/about/map/", | |
"edm": "http://www.europeana.eu/schemas/edm/", | |
"iso_639_3": "http://lexvo.org/id/iso639-3/", | |
"ore": "http://www.openarchives.org/ore/terms/", |