如果我有有兩個不同的屬性,但具有相同名稱的兩個類:如何在ROWLEX中的兩種不同類型上定義一個具有相同名稱的屬性?
[RdfSerializable]
public class Type1
{
[RdfProperty(true), Name = "title"]
public string Title { get; set; }
}
[RdfSerializable]
public class Type2
{
[RdfProperty(true), Name = "title"]
public string Title { get; set; }
}
,並嘗試將其序列化RDF與http://www.w3.org/RDF/Validator/服務驗證它們。一切都很好,他們是正確的。 但是,當我嘗試使用OntologyExtractor.exe工具從這些類生成OWL文件後,我收到以下消息: 「本體提取失敗,http://test.org/1.0#title分配給多個類型。」 這是一個奇怪的消息,因爲上層類是正確的,並且有一些RDF規範與具有相同命名屬性的不同類具有相同的情況。
太棒了!謝謝!之後我會驗證它。 – 2009-08-10 09:03:12