WITS source gallery

Sample document

WITS XML document
<?xml version="1.0" encoding="ISO-8859-1"?>
<IncidentList xmlns="http://wits.nctc.gov"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://wits.nctc.gov WITS.XSD">
 
<Incident>
<ICN>200459257</ICN>
<Subject>1 parliamentary candidate killed by suspected LTTE in Batticaloa, North Eastern Province, Sri Lanka</Subject>
<Summary>On 1 March 2004, during the pre-dawn hours, in Batticaloa, North Eastern Province, Sri Lanka, an armed assailant fired upo
n and killed a Tamil parliamentary candidate as he was recovering from a previous assassination attempt on 28 February 2004.  No gr
oup claimed responsibility, although authorities believed the Liberation Tigers of Tamil Eelam (LTTE) was responsible.</Summary>
<IncidentDate>03/01/2004</IncidentDate>
<ApproximateDate>No</ApproximateDate>
<MultipleDays>No</MultipleDays>
<EventTypeList>
<EventType>Armed Attack</EventType>
</EventTypeList>
<Assassination>Yes</Assassination>
<Suicide>No</Suicide>
<WeaponTypeList>
<WeaponType>Firearm</WeaponType>
</WeaponTypeList>
<IED>No</IED>
<Location>
<Region>South Asia</Region>
<Country>Sri Lanka</Country>
<CityStateProvinceList><CityStateProvince>
<City>Batticaloa</City>
<StateProvince>North Eastern Province</StateProvince>
</CityStateProvince>
</CityStateProvinceList>
</Location>
<VictimList>
<Victim>
<VictimType>Politically Affiliated</VictimType>
<Combatant>No</Combatant>
<Nationality>Sri Lanka</Nationality>
<DefiningCharacteristicList>
<DefiningCharacteristic>Unknown</DefiningCharacteristic>
</DefiningCharacteristicList>
<TargetedCharacteristicList>
<TargetedCharacteristic>Unknown</TargetedCharacteristic>
</TargetedCharacteristicList>
<Indicator>Targeted</Indicator>
<Child>No</Child>
<DeadCount>1</DeadCount>
<WoundedCount>0</WoundedCount>
<HostageCount>0</HostageCount>
</Victim>
</VictimList>
<FacilityList/>
<PerpetratorList>
<Perpetrator>
<Nationality>Sri Lanka</Nationality>
<Characteristic>Secular/Political/Anarchist</Characteristic>
</Perpetrator>
</PerpetratorList>
</Incident>


<!--...-->
 
</IncidentList>

Source

{
    "description": "wits test",
    "isPublic": true,
    "mediaType": "Report",
    "searchCycle_secs": -1,
    "tags": [
        "incidents",
        "nctc",
        "terrorism",
        "wits",
        "events",
        "worldwide"
    ],
    "title": "wits test",
    "processingPipeline": [
        {
            "file": {
                "XmlIgnoreValues": [
                    "DefiningCharacteristicList",
                    "TargetedCharacteristicList",
                    "WeaponTypeList",
                    "PerpetratorList",
                    "VictimList",
                    "EventTypeList",
                    "CityStateProvinceList",
                    "FacilityList"
                ],
                "XmlPrimaryKey": "icn",
                "XmlRootLevelValues": [
                    "Incident"
                ],
                "XmlSourceName": "https://wits.nctc.gov/FederalDiscoverWITS/index.do?N=0&Ntk=ICN&Ntx=mode%20match&Ntt=",
                "domain": "XXX",
                "password": "XXX",
                "username": "XXX",
                "url": "smb://modus:139/wits/allfiles/"
            }
        },
        {
            "globals": {
                "scripts": [
                    "function getLocationEntity() { var s = (_iterator.citystateprovince.city != null) ? _iterator.citystateprovince.city : ''; s+= (s.length > 0) ? ',' : ''; s+= (_iterator.citystateprovince.stateprovince != null) ? _iterator.citystateprovince.stateprovince : ''; s+= (s.length > 0) ? ',' : ''; s+= (_iterator.country != null) ? _iterator.country : ''; return s; } function getVictim() { var indicator = (_iterator.indicator != 'Unknown') ? _iterator.indicator : ''; var victimType = (_iterator.victimtype != 'Unknown') ? _iterator.victimtype : ''; var child = (_iterator.child == 'Yes') ? 'Child' : 'Adult'; var combatant = (_iterator.combatant == 'Yes') ? 'Combatant' : ''; var targeted = (_iterator.targetedcharacteristic != 'None' && _iterator.targetedcharacteristic != 'Unknown') ? _iterator.targetedcharacteristic : ''; var defining = (_iterator.definingcharacteristic != 'None' &&_iterator.definingcharacteristic != 'Unknown') ? _iterator.definingcharacteristic : ''; var s = indicator; if (victimType.length > 0) { if (s.length > 0) { s += ', '; } s += victimType; } if (s.length > 0) { s += ', '; } s += child; if (combatant.length > 0) { if (s.length > 0) { s += ', '; } s += combatant; } if (targeted.length > 0) { if (s.length > 0) { s += ', '; } s += targeted; } if (defining.length > 0) { if (s.length > 0) { s += ', '; } s += defining; } if (s.length > 0) { s += ' from '; } s += _iterator.nationality; return s; } function getVictimCount() { var count = parseInt(_iterator.deadcount, 10) + parseInt(_iterator.woundedcount, 10); return count; } function getEventType() { var s = _value; if (_doc.metadata.assassination[0] == 'Yes') s += ', Assassination'; if (_doc.metadata.suicide[0] == 'Yes') s += ', Suicide'; if (_doc.metadata.ied[0] == 'Yes') s += ', IED'; return s; } function getEventTypeFull() { var s = _doc.metadata.eventtype[0]; if (_doc.metadata.assassination[0] == 'Yes') s += ', Assassination'; if (_doc.metadata.suicide[0] == 'Yes') s += ', Suicide'; if (_doc.metadata.ied[0] == 'Yes') s += ', IED'; return s;} function isOrganizationSpecified() {  if (_doc.metadata.organization != null && _doc.metadata.organization[0].toString().toLowerCase() == 'no group') { return false; } else { return true; } }function getOrganizationName() {  if (_doc.metadata.organization != null && _doc.metadata.organization[0].toString().toLowerCase() != 'no group') { return _doc.metadata.organization[0]; } }"
                ]
            }
        },
        {
            "harvest": {
                "searchCycle_secs": -1
            }
        },
        {
            "docMetadata": {
                "title": "$metadata.subject",
                "description": "$metadata.summary",
                "publishedDate": "$metadata.incidentdate",
                "geotag": {
                    "city": "$SCRIPT( return _doc.metadata.location[0].citystateprovince.city; )",
                    "country": "$SCRIPT( return _doc.metadata.location[0].country; )",
                    "stateProvince": "$SCRIPT( return _doc.metadata.location[0].citystateprovince.stateprovince; )"
                }
            }
        },
        {
            "contentMetadata": [
                {
                    "fieldName": "organization",
                    "script": "believed the (.*?)(?: \\([^)]*\\))? (was|were) responsible",
                    "scriptlang": "regex"
                },
                {
                    "fieldName": "organization",
                    "script": "believed (.*?)(?: \\([^)]*\\))? (was|were) responsible",
                    "scriptlang": "regex"
                },
                {
                    "fieldName": "organization",
                    "script": ".  ([^.]*?)(?: \\([^)]*\\))? claimed responsibility\\.$",
                    "scriptlang": "regex"
                }
            ]
        },
        {
            "entities": [
                {
                    "creationCriteriaScript": "$FUNC( isOrganizationSpecified(); )",
                    "dimension": "Who",
                    "disambiguated_name": "$metadata.organization",
                    "type": "Organization",
                    "useDocGeo": false
                },
                {
                    "dimension": "Where",
                    "disambiguated_name": "$FUNC( getLocationEntity(); )",
                    "iterateOver": "location",
                    "type": "Location",
                    "useDocGeo": true
                },
                {
                    "dimension": "Who",
                    "disambiguated_name": "$characteristic from $nationality",
                    "iterateOver": "perpetrator",
                    "type": "PersonPerpetrator",
                    "useDocGeo": false
                },
                {
                    "dimension": "What",
                    "disambiguated_name": "",
                    "frequency": "1",
                    "iterateOver": "weapontype",
                    "type": "WeaponType",
                    "useDocGeo": false
                },
                {
                    "dimension": "What",
                    "disambiguated_name": "$FUNC( getEventType(); )",
                    "frequency": "1",
                    "iterateOver": "eventtype",
                    "type": "EventType",
                    "useDocGeo": false
                },
                {
                    "dimension": "What",
                    "disambiguated_name": "$SCRIPT( var s = (_iterator.indicator == 'Targeted') ? 'Targeted,': ''; s+= _iterator.facilitytype; return s; )",
                    "frequency": "$quantity",
                    "iterateOver": "facility",
                    "type": "FacilityType",
                    "useDocGeo": false
                },
                {
                    "dimension": "Who",
                    "disambiguated_name": "$FUNC( getVictim(); )",
                    "frequency": "$FUNC( getVictimCount(); )",
                    "type": "VictimType",
                    "useDocGeo": false,
                    "iterateOver": "victim"
                },
                {
                    "dimension": "Who",
                    "disambiguated_name": "$FUNC( getVictim(); )",
                    "frequency": "$hostagecount",
                    "type": "HostageType",
                    "useDocGeo": false,
                    "iterateOver": "victim"
                }
            ]
        },
        {
            "associations": [
                {
                    "creationCriteriaScript": "$FUNC( isOrganizationSpecified(); )",
                    "entity1": "$SCRIPT( return _doc.metadata.perpetrator[0].characteristic + ' from ' + _doc.metadata.perpetrator[0].nationality; )",
                    "entity2": "$FUNC( getOrganizationName(); )",
                    "verb": "member of",
                    "verb_category": "generic relations"
                },
                {
                    "creationCriteriaScript": "$FUNC( isOrganizationSpecified(); )",
                    "entity1": "Organization",
                    "entity2": "FacilityType",
                    "geo_index": "Location",
                    "iterateOver": "entity1/entity2/geo_index",
                    "time_start": "$SCRIPT( return _doc.metadata.incidentdate[0]; )",
                    "verb": "attacked",
                    "verb_category": "assault/attack"
                },
                {
                    "creationCriteriaScript": "$FUNC( isOrganizationSpecified(); )",
                    "entity1": "Organization",
                    "entity2": "VictimType",
                    "geo_index": "Location",
                    "iterateOver": "entity1/entity2/geo_index",
                    "time_start": "$SCRIPT( return _doc.metadata.incidentdate[0]; )",
                    "verb": "attacked",
                    "verb_category": "assault/attack"
                },
                {
                    "creationCriteriaScript": "$FUNC( isOrganizationSpecified(); )",
                    "entity1": "Organization",
                    "entity2": "HostageType",
                    "geo_index": "Location",
                    "iterateOver": "entity1/entity2/geo_index",
                    "time_start": "$SCRIPT( return _doc.metadata.incidentdate[0]; )",
                    "verb": "took hostage",
                    "verb_category": "assault/attack"
                },
                {
                    "creationCriteriaScript": "$SCRIPT( if (isOrganizationSpecified() == false) return true; )",
                    "entity1": "PersonPerpetrator",
                    "entity2": "FacilityType",
                    "geo_index": "Location",
                    "iterateOver": "entity1/entity2/geo_index",
                    "time_start": "$SCRIPT( return _doc.metadata.incidentdate[0]; )",
                    "verb": "attacked",
                    "verb_category": "assault/attack"
                },
                {
                    "creationCriteriaScript": "$SCRIPT( if (isOrganizationSpecified() == false) return true; )",
                    "entity1": "PersonPerpetrator",
                    "entity2": "VictimType",
                    "geo_index": "Location",
                    "iterateOver": "entity1/entity2/geo_index",
                    "time_start": "$SCRIPT( return _doc.metadata.incidentdate[0]; )",
                    "verb": "attacked",
                    "verb_category": "assault/attack"
                },
                {
                    "creationCriteriaScript": "$SCRIPT( if (isOrganizationSpecified() == false) return true; )",
                    "entity1": "PersonPerpetrator",
                    "entity2": "HostageType",
                    "geo_index": "Location",
                    "iterateOver": "entity1/entity2/geo_index",
                    "time_start": "$SCRIPT( return _doc.metadata.incidentdate[0]; )",
                    "verb": "took hostage",
                    "verb_category": "assault/attack"
                }
            ]
        }
    ]
}

Sample output

 {
    "associations": [],
    "communityId": ["506dc16dfbf042893dd6b8f2"],
    "created": "May 16, 2013 12:39:20 PM UTC",
    "description": "On 1 July 2009, in the morning, in Manugay, Konar, Afghanistan, assailants fired a rocket at a residence, killing two children, one civilian, wounding four civilians, and damaging the residence.  No group claimed responsibility.",
    "entities": [
        {
            "actual_name": "Manugay,Kunar,Afghanistan",
            "dimension": "Where",
            "disambiguated_name": "Manugay,Kunar,Afghanistan",
            "doccount": 0,
            "frequency": 1,
            "index": "manugay,kunar,afghanistan/location",
            "relevance": 0,
            "totalfrequency": -1,
            "type": "Location"
        },
        {
            "actual_name": "Targeted, Civilian, Adult from Afghanistan",
            "dimension": "Who",
            "disambiguated_name": "Targeted, Civilian, Adult from Afghanistan",
            "doccount": 0,
            "frequency": 5,
            "index": "targeted, civilian, adult from afghanistan/victimtype",
            "relevance": 0,
            "totalfrequency": -1,
            "type": "VictimType"
        },
        {
            "actual_name": "Targeted, Civilian, Child from Afghanistan",
            "dimension": "Who",
            "disambiguated_name": "Targeted, Civilian, Child from Afghanistan",
            "doccount": 0,
            "frequency": 2,
            "index": "targeted, civilian, child from afghanistan/victimtype",
            "relevance": 0,
            "totalfrequency": -1,
            "type": "VictimType"
        },
        {
            "actual_name": "Islamic Extremist (Sunni) from Unknown",
            "dimension": "Who",
            "disambiguated_name": "Islamic Extremist (Sunni) from Unknown",
            "doccount": 0,
            "frequency": 1,
            "index": "islamic extremist (sunni) from unknown/personperpetrator",
            "relevance": 0,
            "totalfrequency": -1,
            "type": "PersonPerpetrator"
        },
        {
            "actual_name": "Missile/Rocket",
            "dimension": "What",
            "disambiguated_name": "Missile/Rocket",
            "doccount": 0,
            "frequency": 1,
            "index": "missile/rocket/weapontype",
            "relevance": 0,
            "totalfrequency": -1,
            "type": "WeaponType"
        },
        {
            "actual_name": "Armed Attack",
            "dimension": "What",
            "disambiguated_name": "Armed Attack",
            "doccount": 0,
            "frequency": 1,
            "index": "armed attack/eventtype",
            "relevance": 0,
            "totalfrequency": -1,
            "type": "EventType"
        },
        {
            "actual_name": "Targeted,Residence",
            "dimension": "What",
            "disambiguated_name": "Targeted,Residence",
            "doccount": 0,
            "frequency": 1,
            "index": "targeted,residence/facilitytype",
            "relevance": 0,
            "totalfrequency": -1,
            "type": "FacilityType"
        }
    ],
    "mediaType": ["Report"],
    "metadata": {
        "approximatedate": ["No"],
        "assassination": ["No"],
        "eventtype": ["Armed Attack"],
        "facility": [{
            "combatant": "No",
            "damage": "Light",
            "definingcharacteristic": "Unknown",
            "facilitytype": "Residence",
            "indicator": "Targeted",
            "nationality": "Afghanistan",
            "quantity": "1",
            "targetedcharacteristic": "Unknown"
        }],
        "icn": ["200906281"],
        "ied": ["No"],
        "incidentdate": ["07/01/2009"],
        "location": [{
            "citystateprovince": {
                "city": "Manugay",
                "stateprovince": "Kunar"
            },
            "country": "Afghanistan",
            "region": "South Asia"
        }],
        "multipledays": ["No"],
        "organization": ["No group"],
        "perpetrator": [{
            "characteristic": "Islamic Extremist (Sunni)",
            "nationality": "Unknown"
        }],
        "subject": ["2 children, 1 civilian killed, 4 civilians wounded in rocket attack in Manugay, Konar, Afghanistan"],
        "suicide": ["No"],
        "summary": ["On 1 July 2009, in the morning, in Manugay, Konar, Afghanistan, assailants fired a rocket at a residence, killing two children, one civilian, wounding four civilians, and damaging the residence.  No group claimed responsibility."],
        "victim": [
            {
                "child": "No",
                "combatant": "No",
                "deadcount": "1",
                "definingcharacteristic": "Unknown",
                "hostagecount": "0",
                "indicator": "Targeted",
                "nationality": "Afghanistan",
                "targetedcharacteristic": "Unknown",
                "victimtype": "Civilian",
                "woundedcount": "4"
            },
            {
                "child": "Yes",
                "combatant": "No",
                "deadcount": "2",
                "definingcharacteristic": "Unknown",
                "hostagecount": "0",
                "indicator": "Targeted",
                "nationality": "Afghanistan",
                "targetedcharacteristic": "Unknown",
                "victimtype": "Civilian",
                "woundedcount": "0"
            }
        ],
        "weapontype": ["Missile/Rocket"]
    },
    "modified": "Jan 15, 2013 08:26:55 PM UTC",
    "publishedDate": "Jul 1, 2009 12:00:00 AM UTC",
    "source": ["wits test"],
    "sourceKey": ["modus.139.wits.test."],
    "sourceUrl": "smb://modus:139/wits/test/WITS_2009_07.xml",
    "tags": [
        "incidents",
        "nctc",
        "terrorism",
        "wits",
        "events",
        "worldwide"
    ],
    "title": "2 children, 1 civilian killed, 4 civilians wounded in rocket attack in Manugay, Konar, Afghanistan",
    "url": "https://wits.nctc.gov/FederalDiscoverWITS/index.do?N=0&Ntk=ICN&Ntx=mode%20match&Ntt=200906281"
}

Source - old format

 {
    "description": "wits test",
    "extractType": "File",
    "file": {
        "XmlIgnoreValues": [
            "DefiningCharacteristicList",
            "TargetedCharacteristicList",
            "WeaponTypeList",
            "PerpetratorList",
            "VictimList",
            "EventTypeList",
            "CityStateProvinceList",
            "FacilityList"
        ],
        "XmlPrimaryKey": "icn",
        "XmlRootLevelValues": [
            "Incident"
        ],
        "XmlSourceName": "https://wits.nctc.gov/FederalDiscoverWITS/index.do?N=0&Ntk=ICN&Ntx=mode%20match&Ntt=",
        "domain": "XXX",
        "password": "XXX",
        "username": "XXX"
    },
    "isPublic": true,
    "mediaType": "Report",
    "searchCycle_secs": -1,
    "structuredAnalysis": {
        "associations": [
            {
                "creationCriteriaScript": "$FUNC( isOrganizationSpecified(); )",
                "entity1": "$SCRIPT( return _doc.metadata.perpetrator[0].characteristic + ' from ' + _doc.metadata.perpetrator[0].nationality; )",
                "entity2": "$FUNC( getOrganizationName(); )",
                "verb": "member of",
                "verb_category": "generic relations"
            },
            {
                "creationCriteriaScript": "$FUNC( isOrganizationSpecified(); )",
                "entity1": "Organization",
                "entity2": "FacilityType",
                "geo_index": "Location",
                "iterateOver": "entity1/entity2/geo_index",
                "time_start": "$SCRIPT( return _doc.metadata.incidentdate[0]; )",
                "verb": "attacked",
                "verb_category": "assault/attack"
            },
            {
                "creationCriteriaScript": "$FUNC( isOrganizationSpecified(); )",
                "entity1": "Organization",
                "entity2": "VictimType",
                "geo_index": "Location",
                "iterateOver": "entity1/entity2/geo_index",
                "time_start": "$SCRIPT( return _doc.metadata.incidentdate[0]; )",
                "verb": "attacked",
                "verb_category": "assault/attack"
            },
            {
                "creationCriteriaScript": "$FUNC( isOrganizationSpecified(); )",
                "entity1": "Organization",
                "entity2": "HostageType",
                "geo_index": "Location",
                "iterateOver": "entity1/entity2/geo_index",
                "time_start": "$SCRIPT( return _doc.metadata.incidentdate[0]; )",
                "verb": "took hostage",
                "verb_category": "assault/attack"
            },
            {
                "creationCriteriaScript": "$SCRIPT( if (isOrganizationSpecified() == false) return true; )",
                "entity1": "PersonPerpetrator",
                "entity2": "FacilityType",
                "geo_index": "Location",
                "iterateOver": "entity1/entity2/geo_index",
                "time_start": "$SCRIPT( return _doc.metadata.incidentdate[0]; )",
                "verb": "attacked",
                "verb_category": "assault/attack"
            },
            {
                "creationCriteriaScript": "$SCRIPT( if (isOrganizationSpecified() == false) return true; )",
                "entity1": "PersonPerpetrator",
                "entity2": "VictimType",
                "geo_index": "Location",
                "iterateOver": "entity1/entity2/geo_index",
                "time_start": "$SCRIPT( return _doc.metadata.incidentdate[0]; )",
                "verb": "attacked",
                "verb_category": "assault/attack"
            },
            {
                "creationCriteriaScript": "$SCRIPT( if (isOrganizationSpecified() == false) return true; )",
                "entity1": "PersonPerpetrator",
                "entity2": "HostageType",
                "geo_index": "Location",
                "iterateOver": "entity1/entity2/geo_index",
                "time_start": "$SCRIPT( return _doc.metadata.incidentdate[0]; )",
                "verb": "took hostage",
                "verb_category": "assault/attack"
            }
        ],
        "description": "$metadata.summary",
        "docGeo": {
            "city": "$SCRIPT( return _doc.metadata.location[0].citystateprovince.city; )",
            "country": "$SCRIPT( return _doc.metadata.location[0].country; )",
            "stateProvince": "$SCRIPT( return _doc.metadata.location[0].citystateprovince.stateprovince; )"
        },
        "entities": [
            {
                "creationCriteriaScript": "$FUNC( isOrganizationSpecified(); )",
                "dimension": "Who",
                "disambiguated_name": "$metadata.organization",
                "type": "Organization",
                "useDocGeo": false
            },
            {
                "dimension": "Where",
                "disambiguated_name": "$FUNC( getLocationEntity(); )",
                "iterateOver": "location",
                "type": "Location",
                "useDocGeo": true
            },
            {
                "entities": [
                    {
                        "dimension": "Who",
                        "disambiguated_name": "$FUNC( getVictim(); )",
                        "frequency": "$FUNC( getVictimCount(); )",
                        "type": "VictimType",
                        "useDocGeo": false
                    },
                    {
                        "dimension": "Who",
                        "disambiguated_name": "$FUNC( getVictim(); )",
                        "frequency": "$hostagecount",
                        "type": "HostageType",
                        "useDocGeo": false
                    }
                ],
                "iterateOver": "victim",
                "useDocGeo": false
            },
            {
                "dimension": "Who",
                "disambiguated_name": "$characteristic from $nationality",
                "iterateOver": "perpetrator",
                "type": "PersonPerpetrator",
                "useDocGeo": false
            },
            {
                "dimension": "What",
                "disambiguated_name": "",
                "frequency": "1",
                "iterateOver": "weapontype",
                "type": "WeaponType",
                "useDocGeo": false
            },
            {
                "dimension": "What",
                "disambiguated_name": "$FUNC( getEventType(); )",
                "frequency": "1",
                "iterateOver": "eventtype",
                "type": "EventType",
                "useDocGeo": false
            },
            {
                "dimension": "What",
                "disambiguated_name": "$SCRIPT( var s = (_iterator.indicator == 'Targeted') ? 'Targeted,': ''; s+= _iterator.facilitytype; return s; )",
                "frequency": "$quantity",
                "iterateOver": "facility",
                "type": "FacilityType",
                "useDocGeo": false
            }
        ],
        "publishedDate": "$metadata.incidentdate",
        "script": "function getLocationEntity() { var s = (_iterator.citystateprovince.city != null) ? _iterator.citystateprovince.city : ''; s+= (s.length > 0) ? ',' : ''; s+= (_iterator.citystateprovince.stateprovince != null) ? _iterator.citystateprovince.stateprovince : ''; s+= (s.length > 0) ? ',' : ''; s+= (_iterator.country != null) ? _iterator.country : ''; return s; } function getVictim() { var indicator = (_iterator.indicator != 'Unknown') ? _iterator.indicator : ''; var victimType = (_iterator.victimtype != 'Unknown') ? _iterator.victimtype : ''; var child = (_iterator.child == 'Yes') ? 'Child' : 'Adult'; var combatant = (_iterator.combatant == 'Yes') ? 'Combatant' : ''; var targeted = (_iterator.targetedcharacteristic != 'None' && _iterator.targetedcharacteristic != 'Unknown') ? _iterator.targetedcharacteristic : ''; var defining = (_iterator.definingcharacteristic != 'None' &&_iterator.definingcharacteristic != 'Unknown') ? _iterator.definingcharacteristic : ''; var s = indicator; if (victimType.length > 0) { if (s.length > 0) { s += ', '; } s += victimType; } if (s.length > 0) { s += ', '; } s += child; if (combatant.length > 0) { if (s.length > 0) { s += ', '; } s += combatant; } if (targeted.length > 0) { if (s.length > 0) { s += ', '; } s += targeted; } if (defining.length > 0) { if (s.length > 0) { s += ', '; } s += defining; } if (s.length > 0) { s += ' from '; } s += _iterator.nationality; return s; } function getVictimCount() { var count = parseInt(_iterator.deadcount, 10) + parseInt(_iterator.woundedcount, 10); return count; } function getEventType() { var s = _value; if (_doc.metadata.assassination[0] == 'Yes') s += ', Assassination'; if (_doc.metadata.suicide[0] == 'Yes') s += ', Suicide'; if (_doc.metadata.ied[0] == 'Yes') s += ', IED'; return s; } function getEventTypeFull() { var s = _doc.metadata.eventtype[0]; if (_doc.metadata.assassination[0] == 'Yes') s += ', Assassination'; if (_doc.metadata.suicide[0] == 'Yes') s += ', Suicide'; if (_doc.metadata.ied[0] == 'Yes') s += ', IED'; return s;} function isOrganizationSpecified() {  if (_doc.metadata.organization != null && _doc.metadata.organization[0].toString().toLowerCase() == 'no group') { return false; } else { return true; } }function getOrganizationName() {  if (_doc.metadata.organization != null && _doc.metadata.organization[0].toString().toLowerCase() != 'no group') { return _doc.metadata.organization[0]; } }",
        "scriptEngine": "JavaScript",
        "title": "$metadata.subject"
    },
    "tags": [
        "incidents",
        "nctc",
        "terrorism",
        "wits",
        "events",
        "worldwide"
    ],
    "title": "wits test",
    "unstructuredAnalysis": {
        "meta": [
            {
                "context": "All",
                "fieldName": "organization",
                "groupNum": 1,
                "script": "believed the (.*?)(?: \\([^)]*\\))? (was|were) responsible",
                "scriptlang": "regex"
            },
            {
                "context": "All",
                "fieldName": "organization",
                "groupNum": 1,
                "script": "believed (.*?)(?: \\([^)]*\\))? (was|were) responsible",
                "scriptlang": "regex"
            },
            {
                "context": "All",
                "fieldName": "organization",
                "groupNum": 1,
                "script": ".  ([^.]*?)(?: \\([^)]*\\))? claimed responsibility\\.$",
                "scriptlang": "regex"
            }
        ]
    },
    "url": "smb://modus:139/wits/allfiles/",
    "useExtractor": "none"
}