Rowlex-日期时间检索问题

发布于 2024-08-01 12:43:11 字数 2931 浏览 9 评论 0原文

我最近在 Rowlex 中遇到了一个问题。 它与日期时间检索有关。
在我的 RDF 文件中,我有两个这样的实例:

<Ontologyowl:Note rdf:about="http://www.faraway_learning.edu/ehsanm/not106179">
    <Ontologyowl:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Test1</Ontologyowl:title>
    <Ontologyowl:dateOfCreation rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2009-03-28T20:58:31Z</Ontologyowl:dateOfCreation>
    <Ontologyowl:relatedToClass rdf:resource="clas000021"/>
    <Ontologyowl:ranking_general_stuNum rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</Ontologyowl:ranking_general_stuNum>
    <Ontologyowl:ranking_general_tchNum rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</Ontologyowl:ranking_general_tchNum>
    <Ontologyowl:isShared rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">True</Ontologyowl:isShared>
    <Ontologyowl:anonymousAuthor rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">False</Ontologyowl:anonymousAuthor>
</Ontologyowl:Note>
<Ontologyowl:Note rdf:about="http://www.faraway_learning.edu/ehsanm/not941065">
    <Ontologyowl:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Test 2</Ontologyowl:title>
    <Ontologyowl:dateOfCreation rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2008-09-09T13:18:35Z</Ontologyowl:dateOfCreation>
    <Ontologyowl:relatedToResource>
        <Ontologyowl:LearningResource rdf:about="res323717"/>
    </Ontologyowl:relatedToResource>
    <Ontologyowl:ranking_general_stuNum rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</Ontologyowl:ranking_general_stuNum>
    <Ontologyowl:ranking_general_tchNum rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</Ontologyowl:ranking_general_tchNum>
    <Ontologyowl:isShared rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">True</Ontologyowl:isShared>
    <Ontologyowl:anonymousAuthor rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">False</Ontologyowl:anonymousAuthor>
</Ontologyowl:Note>

并且我使用此代码来检索这两个实例的日期时间:

OwlThing[] noteThing = rdfDoc.GetIndividuals(Note.Uri, false, false, false);
    foreach (OwlThing item in noteThing)
    {
        DataRow dtRow = resultDt.NewRow();
        dtRow["uri"] = ((Note_)item).ID;
        dtRow["title"] = ((Note_)item).title.ToString();
        dtRow["date"] = (DateTime)(((Note_)item).dateOfCreation);

但是,“((Note_)item).dateOfCreation”部分的值与 RDF 值不同。 对于上面的示例,它们是:

标题:测试 2
值:2008-09-09T17:48:35Z
标题:测试1
值:2009-03-29T01:28:31Z
替代文本 http://img37.imageshack.us/img37/6489/26739420.jpg< /a>

我在这个过程中犯了什么错误吗?
先感谢您

I've encountered a problem in Rowlex recently. It is related to datetime retrieving.
In my RDF file, I have two instances like this:

<Ontologyowl:Note rdf:about="http://www.faraway_learning.edu/ehsanm/not106179">
    <Ontologyowl:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Test1</Ontologyowl:title>
    <Ontologyowl:dateOfCreation rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2009-03-28T20:58:31Z</Ontologyowl:dateOfCreation>
    <Ontologyowl:relatedToClass rdf:resource="clas000021"/>
    <Ontologyowl:ranking_general_stuNum rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</Ontologyowl:ranking_general_stuNum>
    <Ontologyowl:ranking_general_tchNum rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</Ontologyowl:ranking_general_tchNum>
    <Ontologyowl:isShared rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">True</Ontologyowl:isShared>
    <Ontologyowl:anonymousAuthor rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">False</Ontologyowl:anonymousAuthor>
</Ontologyowl:Note>
<Ontologyowl:Note rdf:about="http://www.faraway_learning.edu/ehsanm/not941065">
    <Ontologyowl:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Test 2</Ontologyowl:title>
    <Ontologyowl:dateOfCreation rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2008-09-09T13:18:35Z</Ontologyowl:dateOfCreation>
    <Ontologyowl:relatedToResource>
        <Ontologyowl:LearningResource rdf:about="res323717"/>
    </Ontologyowl:relatedToResource>
    <Ontologyowl:ranking_general_stuNum rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</Ontologyowl:ranking_general_stuNum>
    <Ontologyowl:ranking_general_tchNum rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</Ontologyowl:ranking_general_tchNum>
    <Ontologyowl:isShared rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">True</Ontologyowl:isShared>
    <Ontologyowl:anonymousAuthor rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">False</Ontologyowl:anonymousAuthor>
</Ontologyowl:Note>

and I use this code to retrieve datetime of these two instances:

OwlThing[] noteThing = rdfDoc.GetIndividuals(Note.Uri, false, false, false);
    foreach (OwlThing item in noteThing)
    {
        DataRow dtRow = resultDt.NewRow();
        dtRow["uri"] = ((Note_)item).ID;
        dtRow["title"] = ((Note_)item).title.ToString();
        dtRow["date"] = (DateTime)(((Note_)item).dateOfCreation);

but, the value of part '((Note_)item).dateOfCreation' is different from the RDF value. For the above example they are:

title: Test 2
value: 2008-09-09T17:48:35Z
title: Test1
value: 2009-03-29T01:28:31Z
alt text http://img37.imageshack.us/img37/6489/26739420.jpg

Am I making any mistake in this progress?
Thank you in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

茶花眉 2024-08-08 12:43:15

您的问题没有显示日期时间有任何不一致。 调试器屏幕截图窗口显示的日期时间与上面的 RdfDocument 中的日期时间完全相同。

但是,由于计算机的区域设置,您可能会遇到日期时间问题。 如果是这样,那么这是一个普遍问题,与 ROWLEX 无关。 计算正确的日期时间并不是一件小事,它在很大程度上取决于您的地区、时区,甚至取决于您的鞋码:)

Your question does not show any inconsistency on the datetime. The debugger screenshot window shows exactly the same datetime as in the RdfDocument above.

However, you might experience datetime issues due to your computer's regional settings. If it is so, then this is a general issue that has nothing to do with ROWLEX. Calculating the correct datetime is not a trivial thing, it depends a lot on your region, your timezone, even on your shoesize :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文