Skip to content

Instantly share code, notes, and snippets.

@alphaville
Created December 11, 2010 03:39
Show Gist options
  • Select an option

  • Save alphaville/737129 to your computer and use it in GitHub Desktop.

Select an option

Save alphaville/737129 to your computer and use it in GitHub Desktop.
Testing BibTeX service (part of Jaqpot)
$ curl -X POST -H "Authorization: AQIC5wM2LY4SfcwddzcQ32/ljZvewpZSVku8ZBRJGvFUnPM=@AAJTSQACMDE=#" \
--data-binary @/home/chung/Desktop/test.bib -H Content-type:text/plain -H Accept:text/uri-list localhost:3000/bibtex -v
* About to connect() to localhost port 3000 (#0)
* Trying ::1... connected
* Connected to localhost (::1) port 3000 (#0)
> POST /bibtex HTTP/1.1
> User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
> Host: localhost:3000
> Authorization: AQIC5wM2LY4SfcwddzcQ32/ljZvewpZSVku8ZBRJGvFUnPM=@AAJTSQACMDE=#
> Content-type:text/plain
> Accept:text/uri-list
> Content-Length: 99
>
< HTTP/1.1 200 The request has succeeded
< Content-Language: en, en-us
< Content-Type: text/uri-list
< Date: Sat, 11 Dec 2010 03:36:51 GMT
< Accept-Ranges: bytes
< Server: Restlet-Framework/2.0m7
< Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
< Connection: close
< Transfer-Encoding: chunked
<
http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1
* Closing connection #0
===========================
$ curl http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1 -H Accept:text/plain -v
* About to connect() to localhost port 3000 (#0)
* Trying ::1... connected
* Connected to localhost (::1) port 3000 (#0)
> GET /bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1 HTTP/1.1
> User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
> Host: localhost:3000
> Accept:text/plain
>
< HTTP/1.1 200 The request has succeeded
< Content-Language: en, en-us
< Content-Type: text/plain
< Date: Sat, 11 Dec 2010 03:38:20 GMT
< Accept-Ranges: bytes
< Server: Restlet-Framework/2.0m7
< Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
< Connection: close
< Transfer-Encoding: chunked
<
@Article{http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1,
author = "me",
copyright = "NTUA, 2010",
edition = "1",
year = "2008"
}
* Closing connection #0
===========================
$ curl http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1 -H Accept:application/x-turtle -v
* About to connect() to localhost port 3000 (#0)
* Trying ::1... connected
* Connected to localhost (::1) port 3000 (#0)
> GET /bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1 HTTP/1.1
> User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
> Host: localhost:3000
> Accept:application/x-turtle
>
< HTTP/1.1 200 The request has succeeded
< Content-Language: en, en-us
< Content-Type: application/x-turtle
< Date: Sat, 11 Dec 2010 03:44:29 GMT
< Accept-Ranges: bytes
< Server: Restlet-Framework/2.0m7
< Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
< Connection: close
< Transfer-Encoding: chunked
<
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix ot: <http://www.opentox.org/api/1.1#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix bibtex: <http://purl.oclc.org/NET/nknouf/ns/bibtex#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yaqp: <http://opentox.ntua.gr:3000> .
@prefix ota: <http://www.opentox.org/algorithmTypes.owl/#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
bibtex:hasYear
a owl:DatatypeProperty ;
rdfs:domain bibtex:Entry ;
rdfs:range xsd:string ;
dc:title "has year"^^xsd:string .
<http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1>
a bibtex:Article ;
rdfs:comment "Individual automatically generated by ToxOtis"^^xsd:string ;
bibtex:hasAuthor "me"^^xsd:string ;
bibtex:hasCopyright "NTUA, 2010"^^xsd:string ;
bibtex:hasEdition "1"^^xsd:string ;
bibtex:hasYear "2008"^^xsd:int ;
dc:identifier "http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1"^^xsd:string .
dc:identifier
a owl:AnnotationProperty .
bibtex:hasAuthor
a owl:DatatypeProperty ;
rdfs:domain bibtex:Entry ;
rdfs:range xsd:string ;
dc:title "has Author"^^xsd:string .
rdfs:comment
a owl:AnnotationProperty .
bibtex:Entry
a owl:Class ;
rdfs:comment "Take a look at http://zeitkunst.org/bibtex/0.1/"^^xsd:string , "Generic bibtex entry"^^xsd:string ;
rdfs:subClassOf owl:Thing .
bibtex:hasEdition
a owl:DatatypeProperty ;
rdfs:domain bibtex:Entry ;
rdfs:range xsd:string ;
dc:title "has Edition"^^xsd:string .
dc:title
a owl:AnnotationProperty .
bibtex:hasCopyright
a owl:DatatypeProperty ;
rdfs:domain bibtex:Entry ;
rdfs:range xsd:string ;
dc:title "has Copyright"^^xsd:string .
bibtex:Article
a owl:Class ;
rdfs:comment "An article from a journal or magazine."^^xsd:string ;
rdfs:subClassOf bibtex:Entry .
* Closing connection #0
===============================
$ curl http://localhost:3000/bibtex/eb8447d3-518c-43f7-b9d26bcbd1 -H Accept:text/n-triples -v
* About to connect() to localhost port 3000 (#0)
* Trying ::1... connected
* Connected to localhost (::1) port 3000 (#0)
> GET /bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1 HTTP/1.1
> User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
> Host: localhost:3000
> Accept:text/n-triples
>
< HTTP/1.1 200 The request has succeeded
< Content-Language: en, en-us
< Content-Type: text/n-triples
< Date: Sat, 11 Dec 2010 03:45:37 GMT
< Accept-Ranges: bytes
< Server: Restlet-Framework/2.0m7
< Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
< Connection: close
< Transfer-Encoding: chunked
<
<http://purl.org/dc/elements/1.1/title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasAuthor> <http://purl.org/dc/elements/1.1/title> "has Author"^^<http://www.w3.org/2001/XMLSchema#string> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasAuthor> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasAuthor> <http://www.w3.org/2000/01/rdf-schema#domain> <http://purl.oclc.org/NET/nknouf/ns/bibtex#Entry> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasAuthor> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasEdition> <http://purl.org/dc/elements/1.1/title> "has Edition"^^<http://www.w3.org/2001/XMLSchema#string> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasEdition> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasEdition> <http://www.w3.org/2000/01/rdf-schema#domain> <http://purl.oclc.org/NET/nknouf/ns/bibtex#Entry> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasEdition> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasYear> <http://purl.org/dc/elements/1.1/title> "has year"^^<http://www.w3.org/2001/XMLSchema#string> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasYear> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasYear> <http://www.w3.org/2000/01/rdf-schema#domain> <http://purl.oclc.org/NET/nknouf/ns/bibtex#Entry> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasYear> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
<http://www.w3.org/2000/01/rdf-schema#comment> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#Article> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://purl.oclc.org/NET/nknouf/ns/bibtex#Entry> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#Article> <http://www.w3.org/2000/01/rdf-schema#comment> "An article from a journal or magazine."^^<http://www.w3.org/2001/XMLSchema#string> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#Article> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#Entry> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2002/07/owl#Thing> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#Entry> <http://www.w3.org/2000/01/rdf-schema#comment> "Generic bibtex entry"^^<http://www.w3.org/2001/XMLSchema#string> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#Entry> <http://www.w3.org/2000/01/rdf-schema#comment> "Take a look at http://zeitkunst.org/bibtex/0.1/"^^<http://www.w3.org/2001/XMLSchema#string> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#Entry> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
<http://purl.org/dc/elements/1.1/identifier> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasCopyright> <http://purl.org/dc/elements/1.1/title> "has Copyright"^^<http://www.w3.org/2001/XMLSchema#string> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasCopyright> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasCopyright> <http://www.w3.org/2000/01/rdf-schema#domain> <http://purl.oclc.org/NET/nknouf/ns/bibtex#Entry> .
<http://purl.oclc.org/NET/nknouf/ns/bibtex#hasCopyright> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
<http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1> <http://purl.oclc.org/NET/nknouf/ns/bibtex#hasYear> "2008"^^<http://www.w3.org/2001/XMLSchema#int> .
<http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1> <http://purl.oclc.org/NET/nknouf/ns/bibtex#hasEdition> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
<http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1> <http://purl.oclc.org/NET/nknouf/ns/bibtex#hasCopyright> "NTUA, 2010"^^<http://www.w3.org/2001/XMLSchema#string> .
<http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1> <http://purl.oclc.org/NET/nknouf/ns/bibtex#hasAuthor> "me"^^<http://www.w3.org/2001/XMLSchema#string> .
<http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1> <http://purl.org/dc/elements/1.1/identifier> "http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1"^^<http://www.w3.org/2001/XMLSchema#string> .
<http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1> <http://www.w3.org/2000/01/rdf-schema#comment> "Individual automatically generated by ToxOtis"^^<http://www.w3.org/2001/XMLSchema#string> .
<http://localhost:3000/bibtex/eb8447d3-518c-43f7-ad77-c5b9d26bcbd1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.oclc.org/NET/nknouf/ns/bibtex#Article> .
* Closing connection #0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment