Hi Michael

> I did:
>       curl -X POST -H "Content-Type: application/rdf+xml" --data 
> "@nciOncology.owl" http://localhost:8090/entityhub/entity

"application/rdf+xml" is the correct content type. I tend to use "-T {file}" 
instead of "--data "@{file}" but this should make no difference based on the 
man page of curl.

However in general this method is intended to create a single (or small amount 
of) entities. It is not intended to be used with RDF data that include 25k+ 
Entities like the NCI ontology because it
1) loads everything into memory
2) stores and commits every single entity

Note that the HTTP request will timeout after one minute (curl will print 
"curl: (52) Empty reply from server"), but the actual import will take much 
longer. However you can use the Entityhub normally while the data are imported.

Using the Indexing utilities (as already described by Suat) would be the 
preferred way to "teach Stanbol cancer".

> 
> Should be?:
>       curl -X POST -H "Content-Type: application/xml" --data 
> "@nciOncology.owl" http://localhost:8090/entityhub/entity
> 
> Anyway, querying now produces these errors:
> 
>       curl 
> http://localhost:8090/entityhub/entity?id=http://www.mindswap.org/2003/nciOncology.owl#High-Grade_Mucoepidermoi_Breast_Carcinoma
> 
> -----------------
> Problem accessing /entityhub/entity. Reason:
> Unknown prefix owl (parsed from field owl:versionInfo)!</pre></p><h3>Caused 
> by:</h3><pre>java.lang.IllegalStateException: Unknown prefix owl (parsed from 
> field owl:versionInfo)!
>       at 
> org.apache.stanbol.entityhub.yard.solr.impl.SolrFieldMapper.getFullFieldName(SolrFieldMapper.java:611)
> 
> So I would like to get rid of all that I imported and start over. Is this 
> possible?
> 

I think this is related to https://issues.apache.org/jira/browse/STANBOL-519 
which is resolved in the meantime. So if you "svn update" and than "mvn clean 
install" this problem should be gone.

I am running the newest Stanbol version on my local machine. Uploading the  
"nciOncology.owl" with the above curl request runs now since about 20min and is 
has not yet completed.

However the  request

    url -H "Accept: application/rdf+xml" 
http://localhost:8080/entityhub/entity?id=http://www.mindswap.org/2003/nciOncology.owl#High-Grade_Mucoepidermoi_Breast_Carcinoma

succeeds and provides the expected results

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    xmlns:j.0="http://xmlns.com/foaf/0.1/";
    xmlns:owl="http://www.w3.org/2002/07/owl#";
    xmlns:j.1="http://purl.org/dc/terms/";
    xmlns:j.2="http://www.iks-project.eu/ontology/rick/model/";
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"; > 
  <rdf:Description rdf:about="http://www.mindswap.org/2003/nciOncology.owl";>
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Ontology"/>
    <rdfs:comment>Produced by the Enterprise Vocabulary System (EVS), a 
         collaborative project by the NCI Center for Bioinformatics and the 
         NCI Office of Communications.  National Cancer Institute,
         National Institutes of Health, Bethesda, MD 20892, U.S.A.
        </rdfs:comment>
    <rdfs:comment>The OWL version of the NCI Thesaurus is produced by
the 
         EVS in collaboration with Jim Hendler and Jen Golbeck, 
         Maryland Information and Network Dynamics Lab, 
         Semantic Web Agents Project (Mindswap)
         University of Maryland, College Park, Maryland, U.S.A.
        </rdfs:comment>
    <rdfs:comment>NCI Thesaurus, a controlled vocabulary in support of 
         NCI administrative and scientific activities.
        </rdfs:comment>
    <owl:versionInfo>03.09d</owl:versionInfo>
    <j.0:isPrimaryTopicOf 
rdf:resource="http://www.mindswap.org/2003/nciOncology.owl.meta"/>
  </rdf:Description>
  <rdf:Description 
rdf:about="http://www.mindswap.org/2003/nciOncology.owl.meta";>
    <j.0:primaryTopic 
rdf:resource="http://www.mindswap.org/2003/nciOncology.owl.meta"/>
    <j.2:site 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string";>entityhub</j.2:site>
    <j.2:about rdf:resource="http://www.mindswap.org/2003/nciOncology.owl"/>
    <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Document"/>
    <j.1:created 
rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime";>2012-03-14T11:02:47.883Z</j.1:created>
    <j.1:modified 
rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime";>2012-03-14T11:02:47.899Z</j.1:modified>
    <j.2:hasState 
rdf:resource="http://www.iks-project.eu/ontology/rick/model/entityState-proposed"/>
  </rdf:Description>
</rdf:RDF>


best
Rupert

Reply via email to