2015-12-02 26 views
1

我拉動http://dbpedia.org/page/The_Bronx的抽象信息,它給了我德語,但我想獲得英語。我無法使用SPARQL。 這裏是我的代碼:如何在耶拿獲得不同語言的對象?

Resource bronx=model3.getResource("http://dbpedia.org/resource/The_Bronx"); 
System.out.println("Description:"+bronx.getProperty(model3.getProperty("http://dbpedia.org/ontology/abstract")).getObject().toString()); 

而且它打印此: 說明:模具布朗克斯[B ???? KS]北京時間seit DEM 10. Januar 1874年德nördlichste斯塔德貝吉爾克(鎮)馮紐約市。 Er deckt sich mit Bronx County,dem amdrittstärkstenbesiedelten County des Bundesstaates New York。@ de

問題是我怎樣才能得到這個英文文本(@en)?

回答

1

財產abstract是多值的,但你問了一個對象,所以耶拿了一個,這恰好是德國人(「......」@de)。請參閱listProperties並查找是的對象。或者使用SPARQL。