Work StudyPractical SoftwareEngineering                              Weather Service                              This doc...
Work StudyPractical Software Engineering 2012Contents1.    Customer requirements ............................................
Work StudyPractical Software Engineering 20121. Customer requirementsThe customer requirement is to develop a weather serv...
Work StudyPractical Software Engineering 2012      - Weather service generates intelligent output according to user input....
Work StudyPractical Software Engineering 2012              / LD21 / REST to RDF triple store              / LD22 / CityNam...
Work StudyPractical Software Engineering 20123. Estimation of project effort3.1 Time EstimationFor Time estimation we have...
Work StudyPractical Software Engineering 20123.1 Progress reportAbove diagram is suggesting total duration of the project ...
Work StudyPractical Software Engineering 20125. Use-Cases      The following diagrams illustrate the description of typica...
Work StudyPractical Software Engineering 2012Above diagram showing case model of the Weather service. Actor of this applic...
Work StudyPractical Software Engineering 2012Base on Actor Input weather Service fetch XML data from the www.weather.com a...
Work StudyPractical Software Engineering 2012Actors            UserPurpose           Check today’s weather and generate st...
Work StudyPractical Software Engineering 20126. Class DiagramA class diagram in the Unified Modeling Language (UML) is a t...
Work StudyPractical Software Engineering 20127. Sequence diagramsA sequence diagram in a Unified Modeling Language (UML) i...
Work StudyPractical Software Engineering 20128. Activity diagramsActivity diagrams are graphical representations of workfl...
Work StudyPractical Software Engineering 20129. Component DiagramIn the Unified Modeling Language, a component diagram dep...
Work StudyPractical Software Engineering 201211. Package diagramIn this diagram all components and servers and database st...
Work StudyPractical Software Engineering 201212. Object DiagramAn object diagram in the Unified Modeling Language (UML) is...
Work StudyPractical Software Engineering 201213. CRCCard diagramClass-Responsibility Collaborator (CRC) card visualize cla...
Work StudyPractical Software Engineering 201214. DFD DiagramWeather Service          Uday Sharma @2012           Page - 18 -
Work StudyPractical Software Engineering 201215. ER DiagramWeather Service          Uday Sharma @2012           Page - 19 -
Work StudyPractical Software Engineering 201216. Test Case16.1 Junit Test code@Test  public void testTestLocalService() { ...
Work StudyPractical Software Engineering 201217. References       Fetching weather information from the weather.com      ...
Upcoming SlideShare
Loading in...5
×

Intelligent Weather Service

1,038

Published on

Weather service which provide artificial intelligent output

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,038
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Intelligent Weather Service

  1. 1. Work StudyPractical SoftwareEngineering Weather Service This documents provides the idea about the intelligent weather service. Where use can see weather report in his/her mobile or on laptop. Weather report describe the current condition intelligent way like If weather in between 10 degree celcius to 30 degree celcius than its shows message like todays weather is quite cool and sunny and also display happy smiley :) But if weather otherway around 30 to 45 degree celcius than will show sad :( smiley. This document also describe the use cases Uday Sharma of the weather service and UML diagrams.Master Software Engineering HochshuleHofmr.mickeysharma@gmail.com 1/26/2012
  2. 2. Work StudyPractical Software Engineering 2012Contents1. Customer requirements ............................................................................................................... - 2 -2. Specifications ................................................................................................................................ - 2 -3. Estimation of project effort .......................................................................................................... - 5 -4. Booch object Diagram .................................................................................................................. - 6 -5. Use-Cases...................................................................................................................................... - 7 -6. Class Diagram ............................................................................................................................. - 11 -7. Sequence diagrams..................................................................................................................... - 12 -8. Activity diagrams ........................................................................................................................ - 13 -9. Component Diagram .................................................................................................................. - 14 -10. Distribution diagram ............................................................................................................... - 14 -11. Package diagram ..................................................................................................................... - 15 -12. Object Diagram ....................................................................................................................... - 16 -13. CRCCard diagram .................................................................................................................... - 17 -14. DFD Diagram .......................................................................................................................... - 18 -15. ER Diagram ............................................................................................................................. - 19 -16. Test Case ................................................................................................................................. - 20 -Weather Service Uday Sharma @2012 Page - 1 -
  3. 3. Work StudyPractical Software Engineering 20121. Customer requirementsThe customer requirement is to develop a weather service which can fetch the real timeweather information from the “www.weather.com”. Besides, this application will give naturallanguage string with intelligence e.g. “Today’s weather is …….” - Login Screen - User input screen - Output screen2. Specifications2.1 Target Determination Using this "Weather Service" system customer will get real time weather information in the form of Natural language with a special kind of intelligence (Emoticons). This service is the independent service so PC user as well as Mobile user also can get the benefit of this service. First step: User has to be a member of this service. Second Step: User has to be do log in and Third step: Service needs input from the customer like “City Name” or “Geocode of the City” on the basis of the input Service will extract REST data from the www.weather.com in the form of XML. This service read this XML and will generate RDF triple and store it into the RDF store, using SPARQL this service fetch data from the RDF store and Generate Natural Language String with Inference. Generated sting contain phrase and emoticons according to the user preference.2.2 Product UseThis application has developed to add intelligence in weather report. - Eligible customer can access weather service (commercial way).Weather Service Uday Sharma @2012 Page - 2 -
  4. 4. Work StudyPractical Software Engineering 2012 - Weather service generates intelligent output according to user input.This service user can access via URL. And user has to give them authenticationdetail. Authorized user has to provide input (City name) to weather service.2.3 Product Feature The functions are classified according to their relevance in two groups. Here are the features "1 Importance "of the primary functions to be implemented, functions of the" second Importance "to be realized, however, are secondary set of functions and therefore in lower processing priority. 1. Importance: / LF10/Authentication / LF11/Input for Weather service / LF12/Fetch REST data / LF13/Generate RDF triple / LF14/Store triple in RDF store / LF15/Fetch data using SPARQL / LF16/Generate Natural string / LF17/Adding intelligence in Natural String / LF18/Display weather condition with Image and string. 2. Importance: / LF80/ to developed intelligent system / Manage LF81/Generate weather according to user like2.4 Product data / LD10 / user data / LD20 / Weather Service dataWeather Service Uday Sharma @2012 Page - 3 -
  5. 5. Work StudyPractical Software Engineering 2012 / LD21 / REST to RDF triple store / LD22 / CityName2.5 Product Performance  Service is returning the weather report according to the user input in quick time.  This service can be accessed from any application for instance, from desktop based application, from web application or from mobile application.  For mobile application as per the user request it can return an avatar (a character which can speak the weather information).  On top of that, the avatar can change expressions and gestures depending on the weather (Good or Bad Weather)  The speed of the words per minutes the avatar speaks can be controlled from the user input.2.6 Desired quality Functionality: very well Reliability: very well Usability: normal Efficiency: normal Changeability: normal Portability: irrelevantWeather Service Uday Sharma @2012 Page - 4 -
  6. 6. Work StudyPractical Software Engineering 20123. Estimation of project effort3.1 Time EstimationFor Time estimation we have used Pivotaltracker which allows me to make time estimate forproject more agile way. Pivotal tracker will accessible by both client and Project manager orProject manager and Developer. Advantage of this tool is End user can see the current statusof the development.Weather Service Uday Sharma @2012 Page - 5 -
  7. 7. Work StudyPractical Software Engineering 20123.1 Progress reportAbove diagram is suggesting total duration of the project as well as total module in the project.4. Booch object Diagram Above diagram is showing the Authentication procedure.Weather Service Uday Sharma @2012 Page - 6 -
  8. 8. Work StudyPractical Software Engineering 20125. Use-Cases The following diagrams illustrate the description of typical activities in the system. They contain the actors involved, and the basic applications of the project and thus provide an outside view of the system again.5.1 Use-case diagramsWeather Service :Weather Service Uday Sharma @2012 Page - 7 -
  9. 9. Work StudyPractical Software Engineering 2012Above diagram showing case model of the Weather service. Actor of this application openURL and get login into the system once the user gets logged in User provide a City name andwill submit to the Weather service. Weather service senses the user input and will search forweather in www.weather.com and will capture REST data and will convert it into the RDFtriple store and will fetch data from the RDF triple store using SPARQL and generate Naturallanguage string with intelligent smiles.5.2 Login and User Input Case diagram:Actor provide them username and password, service authenticate them and as for City nameas a input.5.3 Generating Natural language:Weather Service Uday Sharma @2012 Page - 8 -
  10. 10. Work StudyPractical Software Engineering 2012Base on Actor Input weather Service fetch XML data from the www.weather.com and parseXML format and store it into the RDF triple store. To generate natural language weatherservice fetches the data from the database using SPARQL and generating string like e.g.“Today’s weather 20 degree Celsius High  and 5 degree Celsius low”.5.4 Description of use cases The following use case description provides more in-depth explanation of the above applications in Weather Service. This is placed on the relationships among the use cases, on condition, and triggers, as well as post-condition and results of the use cases focus.Login into the Weather System:Use Case User # 1 AuthenticationActors UserPurpose To check weather of the cityEntry Cond User is logged in and User need to provide City name or GEO code to the weather system.Overview The users type the URL http://www.xyz.com and provide login detail Weather system authenticate to user and will ask for GEO code of the city.Includes Authentication screen User input screen (City name or GEO codeSpecial Req Tomcat, MysqlCategory Very high priorityCross Ref on / LF11 / from the contract documentsActor Action System Response1. Provide user name and password 2. Authentication process check for authorize User if correct than go to the next screen otherwise User has to be provide correct username and password 3. If authorize user than go to next screen4. Provide input as GEO code of the city 5. Check weather GEO code of the city correct or notWeather report:Use Case Check # 2 today’s weatherWeather Service Uday Sharma @2012 Page - 9 -
  11. 11. Work StudyPractical Software Engineering 2012Actors UserPurpose Check today’s weather and generate stringEntry Cond City name of GEO code of the cityOverview The user provide GEO code of the City name to the Weather System and weather service fetch XML from the www.weather.com on the bases of GEO code of the city. Once system gets REST data from the weather.com Weather service parse the XML and store it in to the Mysql database in the format of RDF triple store. Using SPARQL query weather system fetch the information and Generate the weather report string with intelligence included in string.Exit Cond Weather report display and user will close the browserExtends Make Astrology, Sport News etc. application on bases of these applicationSpecial Req Jena APICross Ref on / LF12/ - /LF 18 / from the product featureActor Action System Response1. User provides GEO code of the city to 2. Weather system senses the GEO code and the System. start looking for XML from the www.weather.com 3. Parse XML tags and store it into the RDF triple store using Jena API 4. Fetch data from the RDF store using SPARQL and make string 5. Add intelligence into the string depend on the weather Jena reasoner add smiles into the String e.g “  “ 6. Generate final string and display in the webpage and also show the weather image according to weather condition.Weather Service Uday Sharma @2012 Page - 10 -
  12. 12. Work StudyPractical Software Engineering 20126. Class DiagramA class diagram in the Unified Modeling Language (UML) is a type of static structure diagramthat describes the structure of a system by showing the systems classes, their attributes,operations (or methods), and the relationships among the classes.In our class case we used a number of classes to develop the whole system. The mostimportant class is named Weather_20_XMLParser.Other classes are working around thisclass. As the picture shows this particular class is interacting with the class calledWeatherGateway which has some methods those communicates with the external website tofetch the weather information. Other classes like WeatherError provides error message backto the user when an error occurs. Another important is TestWeatherGateway which saves thefinal processed weather information in the RDF store.Weather Service Uday Sharma @2012 Page - 11 -
  13. 13. Work StudyPractical Software Engineering 20127. Sequence diagramsA sequence diagram in a Unified Modeling Language (UML) is a kind of interaction diagramthat shows how processes operate with one another and in what order. It is a construct of aMessage Sequence Chart. A sequence diagram shows object interactions arranged in timesequence. It depicts the objects and classes involved in the scenario and the sequence ofmessages exchanged between the objects needed to carry out the functionality of thescenario. Sequence diagrams typically are associated with use case realizations in the LogicalView of the system under development.In this diagram, first process is 1: userid and pass in the login screen after that the next one is1.1: move to homepage. Second step is to provide parameters to get weather informationwhich is 2: provide valid parameters. After completion of this the next step is to pass theweather text at 2.1 to the external server to generate video. At 2.2 data returned back to theuser. And the last step is to returning the video to the user.Weather Service Uday Sharma @2012 Page - 12 -
  14. 14. Work StudyPractical Software Engineering 20128. Activity diagramsActivity diagrams are graphical representations of workflows of stepwise activities andactions with support for choice, iteration and concurrency.Here in our case in the starting point the consumer of the service has to be a register serviceto get the accessibility of this service. At first user has to provide the credentials for the loginscreen to verify that the user is an authenticated used. If the credentials are wrongs whichhas been provided then the user has to provide the credentials again to get the access.In the next step user will go the home page of the service and then has to provide thecredentials to get the weather information. If user provides invalid parameters then systemwill show an error message.But when the user passes valid information then three tasks happens. In first place fetchingall the information according to the parameters is occurs. After that using the information athird party server generates a video on weather information. In addition, when the finalweather information gets processed then a reasoned is used called Jena Reasoner which addsto smiles into the text depending on whether the weather is good or bad. At last this wholesprocess ends and come back to home screen for next query.Weather Service Uday Sharma @2012 Page - 13 -
  15. 15. Work StudyPractical Software Engineering 20129. Component DiagramIn the Unified Modeling Language, a component diagram depicts how components are wiredtogether to form larger components and or software systems. They are used to illustrate thestructure of arbitrarily complex systems.In this diagram different component of the application has been depicted. There are threeimportant competent those are working with the main class Weather_20_Parser class.WeatherGateway, Jena Reasoner and Vedio Server (To generate weather report in videoformat).These three components along with the Weather_20_Parser class works together toaccomplish this whole task.10. Distribution diagramA deployment diagram in the Unified Modeling Language models the physical deployment ofartifacts on nodes.[1] To describe a web site, for example, a deployment diagram would showwhat hardware components ("nodes") exist (e.g., a web server, an application server, and adatabase server), what software components ("artifacts") run on each node (e.g., webapplication, database), and how the different pieces are connected (e.g. JDBC, REST, RMI).Weather Service Uday Sharma @2012 Page - 14 -
  16. 16. Work StudyPractical Software Engineering 201211. Package diagramIn this diagram all components and servers and database storage system has been displayed.This service needed all those components and servers and others to run the whole system. Inthe left side of the diagram all the other platform has been displayed from where this servicecan be called and used to show the weather information the intended user.This diagram shows the dependency of the different packages used in this system. Packagesrc.weather_service.weatherprovider imports two other packages and those are listenersand src.weather_service.weatherprovider.locationdatamodel. Package src.weather_serviceaccesses src.weather_service.weatherprovider to get data and store in to the data storage.src.weather_service.weatherprovider also accesses src.res.weatherxml to read the xml filesto get an access of the jena resoner fileWeather Service Uday Sharma @2012 Page - 15 -
  17. 17. Work StudyPractical Software Engineering 201212. Object DiagramAn object diagram in the Unified Modeling Language (UML) is a diagram that shows acomplete or partial view of the structure of a modeled system at a specific time. In thisdiagram all interactions between objects are depicted. First of all an object of the main classWeather_20_XMLParser is depicted as http://xoap.weather.com/weather/ :Weather_20_XMLParser.Which has a relation with the next class. Here the former one issetting the gateway for the later one. And later one is depicted as www.weather.com:WeatherGateway. The next is a relationship with the WeatherError class which has depictedas INVALID_LOCATION_PROVIDED_ERROR : WeatherError in the diagram. An instance ofthe class TestWeatherGateway shown in the picture as partnerID = "1272202183", licenseKey= "234b5ade63edb834”: TestWeatherGateway.Weather Service Uday Sharma @2012 Page - 16 -
  18. 18. Work StudyPractical Software Engineering 201213. CRCCard diagramClass-Responsibility Collaborator (CRC) card visualize classes in card-like presentation. EachCRC card contains information like the description of class, its attributes and responsibility. ACRC card diagram is a holder of these cards.Below diagram showing the Super classe TestweatherGateway and Weathererror this twoare inherited by all the sub classes and using attribute Weather service generate weatherreport.Weather Service Uday Sharma @2012 Page - 17 -
  19. 19. Work StudyPractical Software Engineering 201214. DFD DiagramWeather Service Uday Sharma @2012 Page - 18 -
  20. 20. Work StudyPractical Software Engineering 201215. ER DiagramWeather Service Uday Sharma @2012 Page - 19 -
  21. 21. Work StudyPractical Software Engineering 201216. Test Case16.1 Junit Test code@Test public void testTestLocalService() { System.out.println("testLocalService"); String locationID = "GMXX0087.xml"; String weatherServer = "http://localhost:8888/"; TestWeatherGateway instance = new TestWeatherGateway(); instance.testLocalService(locationID, weatherServer); // TODO review the generated test code and remove the default call to fail. }16.2 Junit Test outputWeather Service Uday Sharma @2012 Page - 20 -
  22. 22. Work StudyPractical Software Engineering 201217. References  Fetching weather information from the weather.com http://www.weather.com/  For proof of concept used pivotal tracker http://www.pivotaltracker.com/  For UML diagram used Star UML and VISIO http://office.microsoft.com/en- us/support/results.aspx?ctags=CH010064890 http://staruml.sourceforge.net/en/Weather Service Uday Sharma @2012 Page - 21 -

×