5 Javascript functions - pseudo code included

IN PROGRESS
Bids
7
Avg Bid (USD)
$113
Project Budget (USD)
$30 - $250

Project Description:
We want 5 serverless Javascript functions written. Pseudo code included below. See more notes, examples below pseudo code.

AddWidParameters(inputObjectDOT) // This call accepts a list with DOT parameters and adds to mongo
inputParametersList[], commandList[] = call matchPrefix(inputObjectDOT{}, "command") // split list into commands and everything else
if commandlist[0].value["dtotype"]='' then DTOType='defaultDTO' else DTOType=commandlist[0].value["dtotype"]

DTOobject = getFromMongo(DTOType) // get DTO definition from mongo
DTOobjectDOT=converttoDOT(DTOObject)
DTOList[], DTOIndexList[], DTOoriginalList[]=removeindex(DTOobjectDOT{})

inputList[], indexList[], originalinputList[]=removeindex(inputObjectDOT{})

inputList[], DTOList[] = call splitobjectlist(inputList[], DTOList[]])

CleanInputList[]=cleanbasedoncheckflagList(commandObject.checkflag, inputList[], DTOList[])

Make sure originalinputList is global
AddMaster(DTOList[],CleaninputList[])

AddMaster(DTOList[],inputList[])Make sure originalinputList is global
SortedDTOList[]=SortAttributes(DTOList[])
ParentDTOList[], ChildrenDTOList[] = SplitKeywordSet(SortedDTOList[],'attribute')
ParentList[], ChildrenList[] = splitList(inputList[], ParentDTOList[])

parentwid=MongoAddEditPrepare(ParentListDTO[], ParentList[])

Repeat until ChildrenDTOList[] is empty
if ChildrentDTOList[].value = "attribute" then
RelatedListDTO[], NotRelatedListDTO[] = MatchPrefix(ChildrenDTOList[], ChildrentListDTO[].property)
RelatedListParameters[], NotRelatedListParameters[] = MatchPrefix(ChildrenParameterList[], ChildrentListParameter[].property)
ChildWid=AddMaster(RelatedListDTO[], RelatedListParameters[])
MongoAdd -- make a new relationship wid=random, primarywid= secondarywid= relationshiptype='attribute'
ChildrenDTOList[]=NotRelatedDTOList[]
ChildrenParameterList[]=NotRelatedParameterList[]


MongoAddEditPrepare(InDTO[], InList[]) in list out object
Make sure originalinputList is global
MongoType='Add'
If InDTO[1].value = 'Attribute' then toBeAdded=deletePrefix(InDTO[])
if InDTO[wid]"" then
Check in mongo to see if the wid already exists or not, if it exists then MongoType='Edit'
else InDTO[wid]=RandomWid
If OutputList[metadata.status]="" then InParam[metadata.status]=1
If OutputList[metadata.datetime]= then InParam[metadata.datetime]=current time date
if OutputList[metadata.style]="" then InParam[metadata.style]='defaultstyle'

If MongoType = 'Edit' then callmongoedit (InDTO[]) else call mongoadd (InDTO[]) // mongo add should return wid

Return wid

getfrommongo(wid)
Hard code wid values to emulate a return of parameters

mongoadd
Hard code to return wid=some random number

Example data in TAB EXAMPLE3: https://docs.google.com/spreadsheet/ccc?key=0AqSqNB4MEkB0dDFCQm1HS1p1dnlLb05JNlpBN1BQWlE#gid=7

These functions, that are referenced in the 5 functions have already been written:
Functions referenced in pseudo code have already been written:
SortAttributes - accepts flat incoming parameters, produces flat parameters
SplitKeywordSet - accepts keyword & flat incoming list, produces two flat lists
MatchPrefix - accepts keyword & flat incoming list, produces two flat lists, DTOType
DeletePrefix
RemoveIndex
SplitObjectList
splitobject -accepts two flat lists, filters one from the values of the other, returns two flat lists,…original + left overs
cleanbasedonflag-accepts flag, two flat parameter lists, returns the cleaned 'ready to add' flat list
convertodot -converts to dot notation
convertfromdot -converts from dot notation

Skills required:
Javascript
About the employer:
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.


$ 100
in 3 days
$ 105
in 2 days
Hire guiqul
$ 133
in 10 days
Hire jayshreeganeshha
$ 100
in 3 days
$ 99
in 3 days
$ 111
in 3 days
$ 144
in 3 days