{
    "docs": [
        {
            "fulltext": {
                "by_content": {
                    "analyzer": "perfield:{default:\"standard\",uid:\"keyword\",source:\"keyword\",language:\"keyword\",status:\"keyword\"}",
                    "defaults": {
                        "field": "uniqueId",
                        "store": "yes"
                    },
                    "index": "function(doc) { \n    if (!doc._id.match(/^_design/)) {\n        var ret=new Document();\n\n        var defs = \"\";\n\n        // We have to store values we wish to use in field:value queries\n        // We also include them in the value of the defaults field (used when no qualifiers are added)\n        var keysToStore = [\"uid\",\"source\",\"sid\", \"status\", \"name\", \"description\", \"language\"];\n        for (var i in keysToStore) {\n            var field = keysToStore[i];\n            if (doc[field]) {\n                ret.add(doc[field],{\"field\":field, \"store\":\"yes\"});\n                defs += \" \" + doc[field] + \" \";\n            }\n        }\n\n        if (doc.manufacturer && doc.manufacturer.name) {\n            ret.add(doc.manufacturer.name,{\"field\": \"manufacturer\", \"store\":\"yes\"});\n            defs += \" \" + doc.manufacturer.name + \" \";\n        }\n\n        // All of the data is added to the default field so that unqualified searches match any data found in the record.\n        ret.add(defs,{\"field\":\"default\", \"store\": \"no\"});\n\n        //log.debug(\"indexed document '\" + doc.uniqueId + \"'...\");\n\n        return ret;\n    }\n    else {\n        //log.debug(\"skipping indexing of design document '\" + doc._id + \"'...\");\n    }\n\n    return null;\n}\n"
                }
            },
            "language": "javascript",
            "_id": "_design/lucene"
        },
        {
            "couchapp": {
                "name": "Unified Listing Reports",
                "description": "Canned reports to be run against the Unified Listing."
            },
            "lists": {
                "csv": "function () { // jshint ignore:line\n    var csvOutput = \"Manufacturer Name, Address, Country, URL, Phone, Email\\n\";\n    var row;\n    while (row = getRow()) { // jshint ignore: line\n        var countryKeys = Object.keys(row.value);\n        for (var countryIndex = 0; countryIndex < countryKeys.length; countryIndex++) {\n            var countryKey = countryKeys[countryIndex];\n            var countryMap = row.value[countryKey];\n\n            var manufacturerKeys = Object.keys(countryMap);\n            for (var manufacturerIndex = 0; manufacturerIndex < manufacturerKeys.length; manufacturerIndex++ ) {\n                var manufacturerKey = manufacturerKeys[manufacturerIndex];\n                var record = countryMap[manufacturerKey];\n\n                var rowString = \"\";\n                var keys = Object.keys(record);\n                for (var a = 0; a < keys.length; a++) {\n                    var key = keys[a];\n                    var value = record[key] ? record[key] : \"\";\n                    var stringValue = typeof value === \"string\" ? value : JSON.stringify(value);\n                    if (rowString.length > 0) { rowString += \",\"; }\n                    rowString += \"\\\"\" + stringValue + \"\\\"\";\n                }\n\n                csvOutput += rowString;\n                csvOutput += \"\\n\";\n            }\n        }\n\n    }\n\n    send(csvOutput); // jshint ignore:line\n}\n"
            },
            "tests": {
                "lib": {
                    "reducer": "\"use strict\";\nvar path = require(\"path\");\nmodule.exports = function (startDir, reduceSourcePath) {\n\n    // We have to load our reduce function manually because couch does not support modules that can be used with \"require\".\n    var fs = require(\"fs\");\n    var resolvedPath  = path.resolve(startDir, reduceSourcePath);\n    var reduceContent = fs.readFileSync(resolvedPath, { \"encoding\": \"utf-8\"});\n    var reducer;\n    eval(\"reducer = \" + reduceContent);\n    return reducer;\n};\n"
                },
                "reports-view-jqunit": "\"use strict\";\nvar fluid = require(\"infusion\");\nvar jqUnit = fluid.require(\"jqUnit\");\n\njqUnit.module(\"Reports map/reduce Unit Tests\");\n\nvar reducer = require(\"./lib/reducer.js\")(__dirname, \"../views/manufacturers/reduce.js\");\n\nfunction keysFromValues (array) {\n    return array.map(function(value){ return value.name; });\n}\n\njqUnit.test(\"Testing reduce function (single reduce pass)...\",function(){\n    var data    = [{ name: \"tocombine\", \"address\": \"set\", country: \"sampleCountry\"}, { name: \"tocombine\", url: \"set\", country: \"sampleCountry\"}];\n    var expectedOutput = {\n        \"sampleCountry\": {\n            \"tocombine\": {\n                name: \"tocombine\",\n                address: \"set\",\n                country: \"sampleCountry\",\n                url: \"set\"\n            }\n        }\n    };\n    var keys    = keysFromValues(data);\n    var output  = reducer(keys, data, false);\n\n    jqUnit.assertDeepEq(\"The output should be as expected...\", expectedOutput, output);\n});\n\njqUnit.test(\"Testing rereduce function...\",function(){\n    var data    = [\n        {\n            \"narnia\": {\n                \"tumnus\": {\n                    name: \"Tumnus\",\n                    country: \"narnia\",\n                    email: \"tumnus@narnia.com\"\n                }\n            }\n        },\n        {\n            \"narnia\": {\n                \"tumnus\": {\n                    name: \"Fawn Tumnus\",\n                    country: \"narnia\",\n                    url: \"http://www.disney.com/\"\n                }\n            }\n\n        }\n    ];\n\n    var expectedOutput = {\n        \"narnia\": {\n            \"tumnus\": {\n                name: \"Fawn Tumnus\",\n                email: \"tumnus@narnia.com\",\n                country: \"narnia\",\n                url: \"http://www.disney.com/\"\n            }\n        }\n    };\n\n    var output  = reducer(null, data, true);\n    jqUnit.assertDeepEq(\"The output should be as expected...\", expectedOutput, output);\n});\n"
            },
            "views": {
                "bysource": {
                    "map": "function (doc) {\n    \"use strict\";\n    emit(doc.source, doc.source);\n}\n",
                    "reduce": "_count\n"
                },
                "bysourceandlanguage": {
                    "map": "function (doc) {\n    \"use strict\";\n    if (doc.source !== \"unified\" && doc.status !== \"deleted\") {\n        var lang = doc.language || \"none\";\n        var id = doc.source + \":\" + lang;\n        emit(id, doc);\n    }\n}\n",
                    "reduce": "_count\n"
                },
                "bysourceandstatus": {
                    "map": "function (doc) {\n    \"use strict\";\n    emit([doc.source, doc.status], doc);\n}\n",
                    "reduce": "_count\n"
                },
                "countbysid": {
                    "map": "function (doc) {\n    \"use strict\";\n    var id = doc.source + \":\" + doc.sid;\n    emit(id, id);\n}\n",
                    "reduce": "_count\n"
                },
                "manufacturers": {
                    "map": "function (doc) {\n    function strip(rawString) {\n        return rawString.toLowerCase().trim();\n    }\n    var addressFields = [\"address\", \"postalCode\", \"cityTown\"];\n    if (doc.manufacturer && doc.manufacturer.name && doc.manufacturer.name.length > 0) {\n        var address = \"\";\n        for (var a=0; a < addressFields.length; a++) {\n            var key = addressFields[a];\n            var addressValue = doc.manufacturer[key];\n            if (addressValue) {\n                if (address.length > 0) {\n                    address += \" \";\n                }\n                address += addressValue;\n            }\n        }\n        emit(strip(doc.manufacturer.name), { name: doc.manufacturer.name, address: address, country: doc.manufacturer.country, url: doc.manufacturer.url, phone: doc.manufacturer.phone, email: doc.manufacturer.email});\n    }\n}\n",
                    "reduce-toobig": "function (keys, values, rereduce) {\n    \"use strict\";\n    var manufacturersByCountry = {};\n\n    function longest(first, second) {\n        if (!first)  { return second; }\n        if (!second) { return first; }\n\n        return first.length >= second.length ? first : second;\n    }\n\n    function combineEntries(existingEntry, newEntry) {\n        if (existingEntry) {\n            var combinedEntry = JSON.parse(JSON.stringify(existingEntry));\n\n            var keys = Object.keys(newEntry);\n\n            // Make sure each country/manufacturer record has only the longest value found.\n            for (var b = 0; b < keys.length; b++) {\n                var field = keys[b];\n                var longestValue = longest(existingEntry[field], newEntry[field]);\n                if (longestValue !== null && longestValue !== undefined) {\n                    combinedEntry[field] = longestValue;\n                }\n            }\n\n            return combinedEntry;\n        }\n        else {\n            return JSON.parse(JSON.stringify(newEntry));\n        }\n\n    }\n\n    if (rereduce) {\n        for (var c = 0; c < values.length; c++) {\n            var partialMap = values[c];\n            var countries = Object.keys(partialMap);\n            for (var d = 0; d < countries.length; d++) {\n                var newCountry    = countries[d];\n                var newCountryMap = partialMap[newCountry];\n\n                if (manufacturersByCountry[newCountry]) {\n                    var manufacturers = Object.keys(newCountryMap);\n\n                    for (var e=0; e < manufacturers.length; e++) {\n                        var newManufacturer      = manufacturers[e];\n                        var newManufacturerEntry = newCountryMap[newManufacturer];\n                        manufacturersByCountry[newCountry][newManufacturer] = combineEntries(manufacturersByCountry[newCountry][newManufacturer], newManufacturerEntry);\n                    }\n                }\n                else {\n                    manufacturersByCountry[newCountry] = newCountryMap;\n                }\n            }\n        }\n    }\n    else {\n        for (var a = 0; a < values.length; a++) {\n            var record = values[a];\n\n            var country = record.country ? record.country.toUpperCase() : \"UNKNOWN\";\n            if (!manufacturersByCountry[country]) {\n                manufacturersByCountry[country] = {};\n            }\n\n            var manufacturer = record.name.toLowerCase().trim();\n            var existingEntry = manufacturersByCountry[country][manufacturer];\n            manufacturersByCountry[country][manufacturer] = combineEntries(existingEntry, record);\n        }\n    }\n\n    return manufacturersByCountry;\n}\n"
                },
                "missingcreated": {
                    "map": "function (doc) {\n    \"use strict\";\n\n    if (doc.sid && !doc.created) {\n        emit(doc._id, doc);\n    }\n}\n"
                },
                "nocountry": {
                    "map": "function (doc) {\n    if (!doc.manufacturer || !doc.manufacturer.country || doc.manufacturer.country.length === 0 || doc.manufacturer.country === \"UNKNOWN\") {\n        emit(null, doc);\n    }\n}\n"
                }
            },
            "language": "javascript",
            "_id": "_design/reports"
        },
        {
            "couchapp": {
                "name": "UL CouchDb content...",
                "description": "Couchdb views, lists, shows, and validation code to support the Unified Listing."
            },
            "lists": {
                "dump": "function (head, req) { // jshint ignore:line\n    var rows = [];\n    var row;\n    while (row = getRow()) { // jshint ignore: line\n        var sanitized = JSON.parse(JSON.stringify(row.value));\n        delete sanitized._id;\n        delete sanitized._rev;\n        rows.push(sanitized);\n    }\n    send(JSON.stringify({ docs: rows }, null, 2));\n}\n",
                "unified": "function(head, req) { // jshint ignore:line\n    // WARNING:  Pouch will fail horribly if the first line of your list function is a comment.  The next line\n    // had to be moved down to avoid spurious messages about things \"not evaluating to a function\"\n    //\n    // Reduce all the products with the same \"parent\" ID to a single structure using a list function...\n    function combine(existingRecord, newRecord) { // jshint ignore:line\n        var combinedRecord = existingRecord ? JSON.parse(JSON.stringify(existingRecord)) : {};\n\n        if (existingRecord) {\n            if (newRecord.source === \"unified\") {\n                combinedRecord = JSON.parse(JSON.stringify(newRecord));\n                if (!combinedRecord.sources) {\n                    combinedRecord.sources = [];\n                }\n\n                if (existingRecord.sources) {\n                    existingRecord.sources.forEach(function(source){\n                        combinedRecord.sources.push(JSON.parse(JSON.stringify(source)));\n                    });\n                }\n            }\n            else if (newRecord.sources) {\n                if (!combinedRecord.sources) { combinedRecord.sources = []; }\n                newRecord.sources.forEach(function(record){\n                    if (record) {\n                        combinedRecord.sources.push(JSON.parse(JSON.stringify(record)));\n                    }\n                });\n            }\n            else {\n                if (!combinedRecord.sources) { combinedRecord.sources = []; }\n                combinedRecord.sources.push(JSON.parse(JSON.stringify(newRecord)));\n            }\n        }\n        else {\n            if (newRecord.source === \"unified\") {\n                combinedRecord = JSON.parse(JSON.stringify(newRecord));\n            }\n            else if (newRecord.sources) {\n                if (!combinedRecord.sources) { combinedRecord.sources = []; }\n                newRecord.sources.forEach(function(record){\n                    combinedRecord.sources.push(JSON.parse(JSON.stringify(record)));\n                });\n            }\n            else {\n                if (!combinedRecord.sources) { combinedRecord.sources = []; }\n                combinedRecord.sources.push(JSON.parse(JSON.stringify(newRecord)));\n            }\n        }\n\n        return combinedRecord;\n    }\n\n    // Build the full map of products and then return them\n    var dataMap = {};\n\n    var row;\n    while (row = getRow()) { // jshint ignore: line\n        var record = row.value;\n        if (record.uid) {\n            dataMap[record.uid] = combine(dataMap[record.uid], record);\n        }\n        else {\n            dataMap[record.source + \":\" + record.sid] = record;\n        }\n    }\n\n    send(JSON.stringify(Object.keys(dataMap).map(function(key){ return dataMap[key]; }), null, 2)); // jshint ignore:line\n}\n"
            },
            "tests": {
                "data": {
                    "jaws": [
                        {
                            "status": "new",
                            "language": "en_gb",
                            "name": "Jaws For Windows",
                            "description": "<br /><br />Screen reader software.  Comprises: supports standard Windows office applications, Internet Explorer, Firefox, MSN Messenger, and Adobe Acrobat Reader, Lotus Symphony/Notes and others; outputs to refreshable Braille displays; multilingual synthesizer; supports Internet Explorer including links lists, frames lists, forms mode, reading HTML tables and graphic labels; supports dual monitors; interactive talking installation and basic training tutorial. Options include: standard edition for 32-bit or 64-bit versions of Windows 7 Home Premium, Windows Vista Home Premium, Windows Vista Home Basic and 32-bit Windows XP Home operating systems; professional edition for all 32-bit or 64-bit versions of Windows 7, Windows Vista, and Windows Server 2008 and 32-bit versions of Windows XP and Windows Server 2003. \n  Note: voice synthesizer requires a sound card compatible with the users version of Windows.<br /><br />Price from (&pound;): 659<br /><br /><br /><br />Software<br />Adjust voice pitch: Standard <br />Adjust voice speed: Standard <br />Braille output: Standard <br />CD-Rom; USB Pen; Download: CD-Rom <br />Pronunciation correction: Standard <br />Read text with mouse over: Feature not available <br />Screen Zoom: Feature not available <br />Talking installation: Standard <br />Windows operating system: XP, Vista and 7",
                            "source": "Dlf data",
                            "sid": "0109982",
                            "manufacturer": {
                                "name": "Freedom Scientific",
                                "address": null,
                                "postalCode": null,
                                "cityTown": null,
                                "country": null,
                                "phone": null,
                                "email": null,
                                "url": null
                            },
                            "ontologies": {
                                "iso9999": {
                                    "IsoCodePrimary": {
                                        "Code": "22.39.12",
                                        "Name": "Special output software"
                                    },
                                    "IsoCodesOptional": []
                                }
                            },
                            "sourceData": {
                                "ManufacturerAddress": null,
                                "ManufacturerPostalCode": null,
                                "ManufacturerTown": null,
                                "ManufacturerCountry": null,
                                "ManufacturerPhone": null,
                                "ManufacturerEmail": null,
                                "ManufacturerWebSiteUrl": null,
                                "ImageUrl": "http://liveimageserver.dlf.org.uk/mee/products/med/0109982-0038862-24782.jpg",
                                "EnglishDescription": "<br /><br />Screen reader software.  Comprises: supports standard Windows office applications, Internet Explorer, Firefox, MSN Messenger, and Adobe Acrobat Reader, Lotus Symphony/Notes and others; outputs to refreshable Braille displays; multilingual synthesizer; supports Internet Explorer including links lists, frames lists, forms mode, reading HTML tables and graphic labels; supports dual monitors; interactive talking installation and basic training tutorial. Options include: standard edition for 32-bit or 64-bit versions of Windows 7 Home Premium, Windows Vista Home Premium, Windows Vista Home Basic and 32-bit Windows XP Home operating systems; professional edition for all 32-bit or 64-bit versions of Windows 7, Windows Vista, and Windows Server 2008 and 32-bit versions of Windows XP and Windows Server 2003. \n  Note: voice synthesizer requires a sound card compatible with the users version of Windows.<br /><br />Price from (&pound;): 659<br /><br /><br /><br />Software<br />Adjust voice pitch: Standard <br />Adjust voice speed: Standard <br />Braille output: Standard <br />CD-Rom; USB Pen; Download: CD-Rom <br />Pronunciation correction: Standard <br />Read text with mouse over: Feature not available <br />Screen Zoom: Feature not available <br />Talking installation: Standard <br />Windows operating system: XP, Vista and 7",
                                "OriginalUrl": "http://www.dlf-data.org.uk/product.php?product_id=0109982",
                                "EnglishUrl": "http://www.dlf-data.org.uk/product.php?product_id=0109982",
                                "Features": [],
                                "Database": "Dlf data",
                                "ProductCode": "0109982",
                                "IsoCodePrimary": {
                                    "Code": "22.39.12",
                                    "Name": "Special output software"
                                },
                                "IsoCodesOptional": [],
                                "CommercialName": "Jaws For Windows",
                                "ManufacturerOriginalFullName": "Freedom Scientific",
                                "InsertDate": "2012-01-31T18:43:15+01:00",
                                "LastUpdateDate": "2014-12-03T12:31:25+01:00",
                                "ThumbnailImageUrl": "http://liveimageserver.dlf.org.uk/mee/products/thumb/0109982-0038862-24782.jpg",
                                "SimilarityLevel": 0
                            },
                            "updated": "2014-12-03T12:31:25+01:00",
                            "uid": "1419325432847-242"
                        },
                        {
                            "status": "new",
                            "language": "da_dk",
                            "name": "JAWS",
                            "description": "Screenreader software for Windows platform.<table border='0'><tr><td colspan='3'>The following specifications may only comply to some variants.</td></tr><tr><td colspan='3'><strong>Can be used with synthetic speech</strong></td></tr><tr><td colspan='3'><strong>Can be used with digitalized speech</strong></td></tr><tr><td colspan='3'><strong>Reads out selected text at clipboard</strong></td></tr><tr><td colspan='3'><strong>Reading out while typing</strong></td></tr><tr><td colspan='3'><strong>Features of the screen reader</strong></td></tr><tr><td colspan='3'><strong>All functions by keyboard</strong></td></tr><tr><td colspan='3'><strong>All functions by mouse</strong></td></tr></table>",
                            "source": "Hjælpemiddelbasen",
                            "sid": "4169",
                            "manufacturer": {
                                "name": "Freedom Scientific",
                                "address": "11800 31st Court North",
                                "postalCode": "FL 33716",
                                "cityTown": "St. Petersburg",
                                "country": "UNITED STATES MINOR OUTLYING ISLANDS",
                                "phone": "+1727-803-8000",
                                "email": "",
                                "url": "www.freedomsci.com"
                            },
                            "ontologies": {
                                "iso9999": {
                                    "IsoCodePrimary": {
                                        "Code": "22.39.12",
                                        "Name": "Special output software"
                                    },
                                    "IsoCodesOptional": []
                                }
                            },
                            "sourceData": {
                                "ManufacturerAddress": "11800 31st Court North",
                                "ManufacturerPostalCode": "FL 33716",
                                "ManufacturerTown": "St. Petersburg",
                                "ManufacturerCountry": "UNITED STATES MINOR OUTLYING ISLANDS",
                                "ManufacturerPhone": "+1727-803-8000",
                                "ManufacturerEmail": "",
                                "ManufacturerWebSiteUrl": "www.freedomsci.com",
                                "ImageUrl": "",
                                "EnglishDescription": "Screenreader software for Windows platform.<table border='0'><tr><td colspan='3'>The following specifications may only comply to some variants.</td></tr><tr><td colspan='3'><strong>Can be used with synthetic speech</strong></td></tr><tr><td colspan='3'><strong>Can be used with digitalized speech</strong></td></tr><tr><td colspan='3'><strong>Reads out selected text at clipboard</strong></td></tr><tr><td colspan='3'><strong>Reading out while typing</strong></td></tr><tr><td colspan='3'><strong>Features of the screen reader</strong></td></tr><tr><td colspan='3'><strong>All functions by keyboard</strong></td></tr><tr><td colspan='3'><strong>All functions by mouse</strong></td></tr></table>",
                                "OriginalUrl": "http://www.hmi-basen.dk/r11x.asp?linkinfo=4169",
                                "EnglishUrl": "http://www.hmi-basen.dk/en/r11x.asp?linkinfo=4169",
                                "Features": [],
                                "Database": "Hjælpemiddelbasen",
                                "ProductCode": "4169",
                                "IsoCodePrimary": {
                                    "Code": "22.39.12",
                                    "Name": "Special output software"
                                },
                                "IsoCodesOptional": [],
                                "CommercialName": "JAWS",
                                "ManufacturerOriginalFullName": "Freedom Scientific",
                                "InsertDate": "1999-06-01T00:00:00+02:00",
                                "LastUpdateDate": "2014-10-14T11:23:12+02:00",
                                "ThumbnailImageUrl": "",
                                "SimilarityLevel": 0
                            },
                            "updated": "2014-10-14T11:23:12+02:00",
                            "uid": "1419325432847-242"
                        },
                        {
                            "status": "new",
                            "language": "es_es",
                            "name": "Jaws 14",
                            "description": "",
                            "source": "Handicat",
                            "sid": "12011",
                            "manufacturer": {
                                "name": "Freedom Scientifics corporate",
                                "address": null,
                                "postalCode": null,
                                "cityTown": null,
                                "country": null,
                                "phone": null,
                                "email": null,
                                "url": null
                            },
                            "ontologies": {
                                "iso9999": {
                                    "IsoCodePrimary": {
                                        "Code": "22.39.12",
                                        "Name": "Special output software"
                                    },
                                    "IsoCodesOptional": []
                                }
                            },
                            "sourceData": {
                                "ManufacturerAddress": null,
                                "ManufacturerPostalCode": null,
                                "ManufacturerTown": null,
                                "ManufacturerCountry": null,
                                "ManufacturerPhone": null,
                                "ManufacturerEmail": null,
                                "ManufacturerWebSiteUrl": null,
                                "ImageUrl": "http://www.handicat.com/image/12011.jpg",
                                "EnglishDescription": "",
                                "OriginalUrl": "http://www.handicat.com/at-num-12011.html",
                                "EnglishUrl": "http://www.handicat.com/at-num-12011.html",
                                "Features": [],
                                "Database": "Handicat",
                                "ProductCode": "12011",
                                "IsoCodePrimary": {
                                    "Code": "22.39.12",
                                    "Name": "Special output software"
                                },
                                "IsoCodesOptional": [],
                                "CommercialName": "Jaws 14",
                                "ManufacturerOriginalFullName": "Freedom Scientifics corporate",
                                "InsertDate": "2004-11-10T00:00:00+01:00",
                                "LastUpdateDate": "2014-06-20T00:00:00+02:00",
                                "ThumbnailImageUrl": "http://www.handicat.com/thumb/12011.jpg",
                                "SimilarityLevel": 0
                            },
                            "updated": "2014-06-20T00:00:00+02:00",
                            "uid": "1419325432847-242"
                        },
                        {
                            "status": "new",
                            "language": "nl_nl",
                            "name": "Jaws Jaws",
                            "description": "Dutch-screen reading program.<br/><br/>Provided with:<br/><br/>speaking installer;<br/><br/>online help system;<br/><br/>Dutch RealSpeak spraaksyntesizer, which supports the orderly display of links and frames when using Internet Explorer.<br/><br/>Suitable for:<br/><br/>Windows XP;<br/><br/>Windows 2000;<br/><br/>Windows NT;<br/><br/>Windows Me;<br/><br/>Windows 98;<br/><br/>Vista.<br/><br/>Can work with the Focus braille Freedom Scientific Benelux used.",
                            "source": "Hulpmiddelenwijzer",
                            "sid": "124665",
                            "manufacturer": {
                                "name": "Freedom Scientific Benelux, Optelec Nederland B.V.",
                                "address": null,
                                "postalCode": null,
                                "cityTown": null,
                                "country": null,
                                "phone": null,
                                "email": null,
                                "url": null
                            },
                            "ontologies": {
                                "iso9999": {
                                    "IsoCodePrimary": {
                                        "Code": "22.39.12",
                                        "Name": "Special output software"
                                    },
                                    "IsoCodesOptional": []
                                }
                            },
                            "sourceData": {
                                "ManufacturerAddress": null,
                                "ManufacturerPostalCode": null,
                                "ManufacturerTown": null,
                                "ManufacturerCountry": null,
                                "ManufacturerPhone": null,
                                "ManufacturerEmail": null,
                                "ManufacturerWebSiteUrl": null,
                                "ImageUrl": "",
                                "EnglishDescription": "Dutch-screen reading program.<br/><br/>Provided with:<br/><br/>speaking installer;<br/><br/>online help system;<br/><br/>Dutch RealSpeak spraaksyntesizer, which supports the orderly display of links and frames when using Internet Explorer.<br/><br/>Suitable for:<br/><br/>Windows XP;<br/><br/>Windows 2000;<br/><br/>Windows NT;<br/><br/>Windows Me;<br/><br/>Windows 98;<br/><br/>Vista.<br/><br/>Can work with the Focus braille Freedom Scientific Benelux used.",
                                "OriginalUrl": "http://www.hulpmiddelenwijzer.nl/jaws-jaws",
                                "EnglishUrl": "http://www.hulpmiddelenwijzer.nl/jaws-jaws",
                                "Features": [],
                                "Database": "Hulpmiddelenwijzer",
                                "ProductCode": "124665",
                                "IsoCodePrimary": {
                                    "Code": "22.39.12",
                                    "Name": "Special output software"
                                },
                                "IsoCodesOptional": [],
                                "CommercialName": "Jaws Jaws",
                                "ManufacturerOriginalFullName": "Freedom Scientific Benelux, Optelec Nederland B.V.",
                                "InsertDate": "1998-01-15T00:00:00+01:00",
                                "LastUpdateDate": "2013-11-25T16:54:38+01:00",
                                "ThumbnailImageUrl": "",
                                "SimilarityLevel": 0
                            },
                            "updated": "2013-11-25T16:54:38+01:00",
                            "uid": "1419325432847-242"
                        },
                        {
                            "status": "new",
                            "language": "nl_be",
                            "name": "Jaws 14",
                            "description": "-Machine translation-",
                            "source": "Vlibank",
                            "sid": "B812",
                            "manufacturer": {
                                "name": "Freedom Scientific USA",
                                "address": null,
                                "postalCode": null,
                                "cityTown": null,
                                "country": null,
                                "phone": null,
                                "email": null,
                                "url": null
                            },
                            "ontologies": {
                                "iso9999": {
                                    "IsoCodePrimary": {
                                        "Code": "22.39.12",
                                        "Name": "Special output software"
                                    },
                                    "IsoCodesOptional": []
                                }
                            },
                            "sourceData": {
                                "ManufacturerAddress": null,
                                "ManufacturerPostalCode": null,
                                "ManufacturerTown": null,
                                "ManufacturerCountry": null,
                                "ManufacturerPhone": null,
                                "ManufacturerEmail": null,
                                "ManufacturerWebSiteUrl": null,
                                "ImageUrl": "http://www.vlibank.be/scan.jsp?PID=B812&TYPE=jpg&RANG=A&SIZE=medium",
                                "EnglishDescription": "-Machine translation-",
                                "OriginalUrl": "http://www.vlibank.be/vlibank.jsp?COMMAND=PRINT&RECORD_ID=B812",
                                "EnglishUrl": "http://www.vlibank.be/vlibank.jsp?COMMAND=PRINT&RECORD_ID=B812",
                                "Features": [],
                                "Database": "Vlibank",
                                "ProductCode": "B812",
                                "IsoCodePrimary": {
                                    "Code": "22.39.12",
                                    "Name": "Special output software"
                                },
                                "IsoCodesOptional": [],
                                "CommercialName": "Jaws 14",
                                "ManufacturerOriginalFullName": "Freedom Scientific USA",
                                "InsertDate": "1999-09-17T00:00:00+02:00",
                                "LastUpdateDate": "2013-04-22T00:00:00+02:00",
                                "ThumbnailImageUrl": "http://www.vlibank.be/scan.jsp?PID=B812&TYPE=jpg&RANG=A&SIZE=mini",
                                "SimilarityLevel": 0
                            },
                            "updated": "2013-04-22T00:00:00+02:00",
                            "uid": "1419325432847-242"
                        },
                        {
                            "status": "new",
                            "language": "de_de",
                            "name": "JAWS",
                            "description": "Screen Reader<br />The screen reader JAWS (Job Access With Speech) enables blind and visually impaired people to gain access to the PC through the issue of the screen contents via a speech synthesizer or a braille display<br />Features / Components:<br />functionality.<br />- Special Internet features such as: Navigation shortcuts , link and frame lists, form, mode, and reading HTML tables<br />- labels, both for the language and for Braille assigned or changed<br />speech synthesizer compatibility<br />languages ??<br />German, English (American and British), Finnish, French ( French and Canadian), Italian, Spanish (Castilian and South American), Brazilian Portuguese<br />voice<br />on popular sound cards with integrated speech synthesis Eloquence (from JAWS version 8.0 with SAPI5 speech synthesis RealSpeak Solo)<br />other supported language editions:<br />Apollo 2, Braillen Speak, DECtalk, Double Talk, Talk Flex, Juno, Keynote (PC, SA and PCMCIA), infovox 500/700/220/230/330, Sound Blaster with Text Assist, Speak & Win and other<br />Braille Compatibility:<br />- Braille Monitor<br />- Output to all standard Braille<br />JAWS supports braille displays the following manufacturers:<br />- ALVA, Blazie, engineering, Handy Tech, Tiemann (not all features supported)<br />- Telesensory, Pape Meier (does not support all functions), B & M (not all functions supported)<br />Software Compatibility:<br />- Windows start functions controlled with voice output and Braille display<br />- Registration in network possible<br />- programs from the desktop start possible<br />- Using the Taskbar and Task Manager disabled<br />- automatically detects blank data areas of a Application<br />- access to the context menu and elements of the system menu<br />- File Management with Windows Explorer possible<br />- System messages are controllable<br />- allows to read PDF documents (including documents protected from Acrobat 6.0)<br />- supports MS Internet Explorer 7 and Mozilla Firefox and other Internet programs<br />- supports all Windows standard programs and other popular applications<br />- individual adaptation to different PC applications via scripts possible<br />Other: - Talking installation process<br />- Manual and Help documentation online, on disk and Braille available (from version 8.0 with daisy audio book)<br />System Requirements for JAWS:<br />- operating system for JAWS 14.0 Private: Microsoft Windows XP, Vista, Win 7 and Win 8, 32 or 64 bit<br />- operating system for JAWS 14.0 Pro: Microsoft Windows XP Pro, Vista Pro, Win 7 Pro and Win 8 Pro, 32 or 64 bit<br />Price (no guarantee):<br />Retail price plus VAT<br />1677.90 EUR - JAWS 11.0 Standard single license for Microsoft Windows XP, Vista and Windows 7<br />3011.89 EUR - JAWS 11.0 Pro, single user license for Microsoft Windows XP Pro , Vista Pro and Windows 7 Pro<br />1204.71 EUR - JAWS 11.0 for pupils / students<br />97.46 EUR - Surcharge for a license dongle<br />Review of the DIAS GmbH<br /><br />The translation of the content is performed by the external website Google™ Translate.<br />The service provides automated computer translations. <br />REHADAT assumes no reponsibility or liability for the complete accuracy of the content.<br/>",
                            "source": "Rehadat",
                            "sid": "C/00505",
                            "manufacturer": {
                                "name": "Freedom Scientific Blind/Low Vision Group and Corporate Offices",
                                "address": null,
                                "postalCode": null,
                                "cityTown": null,
                                "country": null,
                                "phone": null,
                                "email": null,
                                "url": null
                            },
                            "ontologies": {
                                "iso9999": {
                                    "IsoCodePrimary": {
                                        "Code": "22.39.12",
                                        "Name": "Special output software"
                                    },
                                    "IsoCodesOptional": [
                                        {
                                            "Code": "22.39",
                                            "Name": "Output devices for computers"
                                        }
                                    ]
                                }
                            },
                            "sourceData": {
                                "ManufacturerAddress": null,
                                "ManufacturerPostalCode": null,
                                "ManufacturerTown": null,
                                "ManufacturerCountry": null,
                                "ManufacturerPhone": null,
                                "ManufacturerEmail": null,
                                "ManufacturerWebSiteUrl": null,
                                "ImageUrl": "",
                                "EnglishDescription": "Screen Reader<br />The screen reader JAWS (Job Access With Speech) enables blind and visually impaired people to gain access to the PC through the issue of the screen contents via a speech synthesizer or a braille display<br />Features / Components:<br />functionality.<br />- Special Internet features such as: Navigation shortcuts , link and frame lists, form, mode, and reading HTML tables<br />- labels, both for the language and for Braille assigned or changed<br />speech synthesizer compatibility<br />languages ??<br />German, English (American and British), Finnish, French ( French and Canadian), Italian, Spanish (Castilian and South American), Brazilian Portuguese<br />voice<br />on popular sound cards with integrated speech synthesis Eloquence (from JAWS version 8.0 with SAPI5 speech synthesis RealSpeak Solo)<br />other supported language editions:<br />Apollo 2, Braillen Speak, DECtalk, Double Talk, Talk Flex, Juno, Keynote (PC, SA and PCMCIA), infovox 500/700/220/230/330, Sound Blaster with Text Assist, Speak & Win and other<br />Braille Compatibility:<br />- Braille Monitor<br />- Output to all standard Braille<br />JAWS supports braille displays the following manufacturers:<br />- ALVA, Blazie, engineering, Handy Tech, Tiemann (not all features supported)<br />- Telesensory, Pape Meier (does not support all functions), B & M (not all functions supported)<br />Software Compatibility:<br />- Windows start functions controlled with voice output and Braille display<br />- Registration in network possible<br />- programs from the desktop start possible<br />- Using the Taskbar and Task Manager disabled<br />- automatically detects blank data areas of a Application<br />- access to the context menu and elements of the system menu<br />- File Management with Windows Explorer possible<br />- System messages are controllable<br />- allows to read PDF documents (including documents protected from Acrobat 6.0)<br />- supports MS Internet Explorer 7 and Mozilla Firefox and other Internet programs<br />- supports all Windows standard programs and other popular applications<br />- individual adaptation to different PC applications via scripts possible<br />Other: - Talking installation process<br />- Manual and Help documentation online, on disk and Braille available (from version 8.0 with daisy audio book)<br />System Requirements for JAWS:<br />- operating system for JAWS 14.0 Private: Microsoft Windows XP, Vista, Win 7 and Win 8, 32 or 64 bit<br />- operating system for JAWS 14.0 Pro: Microsoft Windows XP Pro, Vista Pro, Win 7 Pro and Win 8 Pro, 32 or 64 bit<br />Price (no guarantee):<br />Retail price plus VAT<br />1677.90 EUR - JAWS 11.0 Standard single license for Microsoft Windows XP, Vista and Windows 7<br />3011.89 EUR - JAWS 11.0 Pro, single user license for Microsoft Windows XP Pro , Vista Pro and Windows 7 Pro<br />1204.71 EUR - JAWS 11.0 for pupils / students<br />97.46 EUR - Surcharge for a license dongle<br />Review of the DIAS GmbH<br /><br />The translation of the content is performed by the external website Google™ Translate.<br />The service provides automated computer translations. <br />REHADAT assumes no reponsibility or liability for the complete accuracy of the content.<br/>",
                                "OriginalUrl": "http://www.rehadat-hilfsmittel.de/de/suche/index.html?connectdb=hilfsmittel_result&infobox=%2Finfobox1.html&serviceCounter=1&&wsdb=TEC&GIX=C/00505",
                                "EnglishUrl": "http://www.rehadat-hilfsmittel.de/de/suche/index.html?connectdb=hilfsmittel_result&infobox=%2Finfobox1.html&serviceCounter=1&&wsdb=TEC&GIX=C/00505",
                                "Features": [],
                                "Database": "Rehadat",
                                "ProductCode": "C/00505",
                                "IsoCodePrimary": {
                                    "Code": "22.39.12",
                                    "Name": "Special output software"
                                },
                                "IsoCodesOptional": [
                                    {
                                        "Code": "22.39",
                                        "Name": "Output devices for computers"
                                    }
                                ],
                                "CommercialName": "JAWS",
                                "ManufacturerOriginalFullName": "Freedom Scientific Blind/Low Vision Group and Corporate Offices",
                                "InsertDate": "1996-12-30T00:00:00+01:00",
                                "LastUpdateDate": "2013-03-27T00:00:00+01:00",
                                "ThumbnailImageUrl": "",
                                "SimilarityLevel": 0
                            },
                            "updated": "2013-03-27T00:00:00+01:00",
                            "uid": "1419325432847-242"
                        },
                        {
                            "status": "new",
                            "language": "it_it",
                            "name": "FREEDOM SCIENTIFIC - JAWS PER WINDOWS",
                            "description": "Screen reading software  for Windows trhought speech synthesisers and Braille displays. Compatible with most of the speech and Braille displays on the market. Thanks to this program, a blind user is able to navigate throught the Windows enviroment moving either icon by icon or window by window, getting the feedback according the context where is located throught a speech synthesiser and/or a Braille display.\r\nJaws is available in two different version: Jaws Standard (for Windows 9x, Me, XP H.E.) and Jaws Professional (also for Windows NT4, 2000, XP Pro).\r\n<br /><br />Technical details:<br />REPORTED WITHIN THE RESEARCH PROJECT<br />Cloud4All",
                            "source": "Siva",
                            "sid": "13614",
                            "manufacturer": {
                                "name": "FREEDOM SCIENTIFIC",
                                "address": "11800 31st Court North",
                                "postalCode": "FL 33716",
                                "cityTown": "ST. PETERSBURG",
                                "country": "UNITED STATES",
                                "phone": "+1-7278038000",
                                "email": "info@freedomscientific.com",
                                "url": "http://www.freedomscientific.com"
                            },
                            "ontologies": {
                                "iso9999": {
                                    "IsoCodePrimary": {
                                        "Code": "22.39.12",
                                        "Name": "Special output software"
                                    },
                                    "IsoCodesOptional": []
                                }
                            },
                            "sourceData": {
                                "ManufacturerAddress": "11800 31st Court North",
                                "ManufacturerPostalCode": "FL 33716",
                                "ManufacturerTown": "ST. PETERSBURG",
                                "ManufacturerCountry": "UNITED STATES",
                                "ManufacturerPhone": "+1-7278038000",
                                "ManufacturerEmail": "info@freedomscientific.com",
                                "ManufacturerWebSiteUrl": "http://www.freedomscientific.com",
                                "ImageUrl": "http://portale.siva.it/files/images/product/full/13614_b.jpg",
                                "EnglishDescription": "Screen reading software  for Windows trhought speech synthesisers and Braille displays. Compatible with most of the speech and Braille displays on the market. Thanks to this program, a blind user is able to navigate throught the Windows enviroment moving either icon by icon or window by window, getting the feedback according the context where is located throught a speech synthesiser and/or a Braille display.\r\nJaws is available in two different version: Jaws Standard (for Windows 9x, Me, XP H.E.) and Jaws Professional (also for Windows NT4, 2000, XP Pro).\r\n<br /><br />Technical details:<br />REPORTED WITHIN THE RESEARCH PROJECT<br />Cloud4All",
                                "OriginalUrl": "http://portale.siva.it/it-IT/databases/products/detail/id-13614",
                                "EnglishUrl": "http://portale.siva.it/en-GB/databases/products/detail/id-13614",
                                "Features": [
                                    {
                                        "FeatureId": 66,
                                        "FeatureName": "English",
                                        "FeatureParentName": "Languages",
                                        "ValueMin": 0,
                                        "ValueMax": 0
                                    },
                                    {
                                        "FeatureId": 64,
                                        "FeatureName": "Danish",
                                        "FeatureParentName": "Languages",
                                        "ValueMin": 0,
                                        "ValueMax": 0
                                    },
                                    {
                                        "FeatureId": 65,
                                        "FeatureName": "Dutch",
                                        "FeatureParentName": "Languages",
                                        "ValueMin": 0,
                                        "ValueMax": 0
                                    },
                                    {
                                        "FeatureId": 67,
                                        "FeatureName": "French",
                                        "FeatureParentName": "Languages",
                                        "ValueMin": 0,
                                        "ValueMax": 0
                                    },
                                    {
                                        "FeatureId": 68,
                                        "FeatureName": "German",
                                        "FeatureParentName": "Languages",
                                        "ValueMin": 0,
                                        "ValueMax": 0
                                    },
                                    {
                                        "FeatureId": 297,
                                        "FeatureName": "Spanish",
                                        "FeatureParentName": "Languages",
                                        "ValueMin": 0,
                                        "ValueMax": 0
                                    },
                                    {
                                        "FeatureId": 295,
                                        "FeatureName": "Italian",
                                        "FeatureParentName": "Languages",
                                        "ValueMin": 0,
                                        "ValueMax": 0
                                    },
                                    {
                                        "FeatureId": 316,
                                        "FeatureName": "Windows",
                                        "FeatureParentName": "Operating systems",
                                        "ValueMin": 0,
                                        "ValueMax": 0
                                    },
                                    {
                                        "FeatureId": 83,
                                        "FeatureName": "Tactile display",
                                        "FeatureParentName": "Output devices",
                                        "ValueMin": 0,
                                        "ValueMax": 0
                                    },
                                    {
                                        "FeatureId": 85,
                                        "FeatureName": "Voice synthesis",
                                        "FeatureParentName": "Output devices",
                                        "ValueMin": 0,
                                        "ValueMax": 0
                                    },
                                    {
                                        "FeatureId": 279,
                                        "FeatureName": "Screen reader software",
                                        "FeatureParentName": "Subdivision",
                                        "ValueMin": 0,
                                        "ValueMax": 0
                                    }
                                ],
                                "Database": "Siva",
                                "ProductCode": "13614",
                                "IsoCodePrimary": {
                                    "Code": "22.39.12",
                                    "Name": "Special output software"
                                },
                                "IsoCodesOptional": [],
                                "CommercialName": "FREEDOM SCIENTIFIC - JAWS PER WINDOWS",
                                "ManufacturerOriginalFullName": "FREEDOM SCIENTIFIC",
                                "InsertDate": "1999-06-15T00:00:00+02:00",
                                "LastUpdateDate": "2006-01-19T08:39:00+01:00",
                                "ThumbnailImageUrl": "http://portale.siva.it/files/images/product/thumbs/13614_s.jpg",
                                "SimilarityLevel": 0
                            },
                            "updated": "2006-01-19T08:39:00+01:00",
                            "uid": "1419325432847-242"
                        },
                        {
                            "source": "unified",
                            "sid": "1419325432847-242",
                            "uid": "1419325432847-242",
                            "status": "new",
                            "name": "Jaws For Windows",
                            "description": "<br /><br />Screen reader software.  Comprises: supports standard Windows office applications, Internet Explorer, Firefox, MSN Messenger, and Adobe Acrobat Reader, Lotus Symphony/Notes and others; outputs to refreshable Braille displays; multilingual synthesizer; supports Internet Explorer including links lists, frames lists, forms mode, reading HTML tables and graphic labels; supports dual monitors; interactive talking installation and basic training tutorial. Options include: standard edition for 32-bit or 64-bit versions of Windows 7 Home Premium, Windows Vista Home Premium, Windows Vista Home Basic and 32-bit Windows XP Home operating systems; professional edition for all 32-bit or 64-bit versions of Windows 7, Windows Vista, and Windows Server 2008 and 32-bit versions of Windows XP and Windows Server 2003. \n  Note: voice synthesizer requires a sound card compatible with the users version of Windows.<br /><br />Price from (&pound;): 659<br /><br /><br /><br />Software<br />Adjust voice pitch: Standard <br />Adjust voice speed: Standard <br />Braille output: Standard <br />CD-Rom; USB Pen; Download: CD-Rom <br />Pronunciation correction: Standard <br />Read text with mouse over: Feature not available <br />Screen Zoom: Feature not available <br />Talking installation: Standard <br />Windows operating system: XP, Vista and 7",
                            "manufacturer": {
                                "name": "Freedom Scientific",
                                "address": null,
                                "postalCode": null,
                                "cityTown": null,
                                "country": null,
                                "phone": null,
                                "email": null,
                                "url": null
                            },
                            "updated": "2014-12-23T09:03:52.847Z"
                        }
                    ]
                },
                "ul-view-jqunit": "\"use strict\";\nvar fluid = require(\"infusion\");\nvar jqUnit = fluid.require(\"jqUnit\");\n\njqUnit.module(\"UL Couch View Unit Tests\");\n\n// We have to load our reduce function manually because couch does not support modules that can be used with \"require\".\nvar fs = require(\"fs\");\nvar reduceContent = fs.readFileSync(__dirname + \"/../views/unified/reduce.js\", { \"encoding\": \"utf-8\"});\nvar reducer;\neval(\"reducer = \" + reduceContent);\n\njqUnit.test(\"Testing reduce function (single reduce pass, tree <- leaf)...\",function(){\n    var data    = [{\"uid\": \"foo\", \"source\": \"unified\", \"sid\": \"foo\"},{\"uid\":\"foo\", \"source\":\"child\", \"sid\": \"bar\"}];\n    var output  = reducer([\"foo\",\"foo\"], data, false);\n\n    jqUnit.assertDeepEq(\"There should be one merged record...\", {\"foo\": { \"uid\": \"foo\", \"source\": \"unified\", \"sid\": \"foo\", \"sources\": [ {\"uid\": \"foo\", \"source\": \"child\", \"sid\": \"bar\"} ] }}, output);\n});\n\njqUnit.test(\"Testing reduce function (single reduce pass, leaf <- tree)...\",function(){\n    var data    = [{\"uid\":\"foo\", \"source\":\"child\", \"sid\": \"bar\"}, {\"uid\": \"foo\", \"source\": \"unified\", \"sid\": \"foo\"}];\n    var output  = reducer([\"foo\",\"foo\"], data, false);\n\n    jqUnit.assertDeepEq(\"There should be one merged record...\", {\"foo\": { \"uid\": \"foo\", \"source\": \"unified\", \"sid\": \"foo\", \"sources\": [ {\"uid\": \"foo\", \"source\": \"child\", \"sid\": \"bar\"} ] }}, output);\n});\n\njqUnit.test(\"Testing reduce function (no clusters)...\",function(){\n    var data    = [{\"source\":\"child\", \"sid\": \"bar\"}, {\"source\": \"child2\", \"sid\": \"baz\"}];\n    var output  = reducer([\"foo\",\"foo\"], data, false);\n\n    jqUnit.assertDeepEq(\"There should be two products...\", {\"child:bar\": { \"source\": \"child\", \"sid\": \"bar\" }, \"child2:baz\": { \"source\": \"child2\", \"sid\": \"baz\"}}, output);\n});\n\njqUnit.test(\"Testing rereduce function, one record split between two sets...\",function(){\n    var data    = [\n        {\"foo\": { \"uid\": \"foo\", \"source\": \"unified\", \"sid\": \"foo\"}},\n        {\"foo\": { \"sources\": [ {\"sid\": \"bar\", \"source\": \"child\", \"uid\": \"foo\"} ] }}\n    ];\n\n    var output  = reducer(null, data, true);\n\n    jqUnit.assertDeepEq(\"There should be one merged record...\", {\"foo\": { \"uid\": \"foo\", \"source\": \"unified\", \"sid\": \"foo\", \"sources\": [ {\"uid\": \"foo\", \"source\": \"child\", \"sid\": \"bar\"} ] }}, output);\n});\n\njqUnit.test(\"Testing rereduce function, no clusters...\",function(){\n    var data    = [{\"child:bar\": { \"source\": \"child\", \"sid\": \"bar\" }},{\"child2:baz\": { \"source\": \"child2\", \"sid\": \"baz\"}}];\n\n    var output  = reducer(null, data, true);\n\n    jqUnit.assertDeepEq(\"There should be two products...\", {\"child:bar\": { \"source\": \"child\", \"sid\": \"bar\" }, \"child2:baz\": { \"source\": \"child2\", \"sid\": \"baz\"}}, output);\n});\n\n\njqUnit.test(\"Testing reduce with JAWS products...\",function(){\n    var data    = require(\"./data/jaws.json\");\n    var reduced = reducer(null,data,false);\n    jqUnit.assertEquals(\"There should be one record in the reduced output...\", 1, Object.keys(reduced).length);\n    jqUnit.assertEquals(\"There should be seven products in the reduced 'sources' list...\", 7, reduced[Object.keys(reduced)[0]].sources.length);\n});\n\njqUnit.test(\"Testing rereduce with JAWS products...\",function(){\n    var data    = require(\"./data/jaws.json\");\n\n    var slice1    = data.slice(0,2);\n    var reduced1  = reducer(null, slice1, false);\n    var slice2    = data.slice(2,4);\n    var reduced2  = reducer(null, slice2, false);\n    var slice3    = data.slice(4,5);\n    var reduced3  = reducer(null, slice3, false);\n    var slice4    = data.slice(5,8);\n    var reduced4  = reducer(null, slice4, false);\n\n    var rereduced  = reducer(null, [reduced1, reduced2, reduced3 ,reduced4], true);\n\n    jqUnit.assertEquals(\"There should be one record in the rereduced output...\", 1, Object.keys(rereduced).length);\n    jqUnit.assertEquals(\"There should be seven products in the rereduced 'sources' list...\", 7, rereduced[Object.keys(rereduced)[0]].sources.length);\n});\n"
            },
            "views": {
                "merged": {
                    "map": "function(doc) {\n    if (doc.source === \"unified\" && doc.sid !== doc.uid) {\n        emit( doc.sid, doc);\n    }\n}\n"
                },
                "orphans": {
                    "map": "function(doc) {\n    if (!doc.uid && doc.source !== \"unified\") {\n        emit([doc.source, doc.sid], doc);\n    }\n}\n"
                },
                "products": {
                    "map": "function(doc) {\n    if (doc.source && doc.sid) {\n        emit([doc.source, doc.sid],doc);\n    }\n}\n"
                },
                "records_by_source": {
                    "map": "function (doc) {\n    if (doc.source) {\n        emit(doc.source, doc);\n    }\n}\n"
                },
                "records_by_uid": {
                    "map": "function (doc) {\n    if (doc.uid) { emit(doc.uid, doc); }\n}\n"
                }
            },
            "language": "javascript",
            "_id": "_design/ul"
        },
        {
            "views": {
                "byisocode": {
                    "map": "function (doc) {\n    \"use strict\";\n    if (doc.status !== \"deleted\" && doc.status !== \"new\" && doc.source === \"unified\" && doc.isoCodes && doc.isoCodes.length > 0)  {\n        // ISO Codes are hierarchical, i.e. 22.21.12 implies that the record is also part of the category 22.21.  Some\n        // records include parent codes and some do not, so we create a \"unique records\" map to ensure that we always\n        // emit 'parent codes' exactly once.\n        var toEmitByIsoCode = {};\n        for (var index = 0; index < doc.isoCodes.length; index ++) {\n            var isoCodeDef = doc.isoCodes[index];\n            if (isoCodeDef.Code) {\n                var code = isoCodeDef.Code && isoCodeDef.Code.replace(/\\./g, \"\");\n                toEmitByIsoCode[code] = doc;\n                if (code.length > 4) {\n                    var parentCode = code.slice(0,4);\n                    toEmitByIsoCode[parentCode] = doc;\n                }\n            }\n        }\n\n        var isoCodes = Object.keys(toEmitByIsoCode);\n        for (var index = 0; index < isoCodes.length; index++) {\n            var key = isoCodes[index];\n            var doc = toEmitByIsoCode[key];\n            emit(key, doc);\n        }\n    }\n}\n"
                },
                "manufacturerproductcount": {
                    "map": "function (doc) {\n    \"use strict\";\n    if (doc.status !== \"deleted\" && doc.status !== \"new\" && doc.source === \"unified\" && doc.manufacturer && doc.manufacturer.id) {\n        emit(doc.manufacturer.id, doc.manufacturer);\n    }\n}\n",
                    "reduce": "_count\n"
                },
                "manufacturers": {
                    "map": "function (doc) {\n    \"use strict\";\n    if (doc.status !== \"deleted\" && doc.status !== \"new\" && doc.source === \"unified\" && doc.manufacturer && doc.manufacturer.id) {\n        emit(doc.manufacturer.id, doc.manufacturer);\n    }\n}\n",
                    "reduce": "function (keys, values) {\n    \"use strict\";\n    return values[0];\n}\n"
                }
            },
            "language": "javascript",
            "_id": "_design/eastin"
        }
    ]
}
