【发布时间】:2014-04-16 10:03:07
【问题描述】:
我在 protege 中创建了一个文件系统本体。我已将文件创建日期的范围设置为 dateTime,如下面的代码所示。
<owl:DatatypeProperty rdf:about="http://www.semanticweb.org/administrator/ontologies/2014/2/untitled-ontology-5#created">
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
<rdfs:domain rdf:resource="http://www.semanticweb.org/administrator/ontologies/2014/2/untitled-ontology-5#File"/>
<rdfs:comment>Time when the file was last accessed.</rdfs:comment>
<rdfs:label>fileLastAccessed</rdfs:label>
在日期创建属性中,我存储 java 日期 Date date = new Date();(转换为字符串后)
它正确存储为:
<File rdf:about="http://www.semanticweb.org/administrator/ontologies/2014/2/untitled-ontology-5#8117c6b9-3db8-4ab9-8de4-ba67f52ac615">
<created>Wed Apr 16 14:37:30 PKT 2014</created>
<hasPath>/Documents/Untitled Document 5</hasPath>
我的问题是:将 java Date 存储在 XMLSchema#dateTime 中是否安全/正确?
我做对了还是错了?
【问题讨论】: