Class to manage URL category data structure in iOS(repost)(repost)(repost)

Cancelled Posted Oct 31, 2011 Paid on delivery
Cancelled Paid on delivery

I need a class to manage URL classification data structures on iOS (you don't need to do the actual classification, just create the data management, the data will come from files/function calls)

You can read the full spec in the detailed requirements.

## Deliverables

I need a class to manage URL classification data structures on iOS (you don't need to do the actual

classification, just create the data management, the data will come from files/function calls)

Stage 1:

Defining the categories, there will be an enum in the class with all the possible categories (I will change

it later to all my categories), here is a sample list (taken from my C program):

typedef enum _CategoriesEnum

{

ceAbortion=1,

ceAds,

ceAdult, //Not porn, but still not child save

ceViolence,

ceNude,

ceAstrology,

ceBanking,

ceAlcoholDrugs

} CategoriesEnum

Stage 2:

Loading data from files, the data structure is directories under the main directory, each directory has a

file called domains which contains the domains for that category, when I load the file I will specify the

master directory and a list of conversion between the directory name and enum.

Directory structure sample:

Main dir:

--ads

----domains (file)

--adult

----domains (file)

The lookup will be:

ads -> ceAds

adult -> ceAdult

The data in the structure is a domain name, so for example: [url removed, login to view], [url removed, login to view], [url removed, login to view]

The data should be stored in a data container that has a fast search capabilities like a tree or map

There can be more then one category for a site.

Stage 3:

Looking up the data, I need a function that I will provide a URL to it, the function will extract the host

from the url, for example: <[url removed, login to view]>, the function will only search [[url removed, login to view]][1]

The way the function will search the data is by doing searches for all possible host name, for example:

[[url removed, login to view]][1] will also be searched for [url removed, login to view] if the [[url removed, login to view]][1] was not found.

If the category is found, I will get back the enum of the category or categories.

Stage 4:

Adding a URL, I will be able to add a URL using a call, for example:

AddURL("[url removed, login to view]",ceBanking)

I can also specify:

AddURL("[url removed, login to view]",ceAds)

and [url removed, login to view] will have more then one category.

Stage 5:

When creating the class, I will be able to decide at creation if I want the class to have locking for thread

safe, or not. The thread safety only needs to be for adding/querying the data via the API, at the stage of

loading the data, there's no need for safety.

Stage 6:

Provide a test app that will load the data from file (data will be provided by me), and give me a two text

boxes, one to query categories, I will enter a url and it will write the category, the second text box will

allow me to add a url and a category.

Cocoa Mobile App Development

Project ID: #3667313

About the project

Remote project Active Nov 23, 2011