- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 Jena 和 Owl 的新手,他们给了我一个本体。我可以使用 Protege 4.2 打开它,没有任何问题,但是当我尝试使用 Jena 打开它时,我得到:线程“main”org.apache.jena.riot.RiotException中出现异常:{E201}属性元素的多个子元素
。
我一直在本体论中研究它可能是什么,我注意到某些元素在一种语言中具有多个标签,例如:
<AnnotationAssertion>
<AnnotationProperty abbreviatedIRI="rdfs:label"/>
<AbbreviatedIRI>atc:A02BX02</AbbreviatedIRI>
<Literal xml:lang="no" datatypeIRI="&rdf;PlainLiteral">Sukralfat</Literal>
</AnnotationAssertion>
<AnnotationAssertion>
<AnnotationProperty abbreviatedIRI="rdfs:label"/>
<AbbreviatedIRI>atc:A02BX02</AbbreviatedIRI>
<Literal xml:lang="no" datatypeIRI="&rdf;PlainLiteral">antepsin</Literal>
</AnnotationAssertion>
<AnnotationAssertion>
<AnnotationProperty abbreviatedIRI="rdfs:label"/>
<AbbreviatedIRI>atc:A02BX02</AbbreviatedIRI>
<Literal datatypeIRI="&xsd;string">sucralfate</Literal>
</AnnotationAssertion>
<AnnotationAssertion>
<AnnotationProperty abbreviatedIRI="rdfs:label"/>
<AbbreviatedIRI>atc:A02BX02</AbbreviatedIRI>
<Literal xml:lang="no" datatypeIRI="&rdf;PlainLiteral">sukralfat</Literal>
</AnnotationAssertion>
这会导致问题吗?我使用的所有代码都可以与其他本体一起使用,所以我认为它确实来自这个本体。您知道什么可能导致此异常吗?
所以我把情况降到最低,但仍然遇到同样的错误:
<?xml version="1.0"?>
<!DOCTYPE Ontology [
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
<!ENTITY xml "http://www.w3.org/XML/1998/namespace" >
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>
<Ontology xmlns="http://www.w3.org/2002/07/owl#"
xml:base="http://www.ebi.ac.uk/Rebholz-srv/atc/public/ontologies/atc.owl"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
ontologyIRI="http://www.ebi.ac.uk/Rebholz-srv/atc/public/ontologies/atc.owl">
<Prefix name="" IRI="http://www.ebi.ac.uk/Rebholz-srv/atc/public/ontologies/atc.owl#"/>
<Prefix name="atc" IRI="http://www.legemiddelverket.no/Legemiddelsoek/Sider/Default.aspx#"/>
<Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
<Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
<Prefix name="xml" IRI="http://www.w3.org/XML/1998/namespace"/>
<Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/>
<Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/>
<Declaration>
<Class abbreviatedIRI="atc:J"/>
</Declaration>
<AnnotationAssertion>
<AnnotationProperty abbreviatedIRI="rdfs:label"/>
<AbbreviatedIRI>atc:J</AbbreviatedIRI>
<Literal datatypeIRI="&xsd;string">ANTIINFECTIVES FOR SYSTEMIC USE</Literal>
</AnnotationAssertion>
</Ontology>
这是java代码:
InputStream in = FileManager.get().open(filename);
if (in == null) {
throw new IllegalArgumentException("File: " + filename + " not found");
}
model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
model.read(in, null);
try {
in.close();
} catch (IOException e) {
System.err.println("Couldn't close the inputStream");
}
这有帮助吗?我真的不知道了...
最佳答案
关于java - 耶拿多个 rdfs :label,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16089692/
Schema.org 定义和使用名为 domainIncludes 的谓词和 rangeIncludes将类型与属性相关联(即 和 )。 然而在RDF Schema 1.1's speci
我对使用语义数据还很陌生,有一个快速的问题,但我找不到答案。 当创建一个 rdf 模式时,您实际上是在根据 OOP 创建一个类,即声明所有有效的属性等。如果是这种情况,那么说我想要一个名为“title
我有一个 RDFS 本体,它包含两个完全独立的类:User 和 Venue。我希望它们都具有通过名为 hasName 的属性提供的名称,对于 User 应该类似于: C
有很多使用以下命名空间的 rdfs 的例子 @prefix rdf: . 这是一个来自 w3c 的例子 一切正常,但是,rdf:Description rdf:ID 来自
SPARQL 1.1 Entailment Regimes的文档断言有可能产生不一致的图,而且不一致的原因只有一个:rdf:XMLLiteral : ex:a ex:b " "\u0000"^^
W3C中RDFS定义的基类的描述reference document声明某些类是一个类的实例和另一个类的子类(或在某些情况下是同一类的实例和子类)。来自更传统的面向对象背景,类作为实例的概念让我难以理
页面http://xmlns.com/foaf/spec/讨论 FOAF 词汇表。条款的详细信息在同一页中讨论(例如 http://xmlns.com/foaf/spec/#term_Person )
基本上,我知道 RDF、RDFS 和 OWL 用于定义本体以解决世界上的语义问题广泛的网络。 然而,这些术语让我在研究它们时有点困惑。这是我看完之后对他们关系的结论this article .如有不妥
我是 Jena 和 Owl 的新手,他们给了我一个本体。我可以使用 Protege 4.2 打开它,没有任何问题,但是当我尝试使用 Jena 打开它时,我得到:线程“main”org.apache.j
基本上,我知道 RDF、RDFS 和 OWL 用于定义本体以解决世界上的语义问题广泛的网络。 然而,这些术语让我在研究它们时有点困惑。这是我看完之后对他们关系的结论this article .如有不妥
下面是我的 .rdfs 文件。如果我的输入是 XXXX,我需要得到 YYYY。我该怎么做。 我的代码: StmtIterator iter = model.listStatements(
假设我有 :hasParent rdfs:subPropertyOf :hasAncestor 。 :hasAncestor rdf:type owl:TransitiveProperty . 这有一
我在 StackOverflow 上阅读了许多与 RDF 相关的问题,这些问题既有 RDFS 解决方案,也有 OWL 解决方案。 (值得注意的是, my own question ) 我理解推理器的概
在编写 RDF 和 RDFS 时,您是否应该创建一个涵盖两者的单个文档?或创建两个单独的文档?类似于 xml 和 xmls。 最佳答案 两种方法都可以,这完全取决于您自己的喜好。事实上,您可以根据需要
在 W3C explanation of OWL 2 QL据说 In particular, this profile (i.e OWL 2 QL) contains the intersection
在 W3C explanation of OWL 2 QL据说 In particular, this profile (i.e OWL 2 QL) contains the intersection
在 RDF 1.1 XML 语法文档中 rdf:resource 在定义 Empty Property Elements 时用作缩写形式: When a predicate arc in an RDF
我是本体领域的新手。我的问题是澄清问题而不是问题。 正在处理的信息以 RDF 格式编写。我构建了自己的 RDFS 本体,我想从我拥有的 RDF 数据中填充该本体。我怎么能用耶拿做到这一点? RDF
要指定一个 rdfs:Class 并组织一个本体,我想使用 SKOS。目前我使用 RDFS 属性定义我的类: :MyClass a rdfs:Class; rdfs:label "my lab
在《语义网络技术基础》一书中,当它转向对 RDFS 的解释以及为什么必须扩展 RDF 词汇表(使其变成本体语言)的原因时,词汇表中引入了容器和集合等特性。但它们被添加为 rdf:Seq , 例如。 为
我是一名优秀的程序员,十分优秀!