2010-03-25 2 views
0

skos : Concept를 사용하여 자녀를 액세스하고 싶습니다. getChildren ("skos : Concept") 및 getChildren ("Concept") 둘 다 비어있는 목록을 제공하므로 대신 무엇을 사용해야합니까?. getChildren (문자열)를위한 Javadoc에 따르면jdom을 통해 지정된 이름의 자녀에게 액세스

<owl:AnnotationProperty rdf:about="&dc;identifier"/> 
<owl:ObjectProperty rdf:about="&skos;narrower"/> 

<skos:Concept rdf:about="#concept:0_acetylpantolactone:4253501"> 
    <skos:prefLabel xml:lang="" 
     >0-acetylpantolactone</skos:prefLabel> 
    <skos:hiddenLabel xml:lang="" 
     >2(3H)-Furanone, 3-(acetyloxy)dihydro-4,4-dimethyl-, (R)-</skos:hiddenLabel> 
    <dc:identifier rdf:resource="urn:CHID:028227363"/> 
    <dc:identifier rdf:resource="urn:MESH:C014305"/> 
</skos:Concept> 

<skos:Concept rdf:about="#concept:1012S:4202655"> 
    <skos:prefLabel xml:lang="">1012S</skos:prefLabel> 
    <skos:hiddenLabel xml:lang="" >C19-H16-Cl2-N6-O</skos:hiddenLabel> 
    <skos:hiddenLabel xml:lang="">Compound 1012S</skos:hiddenLabel> 
    <dc:identifier rdf:resource="urn:CAS:95211_91_9"/> 
    <dc:identifier rdf:resource="urn:CHID:095211919"/> 
</skos:Concept> 

답변

1

:

내 예를 들어, 데이터

"이 지정된 로컬 이름이 요소 내에 직접 중첩 된 모든 하위 요소 (한 레벨 깊이)의 목록을 반환 네임 스페이스에 속하지 않는다. " 문제는 요소에 네임 스페이스가 있다고 생각하고 getChildren (String, Namespace)을 사용해야합니다.

Namespace ns = Namespace.getNamespace("skos", [String uri]); 
List l = elem.getChildren("Concept", ns); 
관련 문제