260 likes | 370 Views
Using IRMA Web Services to create dynamic web applications. Proof of Concept achieved! by Melanie Ransmeier and Mike Cox. Presentation overview. Project Inspiration Making it Happen Search criteria Data Set-up Getting the data - REST Page Layout Data Processing & Display Demo
E N D
Using IRMA Web Services to create dynamic web applications Proof of Concept achieved! by Melanie Ransmeier and Mike Cox
Presentation overview • Project Inspiration • Making it Happen • Search criteria • Data Set-up • Getting the data - REST • Page Layout • Data Processing & Display • Demo • Future Work & Potential
Inspiration!Air Quality in Parks • Goal is to provide park and network specific air quality information. • Identify location specific air quality impacts • Summarize relevant studies and monitoring • Links to available data sources • Idea! Let’s provide all of the significant references too. • Problem – Don’t want to build or maintain a database to store this information.
IRMA Connections • NRInfo already stores and manages reference information • Most of our key references were already in NatureBib and transitioned to NRInfo • Service oriented architecture allows for access to the databases supporting NRInfo from a public facing web page.
Search Criteria Data Set-up • Provide high quality air references • Park/Network specific • Sort by topic • aerosol • contaminants • deposition • haze • mercury • Establish our own reference set • Tie refs to locations in NRInfo • Formalize key-words and add them to NRInfo records • *ARD_Park-Air-Info_Collection • nitrogen • ozone • sulfur • toxics • visibility
More data considerations • Entering new citations • Check for existing records first! • Modify existing records • Ownership = permission to edit key-words and locations. • Making a reference visible on the web • Ref must be “activated” • and made “public” in NRInfo • Information resource sensitivity must be set to “Non-Sensitive” this needs to be set for all legacy records imported from NatureBib or DataStore.
The Programming Goal Create a simple search page that pulls specific references from NRINFO and output formatted data to a web page
REST • “Representational State Transfer” • Fielding (2000) Rest Constraints: • Client-Server • Stateless • Cache • Uniform Interface • Layered 6. Code On Demand (Optional)
Basically You send a web request (URI) to get formatted data! http://example.com?key={key}
NRINFO REST • NRINFO Reference • Returns a Representation of Data in NRINFO database • Here, it’s a subset of information pertaining to a reference • According to Reference Application Help Manual: http://inp2300fcsmaca1/Reference/Reference/Search?units= {unitcodes}&searchField={searchField}&searchStrings= {searchstrings}&format=xml
Reference Service Parameters • Format – *Required • Unit Code(s) • Search Field • Search String • Start Index • Reference Type • Bounding Area
http://inp2300fcsmaca1/Reference/Reference/Search? format=xml& units=ROMO& searchField=keyword& searchStrings=ARD_Park-Air-Info_Collection;aerosol
ARD Search Page Design Basic Query – Unit + Keyword Formatted, Sorted Results
Park List Bound to XML UnitList.xml … <unit> <name> Rocky … • Bound to xml file • easy to change • reduces web page size • Ideally, eventually will pull from Unit service
results.cfm <cf div url = …> Ajax Panel Process Drop Down Values Form REST URL Request Info from NRINFO Apply XSLT to Sort Results Return Formatted Data Profit
XML HTML <cfxmlvariable="myxsl"> <xsl:stylesheetversion="1.0"xmlns:xsl=http://www.w3.org/1999/XSL/Transformxmlns:irma="http://schemas.datacontract.org/2004/07/NRPC.Reference.External.Service.Composition"> <xsl:templatematch="/"> <html> <body> <xsl:for-each select="irma:ArrayOfReferenceList/irma:ReferenceList"> <xsl:sortdata-type="text"select="irma:DisplayCitation"order="ascending"/> <pclass="hanging-indent"> <xsl:value-of select = "irma:DisplayCitation" /> </p> </xsl:for-each> </body> </html> </xsl:template> </xsl:stylesheet> </cfxml> XSLT
On update of Park or subject, region automatically refreshes
LIVE DEMO -- hopefully http://www.nature.nps.gov/air/Permits/aris/References/RefSearch.cfm
Summary • Actively getting freshest data from NRINFO • Reduce Redundancy • Data Storage • Update
Future Work & Potential • Allow multi-select from drop down lists • Include download files when possible • Update GRI & ARD publications pages to draw from NRINFO • Improve efficiency of publication management • Custom delivery of information on webpages • More user-centric
References • http://nrpcsharepoint/irma/Reference%20Application%20Help/ReferenceHelp.pdf • http://archive.msdn.microsoft.com/cannonicalRESTEntity • http://en.wikipedia.org/wiki/Representational_State_Transfer • http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
Thank you • Air Resources Division • Ellen Porter • Colleen Flanagan • Ksienya Pugacheva • Geologic Resources Division • Bruce Heise & Tim Connors • I&M • Brent Frakes • Kathy Dratch • Lisa Nelson
Questions? Melanie Ransmeier melanie_ransmeier@nps.gov 303.969.2315 Mike Cox michael_cox@partner.nps.gov 303.969.2082