This is a prototype service. As such, NCBO will not be providing support for its usage.
The endpoint takes a few parameters (* required):
-
- path={REST service endpoint path} - this should not include the /bioportal
# Thanks to @samsonjs for the cleaned up version: | |
# https://gist.github.com/samsonjs/4076746 | |
PREFIX=$HOME | |
VERSION=1.2.3 | |
# Install Protocol Buffers | |
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2 | |
tar -xf protobuf-2.4.1.tar.bz2 | |
cd protobuf-2.4.1 |
This is a prototype service. As such, NCBO will not be providing support for its usage.
The endpoint takes a few parameters (* required):
module LinkedData | |
module Models | |
class Review < Goo::Base::Resource | |
model :review | |
validates :creator, :presence => true, :cardinality => { :maximum => 1 } | |
validates :created, :date_time_xsd => true, :presence => true, :cardinality => { :maximum => 1 } | |
validates :body, :presence => true, :cardinality => { :maximum => 1 } | |
validates :ontologyReviewed, :presence => true, :cardinality => { :maximum => 1 } | |
validates :usabilityRating, :cardinality => { :maximum => 1 } | |
validates :coverageRating, :cardinality => { :maximum => 1 } |
# Setup for usage in Mac OSX (assuming you are using 4store.app from your /Applications folder) | |
curl -L https://raw.github.com/gist/4211360/81143f15fd6f9a3defcd38b6c24a922f3fc731ac/gistfile1.sh -o 4s-service | |
chmod +x 4s-service | |
mv 4s-service /Applications/4store.app/Contents/MacOS/bin | |
# Add the following to your (zsh|bash)rc path (this makes it so you don't have to run 4store.app): | |
# export PATH=/Applications/4store.app/Contents/MacOS/bin:$PATH | |
# You can also do this for custom installs of 4store, just replace the /Applications path with your own | |
# THE SCRIPT WILL NOT WORK WITHOUT 4s-backend, 4s-httpd, etc IN YOUR PATH | |
# Defaults: |
org.ncbo.stanford.service.ontology.AbstractOntologyService ERROR - 2013-02-04 03:51:11,509 - Error in OntologyService:uploadOntologyFile()! - remote file (fileItem) /srv/ncbo/bioportal_resources/uploads/1005/1 (Is a directory) | |
java.io.FileNotFoundException: /srv/ncbo/bioportal_resources/uploads/1005/1 (Is a directory) | |
at java.io.FileOutputStream.open(Native Method) | |
at java.io.FileOutputStream.<init>(FileOutputStream.java:194) | |
at java.io.FileOutputStream.<init>(FileOutputStream.java:84) | |
at org.ncbo.stanford.util.CompressionUtils.extractFiles(CompressionUtils.java:126) | |
at org.ncbo.stanford.util.CompressionUtils.unzip(CompressionUtils.java:58) | |
at org.ncbo.stanford.util.CompressionUtils.uncompress(CompressionUtils.java:41) | |
at org.ncbo.stanford.util.ontologyfile.compressedfilehandler.AbstractCompressedFileHandler.handle(AbstractCompressedFileHandler.java:35) | |
at org.ncbo.stanford.util.ontologyfile.compressedfilehandler.impl.RRFCompressedFileHandlerImpl |
require 'rack' | |
class TestPull < LinkedData::TestCase | |
def self.before_suite | |
# CREATE FILE OBJECT: | |
file = File.new("../some/file.owl") | |
@@thread = Thread.new do | |
Rack::Server.start( | |
app: lambda do |e| |
# Base config from Vagrantfile plus additions to support docker | |
config.vm.provider :virtualbox do |vb| | |
config.vm.box = BOX_NAME | |
config.vm.box_url = BOX_URI | |
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] | |
# Added for docker | |
vb.customize ["modifyvm", :id, "--ioapic", "on"] # needed for multicpu support | |
vb.customize ["modifyvm", :id, "--cpus", "4"] # multiple cpus |
namespace :docker do | |
desc "Run tasks in parallel using docker" | |
task :test do | |
forks = 4 | |
begin | |
# Start docker containers (serially, docker seems to have problems with concurrency) | |
ports = {} | |
forks.times do |i| | |
# Start redis and get the mapped port | |
`docker run -d -p 6379 -name redis#{i} yourdockeruser/redis` |
namespace :docker do | |
desc "Run tests in parallel using docker" | |
task :test do | |
forks = 4 | |
begin | |
# Start docker containers (serially, docker seems to have problems with concurrency) | |
ports = {} | |
forks.times do |i| | |
# Start redis and get the mapped port | |
`docker run -d -p 6379 -name redis#{i} yourdockeruser/redis` |
@@ -41,10 +41,23 @@ namespace :docker do | |
# Require the test files for this particular fork | |
test_files_sliced[i].each {|f| require_relative f} | |
+ # redirect stdout | |
+ require 'stringio' | |
+ sio = StringIO.new | |
+ $stdout = sio | |
+ $stderr = sio | |
+ |