UsingOntoBuilderforOntologyCreation.docx

上传人:b****4 文档编号:24630825 上传时间:2023-05-29 格式:DOCX 页数:12 大小:600.04KB
下载 相关 举报
UsingOntoBuilderforOntologyCreation.docx_第1页
第1页 / 共12页
UsingOntoBuilderforOntologyCreation.docx_第2页
第2页 / 共12页
UsingOntoBuilderforOntologyCreation.docx_第3页
第3页 / 共12页
UsingOntoBuilderforOntologyCreation.docx_第4页
第4页 / 共12页
UsingOntoBuilderforOntologyCreation.docx_第5页
第5页 / 共12页
点击查看更多>>
下载资源
资源描述

UsingOntoBuilderforOntologyCreation.docx

《UsingOntoBuilderforOntologyCreation.docx》由会员分享,可在线阅读,更多相关《UsingOntoBuilderforOntologyCreation.docx(12页珍藏版)》请在冰豆网上搜索。

UsingOntoBuilderforOntologyCreation.docx

UsingOntoBuilderforOntologyCreation

UsingOntoBuilderforOntologyCreation

Author:

GiovanniModica

Date:

10/25/2018

 

1.BrowsingFeaturesofOntoBuilder

OntoBuilderwasdesignedtoworklikeawebbrowser.Figure1showstheOntoBuilderbrowserinterface.TonavigatetoapagesimplyentertheURLintotheaddressbar(e.g.)andpressenterorclickthe“Go”button.BydefaultOntoBuilderwillusetheHTTPprotocolwhennoprotocolisspecified,soaURLsuchaswillbeautomaticallychangedto.URLscanalsobeenteredbymeansofcommoncopy/pastecommandseitherbyrightclickingontheaddressbarorusingthehot-keysshortcuts;theseshortcutsarecompatiblewiththeMSWindowsstandards(e.g.crtl-Cforcopy,crtl-Vforpaste,etc.).

Figure1.TheOntoBuilderbrowserinterface.

Oncethe“Go”buttonisclicked,theHTMLpageassociatedwiththeURLwillbedisplayedinthe“HTMLView”panel.OntoBuildermaintainsahistoryofvisitedURLs,whichcanbeaccessedusingacomboboxlistintheaddressbar.Theusercanusethebackwardsandforwardsbuttonsinthetoolboxtonavigatethehistory.Thenumberofentriesinthehistoryislimitedbyanoptioninthetooloptionsdialogasshowninfigure2.Thehistorycanbecleared(allentriesinthehistorywillbedeleted)byclickinginthe“ClearHistory”button.

Figure2.OntoBuilderbrowseroptions.

Othernavigationalaspectscanalsobesetinthe“Browser”optionstab.The“AutomaticMETAnavigation”optionisforpagescontainingredirectionMETAtagssuchasthefollowing:

BycheckingthisoptionOntoBuilderwillautomaticallyloadtheURLspecifiedintheURLattributefortheMETAtag.

TheconnectiontimeoutindicatestheamountoftimetowaitbeforeabandoningaURLconnection.Byspecifying-1sec.,OntoBuilderwillusethesystemdefaultconnectiontimeout.Thisoptionisveryusefulforslowconnectionlinks.

OntoBuildercanalsobedirectedtouseaProxyserverforInternetconnection.Byspecifyingaproxyhostandport,OntoBuilderwillretrieveHTMLpagesthroughtheproxyinsteadofadirectconnection(thedefault).ThisoptionisveryusefulifrunningOntoBuilderbehindfirewalls.

OntoBuilderhassupportforHTMLcookies,howevercookiesdonotpersistoutsideOntoBuilderwizardsessions.Thismeansthatcookiesarepersistentwhileretrievinganontologyusingtheontologycreationwizard,butoncethewizardfinishestheontologygeneration,anycookieinformationwillbelost.

2.GeneratingOntologies

OncethewebpageforwhichwewanttoextracttheontologyfromisloadedinOntoBuilder,wecanlaunchthe“OntologyCreationWizard”byselectingtheappropriatesubmenucommandunderthe“Ontology”menu,orbyclickingtheappropriateiconintheapplicationtoolbox,orbyusingthehot-keycrtl-W.Inordertoshowhowthewizardworkswewillbuildamulti-page(bymulti-pageontologywemeananontologythatisspreadacrossmultiplepages)ontologyfortheAwebsite.Thefirststepofthewizardisshowninfigure3.

Figure3.Thefirststepoftheontologywizard.

TheontologytitledefaultstothetitleoftheHTMLpageandtheontologynamedefaultstothehostfromwheretheHTMLpageisretrieved.Byclickinginthe“Next:

buttonweopenthe“FormSelection”dialogasshowninfigure4.InthisdialogOntoBuilderwillshowalltheHTMLformsoftheHTMLalongwiththeirinputelements.Sinceonlyoneformcanbesubmittedatatimewhilebrowsingawebpage,theuserisrequiredtoselecttheformhe/shewantstosubmitfromtheformslistedunderthe“”nodeinthe“HTMLElements”panelontheupperleft.NoticethatthispanelshowsahierarchicalviewofalltheontologicalstructuresoftheHTMLpage.

Byclickingonanodeinthe“HTMLElements”panel,alltheattributes(defaultvalue,label,etc.)fortheelementrepresentedareshowninthe“Properties”panelinthelowerleft.IsworthnotingthatforHTMLframepages,theFORMelementswillbelocatedunderthe“”nodeinthe“HTMLElements”panel.

Figure4.The“FormSelection”wizarddialog

The“FormPreview”paneliswheretheuserwillentertherequiredvaluesforformsubmission.InordertodeterminewhattherequiredfieldsarewesuggestsimulatingtheprocessononeoftheInternetbrowserssuchasMSInternetExplorerorNetscapeNavigator.Figure5showstheminimumrequiredvaluesforourAexample.

Figure5.ThereservationprocessinA

ThesameprocessmustbesimulatedinOntoBuilder.Figure6showstheequivalentreservationinOntoBuilder.TheonlydifferenceisthatOntoBuilderdoesn’tsubmittheformbyclickingontheformsubmissionbutton,butinsteadbyclickingthe“Next”buttoninthewizard.

Figure6.ThereservationprocessinOntoBuilder

FailingtodothecorrectsimulationinOntoBuilderwillproduceunexpectedresults(mostofthetimesthewebsitewillreturnapageindicatingthatsomeinformationismissingorreturnanerrorpagewithabriefdescription).Generallyspeaking,whenusingOntoBuildertoretrieveanontologyfromawebapplication,theusermustsimulatetheuserinteractionasifworkinginacommonbrowser.

Returningtoourexample,therestofthewizardformsarethesame,excepttheywillcontainnewformelementstobeaddedtothefinalontology.Therestoftheprocessisverystraightforwardsowewilljustmentionhowtogettotheend.Therearefourmorepages(i.e.threemorewizarddialogs)toretrievethewholeontology,andinallfourpagesthereisnorequiredfields,defaultvalueswillbeenough.Alltheuserisrequiredtodoistoselecttheappropriateformonthe“HTMLElements”panelandsimulatetheformsubmissionbyclickingonthe“Continue”buttonineachofthenextthreepages.ThelastpagewillallowtoactuallymakethecarreservationinAvis,asshowninfigure7.

Figure7.Laststepintheontologycreationwizard

Duringthewizardoperationtheusercanusethe“Back”buttontogothepreviouslysubmittedform,incaseamistakewasdetected.Oncefinished,thewizardwilldisplaythegeneratedontologyonthe“MainPanel”,asdepictedinfigure8.Thegeneratedontologycanbesavedindifferentformatsbytheappropriatecommandsinthe“File”menu.

Figure8.Thegeneratedontology

3.EnteringtheRightURLsinOntoBuilder

Sometimes,enteringthesameURLusinginacommonbrowserintoOntoBuilderisnotthemostappropriatethingtodo.DuetoOntoBuilderlimitedHTMLrenderingcapabilities,someURLsmaynotbecorrectlydisplayed(andthus,difficulttonavigate).

Asanexample,considertheAwebsite.ByenteringinOntoBuilderwewillseethatitdoesabadjobinrenderingtheHTMLpage(seefigure9).NoontologywillbegeneratedfromsuchURL.ItisworthnothingthatnotalwaysabadrenderingoftheHTMLpagemeansthatnousefulontologycouldbegenerated,sometimesOntoBuilderhastroublerenderingtheHTMLpagebutthesourcecodeofitisretrievedcorrectly.Isrecommendedtoruntheontologycreationwizardevenifabadrenderingoccurs,inmostcasesthewizardwillidentifytheformelementseveniftheHTMLrenderingdidn’twork.

Figure9.AnexampleofbadHTMLrenderinginOntoBuilder

Inthesecases,itisadvisedtouseanInternetbrowsertoactuallynavigatetothepagewhereontologicalstructuresmaybeidentified.InthecaseofA,byclickinginthe“Rates&Reservations”buttoninthemenuthebrowserwilldisplaythereservationformundertheURL.Figure10showshowthistimeOntoBuildercorrectlyidentifiestheformelementsinthepage.

Figure10.AnexampleofcorrectHTMLrenderinginOntoBuilder

ForHTMLpagescontainingframes,itmaybeusefulto“break”theframesusingtheURLintheframeset.Asanexample,theURLisaHTMLpagecontainingframes(seetheemptyspaceintheuppersectionofthepageinfigure10)anditssourceisthefollowing:

InthiscaseitmaybebettertoentertheURLforthemainFrameframe(i.e.inOntoBuilder,thus“breaking”theframe.AlthoughOntoBuilderisdesignedtosupportframes(foranexampleloadtheNationalCwebsitetoseethreelevelsofframescorrectlyhandledbyOntoBuilder),wesuggesttofollowthepreviouspointswhendealingwithframes.

MostcommonInternetbrowserswillallowtoseethesourceofanHTMLpage.ByusingOntoBuilderyoucanenablethe“SourcePanel”tabtoseetheHTMLsourceoftheloadedpage.Forthis,checkthe“SourcePanel”checkboxinthe“View”taboftheOntoBuilderoptionsdialog.

Figure11.ViewoptionsforOntoBuilder

4.TroubleshootingOntologyGeneration

NotallthewebsitesrunassmoothlyastheAsite.Changesareyouwillnotgetacleanontologyatthefirstrun.ThisisduetothecomplexityofmostwebsitesdesignedusingtechnologiesnotsupportedbyOntoBuilder.AtthistimeOntoBuilderdoesn’tsupportanyscriptingatall.Currentwebsitesrelyonscriptingforvalidation,automaticfieldfilling,etc.AsanexampleconsiderapagethathastwofieldsPickupLocationandDropoffLocation,eachwithanassignedhiddenfield.ByusingscriptingthewebpageautomaticallyassignsthekeywordsameinthehiddenfieldfortheDropoffLocation,indicatingthatthedropofflocationwillbethesameofthepickuplocation.AllthisistransparenttotheuserandalsotoOntoBuilder.Ifth

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 法律文书 > 调解书

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1