Giter VIP home page Giter VIP logo

cpd3314-project's Introduction

CPD3314 Final Project – Data API

Build the Following Project and Submit to Dropbox on or before Apr. 16th, 2015

Your employers have a set of product records that are stored as an XML-formatted dataset. They have been given to you as ORIGINALS.xml. In a flash of foresight, your employer realized that many modern tools prefer other data formats including JSON and YAML. In addition, they would like a tool that formats all of the data into SQL statements, and another tool that formats all of the data into HTML blocks. There are many ways to implement this, but your lead developer pointed you in the direction of the following tools:

The following specific behaviours are expected:

Command Line Arguments

When built and run on the command line (eg- java CPD3314-Project ... ) the project should accept the following command-line arguments:

Command Argument Result
-format=<XML/JSON/YAML/SQL/HTML> Formats the output as appropriate: XML, JSON, YAML, SQL, or HTML. If excluded, default is XML.
-sort=<A/I/D> Sorts the output (A)lphabetically by Name, by (I)D, or by (D)ate. If excluded, default is to preserve the source ordering.
-limit=<#> Limits the output to a certain number of lines. Performed last (ie- after sorting and filtering).
-getID=<ID> Retrieves a single result by its ID.
-getDate=<DATE> Retrieves all results that match a given date.
-find=<CONTENTS> Retrieves all results that include the given case-insensitive content in their name or description.
-o=<filename> Outputs to a specific filename. Appropriate file extension is added by the program. If filename is excluded, default is CPD3314. where matches the appropriate output format.

Command Line Examples

java CPD3314-Project

Produces an XML file named CPD3314.xml of all products, with no particular sorting


java CPD3314-Project –format=XML

Produces an XML file named CPD3314.xml of all products, with no particular sorting


java CPD3314-Project –format=YAML

Produces a YAML file named CPD3314.yaml of all products, with no particular sorting


java CPD3314-Project –format=JSON

Produces a JSON file named CPD3314.json of all products, with no particular sorting


java CPD3314-Project –format=SQL

Produces an SQL file named CPD3314.sql of all products, with no particular sorting


java CPD3314-Project –format=HTML

Produces an HTML file named CPD3314.html of all products, with no particular sorting


java CPD3314-Project –o=test

Produces an XML file named test.xml of all products, with no particular sorting


java CPD3314-Project –o=ten –limit=10

Produces an XML file named ten.xml of the first ten products, with no particular sorting


java CPD3314-Project –sort=A –o=test –limit=10

Produces an XML file named test.xml of the first ten products, sorted by name ascending


java CPD3314-Project –sort=I –o=test –limit=10

Produces an XML file named test.xml of the first ten products, sorted by ID ascending


java CPD3314-Project –sort=D –o=test –limit=10

Produces an XML file named test.xml of the first ten products, sorted by date ascending


java CPD3314-Project –getID=400 –o=test

Produces an XML file named test.xml that only contains the product with ID 400


java CPD3314-Project –getDate=2015-06-14 –o=test

Produces an XML file named test.xml that only contains the products added on Jun. 14, 2015


java CPD3314-Project –find=Desk –o=test

Produces an XML file named test.xml that only contains the products with “Desk” in their name or description


java CPD3314-Project –find=”Rich Mahogany Desk” –o=test

Produces an XML file named test.xml that only contains the products with “Rich Mahogany Desk” in their name or description


Further Instructions in Attached PDF

cpd3314-project's People

Contributors

lenpayne avatar profrussell avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.