如果我有这两个具有两个不同属性但名称相同的类:
[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 规范具有相同的情况,不同的类具有相同的命名属性。