Hi,
Thanks to your remarks Philip about openrdf version I almost made it! I was
able to get all the entities (almost) and I am very happy about that. The
.NET version of the openrdf seems usable.
1. After all the code written with Openrdf is more clean as it more easier
to construct queries?
2. I still do know how to access "FeatureConstants", so I created this C#
method:
static string GetFeatureInstance(SemanticAnnotation.Feature[] kimfea)
{
foreach (SemanticAnnotation.Feature f in kimfea)
{
if (f.Key == "inst")
return f.Value;
}
return kimfea[1].Value;
}
Any help here will also be appreciated.
I also want to post my .NET sample, but I need to do some more tests and
tweaking.
Cheers,
Anton
2009/4/1 Philip Alexiev <[email protected]>
> Hi Anton,
>
> In order to use the web services you don't need the sesame libraries. You
> would use them like you use any web services. A complete description with
> examples can be found at our documentation at
> http://www.ontotext.com/kim/doc/sys-doc/WSAPI.html . The is no problem
> writing a C# client to work with the web services, as they are language
> independent.
> As with the C# port of Sesame - I think the problem is you are using
> dotSesame2 which is a Sesame 2 port in which the URIImpl.RDFS_LABEL is moved
> in RDFS.LABEL. KIM is using Sesame 1 which C# port is dotSesame.
>
> Greetings,
> Philip
>
>
> Anton Andreev wrote:
>
>> Hi, Philip
>>
>> Thank you for your kind efforts to help me.
>>
>> The problem is that you somehow missed the bottom of the problem.
>> I am using the MICROSOFT .NET FRAMEWORK, which means that I do have any
>> jars files and:
>>
>> 1. I do know from which web service to access
>> com.ontotext.kim.client.model.FeatureConstants.
>> Maybe it will be best if you send me the java definition of this object,
>> so I can rewrite it C#.
>>
>> 2. Fortunately I found a project
>> http://sourceforge.net/projects/dotsesame, which converts openrdf jars to
>> .NET dlls.
>> All .NET developers rejoice!
>>
>> 3. Unfortunately there is something missing. I used dotsesame2 version
>> 2.2.4 from February 8, 2009. The "URIImpl.RDFS_LABEL" is missing from the
>> .NET version and I just wonder if "URIImpl.RDFS_LABEL" is depricated or the
>> problem is due to the conversion to .NET. Is it possible that you simply
>> send me the value of "URIImpl.RDFS_LABEL"?
>>
>> Thanks,
>> Anton
>>
>>
>> 2009/3/31 Philip Alexiev <[email protected] <mailto:
>> [email protected]>>
>>
>> Hi Anton,
>>
>> The answers to these questions are very easy to find in the
>> documentation. I recommend you get familiar with KIM and Sesame
>> documentation. They can be found at these locations:
>>
>> KIM documentation: http://www.ontotext.com/kim/doc/sys-doc
>> Sesame documentation: http://www.openrdf.org/documentation.jsp
>> Sesame API: http://www.openrdf.org/doc/api/
>>
>>
>> 1. com.ontotext.kim.client.model.FeatureConstants is located in
>> kim-api.jar
>>
>> 2. this functionality comes with Sesame and you can find
>> information in the Sesame API
>>
>> 3. again Sesame and in particular
>>
>> http://www.openrdf.org/doc/api/org/openrdf/model/impl/URIImpl.html#RDFS_LABEL
>>
>> http://www.openrdf.org/doc/api/org/openrdf/model/URI.html#getURI()<http://www.openrdf.org/doc/api/org/openrdf/model/URI.html#getURI%28%29>
>> <
>> http://www.openrdf.org/doc/api/org/openrdf/model/URI.html#getURI%28%29>
>>
>>
>>
>> Greetings,
>> Philip
>>
>>
>> Anton Andreev wrote:
>>
>> Hi,
>>
>> I trying the code from:
>>
>> http://www.ontotext.com/kim/doc/sys-doc/ExploreEntitiesExamples.html
>> to get all entities for a document.
>> I am trying to rewrite the code from Java to Microsoft .NET
>> using the provided webservices.
>> I have the following problems:
>>
>> 1. I do know where FeatureConstants is declared?
>> 2. "Resource" is a Java object. This object is used with
>> "BNodeImpl" and "URIImpl" and "uriRes.toString() " is called.
>> The problem is that I do know these classes and methods work
>> and I do not know in what format they return it.
>> 3. Same problem with URIImpl.RDFS_LABEL.getURI().
>>
>> Java code:
>> if (kimFeatures != null)
>> {
>> String resourceUri = (String)
>> kimFeatures.get(FeatureConstants.INSTANCE);
>> Resource uriRes = null;
>> if (resourceUri.startsWith("_")) {
>> // anonymous resource
>> uriRes = new BNodeImpl(resourceUri);
>> } else {
>> uriRes = new URIImpl(resourceUri);
>> }
>> // get the labels of the entities
>> SemanticQueryResult properties = apiSesame
>> .evaluateSelectSeRQL("select distinct
>> MainLabel "
>> + "from {<" + uriRes.toString() +
>> ">} <"
>> + URIImpl.RDFS_LABEL.getURI() + ">
>> {MainLabel}");
>>
>> }
>>
>> I will really appreciate your help!
>>
>> Thanks,
>> Anton
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Kim-discussion mailing list
>> [email protected] <mailto:[email protected]>
>> http://ontotext.com/mailman/listinfo/kim-discussion
>>
>>
>>
>>
>
_______________________________________________
Kim-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion