Jena Ontology API

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

JenaOntologyAPIInthissectionIwillgiveageneralintroductiontothetheJena2ontologyAPI.I'llalsodescribearangeofcommonusertasks.Iwon'tgointoallofthemanydetailsoftheAPIhere:youshouldexpecttorefertotheJena2JavadoctogetfulldetailsofthecapabilitiesoftheAPI.Feedback,(viathejena-devsupportlist)iswelcomed.PrerequisitesIwillassumethatyouhaveabasicfamiliaritywithRDFandwithJena.TherearemanyotherJenahelpdocumentsyoucanreadforbackgroundonthesetopics.ThereisalsoaJenaprogrammingtutorialyoucanfollowthrough.Jenaisaprogrammingtoolkit,usingtheJavaprogramminglanguage.Whilethereareafewcommand-linetoolstohelpyouperformsomekeytasksusingJena,mostlyyouuseJenabywritingJavaprograms.Theexamplesinthisdocumentwillbeprimarilycodesamples.Ialsowon'tbeexplainingtheOWLorRDFSontologylanguagesinmuchdetailinthisdocument.Youshouldexpecttorefertosupportingdocumentationfordetailsonthoselanguages,forexampletheW3COWLdocumentindex.Note:Atthetimeofwriting,workonOWLversion1.1isstillunderway.NodecisionhasyetbeenmadeaboutwhenJenawillsupportthenewOWL1.1features.IwillonlyuseOWL1.0featuresinthisdocument.OverviewThesectionofthemanualisbrokenintoanumberofsections.Youdonotneedtoreadtheminsequence,thoughlatersectionsmayrefertoconceptsandtechniquesintroducedinearliersections.Thesectionsare:1.Overview2.Generalconcepts3.Runningexample:theESWContology4.Creatingontologymodels5.Compoundontologydocumentsandimportsprocessing6.Thegenericontologytype:OntResource7.Ontologyclassesandbasicclassexpressions8.Ontologyproperties9.Morecomplexclassexpressions10.Instancesorindividuals11.Ontologymeta-data12.Ontologyinference:overview13.WorkingwithDAML+OILontologies14.Workingwithpersistentontologies15.Experimentalontologytools16.CommonontologyapplicationproblemsandsampleprogramsFurtherassistanceIhopethatthisdocumentwillbesufficienttohelpmostreaderstogetstartedusingtheJenaontologyAPI.Forfurthersupport,pleasepostquestionstotheJenasupportlist:jena-dev@yahoogroups.YoucanalsoreportbugsdirectlyintotheJenabugtrackeronSourceForge.Pleasenotethatweaskthatyouusethesupportlistorthebug-trackertocommunicatewiththeJenateam,ratherthansendemailtotheteammembersdirectly.ThishelpsusmanageJenasupportmoreeffectively,andfacilitatescontributionsfromotherJenacommunitymembers.GeneralconceptsInawidely-quoteddefinition,anontologyis…aspecificationofaconceptualization[Gruber,T.1993]Let'sunpackthatbriefcharacterisationabit.Itmeansthatanontologyallowsaprogrammertospecify,inanopen,meaningful,waytheconceptsandrelationshipsthatcollectivelycharacterisesomedomain.Examplesmightbetheconceptsofredandwhitewine,grapevarieties,vintageyears,wineriesandsoforththatcharacterisethedomainof'wine',andrelationshipssuchas'wineriesproducewines','wineshaveayearofproduction'.Thiswineontologymightbedevelopedinitiallyforaparticularapplication,suchasastock-controlsystematawinewarehouse.Assuch,itmaybeconsideredsimilartoawell-defineddatabaseschema.Theadvantagetoanontologyisthatitisanexplicit,first-classdescription.Sohavingbeendevelopedforonepurpose,itcanbepublishedandreusedforotherpurposes.Forexample,agivenwinerymayusethewineontologytolinkitsproductionscheduletothestocksystematthewinewarehouse.Alternatively,awinerecommendationprogrammayusethewineontology,andadescription(ontology)ofdifferentdishestorecommendwinesforagivenmenu.Therearemanywaysofwritingdownanontology,andavarietyofopinionsastowhatkindsofdefinitionshouldgoinone.Inpractice,thecontentsofanontologyarelargelydrivenbythekindsofapplicationitwillbeusedtosupport.InJena,wedonottakeaparticularviewontheminimalornecessarycomponentsofanontology.Rather,wetrytosupportavarietyofcommontechniques.InthismanualItrytoexplainwhatis–andtosomeextentwhatisn't–possibleusingJena'sontologysupport.SinceJenaisfundamentallyanRDFplatform,Jena'sontologysupportislimitedtoontologyformalismsbuiltontopofRDF.SpecificallythismeansRDFS,thevarietiesofOWL,andthenow-obsoleteDAML+OIL.Iwillprovideaverybriefintroductiontotheselanguageshere.Pleaserefertotheextensiveon-linedocumentationfortheseformalismsforcompleteandauthoritativedetail.RDFSRDFSistheweakestontologylanguagesupportedbyJena.RDFSallowstheontologisttobuildasimplehierarchyofconcepts,andahierarchyofproperties.Considerthefollowingtrivialcharacterisation(withapologiestobiology-trainedreaders!):Table1:AsimpleconcepthierarchyUsingRDFS,Icansaythatmyontologyhasfiveclasses,andthatPlantisasub-classofOrganismandsoon.Soeveryanimalisalsoanorganism.Agoodwaytothinkoftheseclassesisasdescribingsetsofindividuals:organismisintendedtodescribeasetoflivingthings,someofwhichareanimals(i.e.asub-setofthesetoforganismsisthesetofanimals),andsomeanimalsarefish(asubsetofthesetofallanimalsisthesetofallfish).Todescribetheattributesoftheseclasses,Icanassociatepropertieswiththeclasses.Forexample,animalshavesensoryorgans(noses,eyes,etc.).AgeneralpropertyofananimalmightbesenseOrgan,todenoteanygivensensoryorgansaparticularanimalhas.Ingeneral,fishhaveeyes,soafishmighthaveaeyespropertytorefertoadescriptionoftheparticulareyestructureofsomespecies.Sinceeyesareatypeofsensoryorgan,wecancapturethisrelationshipbe

1 / 32
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功