<commit_before>
	import fedreg.core.*

	/*
	 Initial attribute definition and population for Federation Registry
	*/
	
	def coreCategory = new AttributeCategory(name:'Core')
	coreCategory.save()
	def optionalCategory = new AttributeCategory(name:'Optional')
	optionalCategory.save()
	
	def attrUri = SamlURI.findWhere(uri:'urn:oasis:names:tc:SAML:2.0:attrname-format:uri')
	
	def o = new AttributeBase(oid:'172.16.31.10', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:o' , friendlyName:'Organization Name' , alias:'organizationName', description:'Standard name of the top-level organization (institution) with which the user is associated.', category:coreCategory, specificationRequired:false).save()
	def ou =  new AttributeBase(oid:'192.168.3.11', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:ou', friendlyName:'Organizational Unit', alias:'ou', description:'OrganizationalUnit currently used for faculty membership of staff', category:optionalCategory, specificationRequired:false).save()
	def postalAddress =  new AttributeBase(oid:'2.5.4.16', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:postalAddress', friendlyName:'Business postal address', alias:'postalAddress', description:'Business postal address: Campus or office address', category:optionalCategory, specificationRequired:false).save()
	
	def auEduPersonSharedToken =  new AttributeBase(oid:'1.3.6.1.4.1.27856.1.2.5', nameFormat: attrUri, name:'urn:oid:1.3.6.1.4.1.27856.1.2.5', friendlyName:'Shared Token', alias:'auEduPersonSharedToken', description:'A unique identifier enabling federation spanning services such as Grid and Repositories', category:coreCategory, specificationRequired:false).save()
	def auEduPersonAffiliation =  new AttributeBase(oid:'1.3.6.1.4.1.27856.1.2.1', nameFormat: attrUri, name:'urn:oid:1.3.6.1.4.1.27856.1.2.1', friendlyName:'AU Affiliation', alias:'auEduPersonAffiliation', description:'Specifies a persons relationship to the institution in broad categories but with a finer-grained set of permissible values than eduPersonAffiliation.', category:optionalCategory, specificationRequired:false).save()
	def auEduPersonLegalName =  new AttributeBase(oid:'1.3.6.1.4.1.27856.1.2.2', nameFormat: attrUri, name:'urn:oid:1.3.6.1.4.1.27856.1.2.2', friendlyName:'Legal Name', alias:'auEduPersonLegalName', description:'The users legal name, as per their passport, birth certificate, or other legal document', category:optionalCategory, specificationRequired:false).save()
	
	def eduPersonTargetedID =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.10', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonTargetedID', friendlyName:'Targeted ID', alias:'eduPersonTargetedID', description:'A persistent, non-reassigned, privacy-preserving identifier for a principal shared between a pair of coordinating entities', category:coreCategory, specificationRequired:false).save()
	def eduPersonAffiliation =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.1', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonAffiliation', friendlyName:'Affiliation', alias:'eduPersonAffiliation', description:'Specifies the persons relationship(s) to the institution in broad categories such as student, faculty, staff, alum, etc.', category:coreCategory, specificationRequired:false).save()
	def eduPersonEntitlement =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.7', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonEntitlement', friendlyName:'Entitlement', alias:'entitlement', description:'Member of: URI (either URL or URN) that indicates a set of rights to specific resources based on an agreement across the releavant community', category:coreCategory, specificationRequired:true).save()
	def eduPersonPrincipalName =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.6', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonPrincipalName', friendlyName:'Principal Name', alias:'principalName', description:'eduPerson per Internet2 and EDUCAUSE', category:optionalCategory, specificationRequired:false).save()
	def eduPersonAssurance =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.11', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonAssurance', friendlyName:'Assurance Level', alias:'eduPersonAssurance', description:'This attribute represents identity assurance profiles (IAPs), which are the set of standards that are met by an identity assertion, based on the Identity Providers identity management processes, type of auth credential used, binding strength,  etc.', category:coreCategory, specificationRequired:false).save()
	def eduPersonScopedAffiliation =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.9', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonScopedAffiliation', friendlyName:'eduPersonScopedAffiliation', alias:'eduPersonScopedAffiliation', description:'This attribute enables an organisation to assert its relationship with the user.', category:coreCategory, specificationRequired:false).save()
	def eduPersonPrimaryAffiliation =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.5', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonPrimaryAffiliation', friendlyName:'Primary Affiliation', alias:'eduPersonPrimaryAffiliation', description:'Specifies the persons PRIMARY relationship to the institution in broad categories such as student, faculty, staff, alum, etc.', category:optionalCategory, specificationRequired:false).save()
	
	def cn =  new AttributeBase(oid:'2.5.4.3', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:cn', friendlyName:'cn', alias:'cn', description:'An individuals common name, typically their full name. This attribute should not be used in transactions where it is desirable to maintain user anonymity.', category:coreCategory, specificationRequired:false).save()
	def sn =  new AttributeBase(oid:'2.5.4.4', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:sn', friendlyName:'Surname', alias:'surname', description:'Surname or family name', category:optionalCategory, specificationRequired:false).save()
	def givenName =  new AttributeBase(oid:'2.5.4.42', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:givenName', friendlyName:'Given name', alias:'givenName', description:'Given name of a person', category:optionalCategory, specificationRequired:false).save()
	def displayName =  new AttributeBase(oid:'2.16.840.1.113730.3.1.241', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:displayName', friendlyName:'Display Name', alias:'displayName', description:'Preferred name of a person to be used when displaying entries. This attribute should not be used in transactions where it is desirable to maintain user anonymity.', category:coreCategory, specificationRequired:false).save()
	
	def mail =  new AttributeBase(oid:'0.9.2342.19200300.100.1.3', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:mail', friendlyName:'Email', alias:'mail', description:'E-Mail: Preferred address for e-mail to be sent to this person', category:coreCategory, specificationRequired:false).save()
	def telephoneNumber =  new AttributeBase(oid:'2.5.4.20', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:telephoneNumber', friendlyName:'Business phone number', alias:'telephoneNumber', description:'Office or campus phone number of the individual', category:optionalCategory, specificationRequired:false).save()
	def mobile =  new AttributeBase(oid:'0.9.2342.19200300.100.1.41', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:mobile', friendlyName:'Mobile phone number', alias:'mobile', description:'Mobile phone number', category:optionalCategory, specificationRequired:false).save()
	def topLevelOrg =  new AttributeBase(oid:'2.5.4.10', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:TopLevelOrg', friendlyName:'Top-level Organisation', alias:'topLevelOrg', description:'Standard name of the top-level organization (institution) with which this person is associated.', category:optionalCategory, specificationRequired:false).save()
	
	def homeOrganization =  new AttributeBase(oid:'1.3.6.1.4.1.25178.1.2.9', nameFormat: attrUri, name:'urn:oid:1.3.6.1.4.1.25178.1.2.9', friendlyName:'Home Organization', alias:'homeOrganization', description:'Users Home Organization', category:optionalCategory, specificationRequired:false).save()
	def homeOrganizationType =  new AttributeBase(oid:'1.3.6.1.4.1.25178.1.2.10', nameFormat: attrUri, name:'urn:oid:1.3.6.1.4.1.25178.1.2.10', friendlyName:'Home Organization Type', alias:'homeOrganizationType', description:'Type of Organization the user belongs too', category:optionalCategory, specificationRequired:false).save()
	<commit_msg>Bought script into line with Shib IDP 2.2 naming and dropped topLevelOrg<commit_after>
	import fedreg.core.*

	/*
	 Initial attribute definition and population for Federation Registry
	*/
	
	def coreCategory = new AttributeCategory(name:'Core')
	coreCategory.save()
	def optionalCategory = new AttributeCategory(name:'Optional')
	optionalCategory.save()
	
	def attrUri = SamlURI.findWhere(uri:'urn:oasis:names:tc:SAML:2.0:attrname-format:uri')
	
	def o = new AttributeBase(oid:'2.5.4.10', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:o' , friendlyName:'Organization Name' , alias:'organizationName', description:'Standard name of the top-level organization (institution) with which the user is associated.', category:coreCategory, specificationRequired:false).save()
	def ou =  new AttributeBase(oid:'2.5.4.11', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:ou', friendlyName:'Organizational Unit', alias:'organizationalUnit', description:'Organizational Unit currently used for faculty membership of staff', category:optionalCategory, specificationRequired:false).save()
	def postalAddress =  new AttributeBase(oid:'2.5.4.16', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:postalAddress', friendlyName:'Business postal address', alias:'postalAddress', description:'Business postal address: Campus or office address', category:optionalCategory, specificationRequired:false).save()
	
	def auEduPersonSharedToken =  new AttributeBase(oid:'1.3.6.1.4.1.27856.1.2.5', nameFormat: attrUri, name:'urn:oid:1.3.6.1.4.1.27856.1.2.5', friendlyName:'Shared Token', alias:'auEduPersonSharedToken', description:'A unique identifier enabling federation spanning services such as Grid and Repositories', category:coreCategory, specificationRequired:false).save()
	def auEduPersonAffiliation =  new AttributeBase(oid:'1.3.6.1.4.1.27856.1.2.1', nameFormat: attrUri, name:'urn:oid:1.3.6.1.4.1.27856.1.2.1', friendlyName:'AU Affiliation', alias:'auEduPersonAffiliation', description:'Specifies a persons relationship to the institution in broad categories but with a finer-grained set of permissible values than eduPersonAffiliation.', category:optionalCategory, specificationRequired:false).save()
	def auEduPersonLegalName =  new AttributeBase(oid:'1.3.6.1.4.1.27856.1.2.2', nameFormat: attrUri, name:'urn:oid:1.3.6.1.4.1.27856.1.2.2', friendlyName:'Legal Name', alias:'auEduPersonLegalName', description:'The users legal name, as per their passport, birth certificate, or other legal document', category:optionalCategory, specificationRequired:false).save()
	
	def eduPersonTargetedID =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.10', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonTargetedID', friendlyName:'Targeted ID', alias:'eduPersonTargetedID', description:'A persistent, non-reassigned, privacy-preserving identifier for a principal shared between a pair of coordinating entities', category:coreCategory, specificationRequired:false).save()
	def eduPersonAffiliation =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.1', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonAffiliation', friendlyName:'Affiliation', alias:'eduPersonAffiliation', description:'Specifies the persons relationship(s) to the institution in broad categories such as student, faculty, staff, alum, etc.', category:coreCategory, specificationRequired:false).save()
	def eduPersonEntitlement =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.7', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonEntitlement', friendlyName:'Entitlement', alias:'eduPersonEntitlement', description:'Member of: URI (either URL or URN) that indicates a set of rights to specific resources based on an agreement across the releavant community', category:coreCategory, specificationRequired:true).save()
	def eduPersonPrincipalName =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.6', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonPrincipalName', friendlyName:'Principal Name', alias:'eduPersonPrincipalName', description:'eduPerson per Internet2 and EDUCAUSE', category:optionalCategory, specificationRequired:false).save()
	def eduPersonAssurance =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.11', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonAssurance', friendlyName:'Assurance Level', alias:'eduPersonAssurance', description:'This attribute represents identity assurance profiles (IAPs), which are the set of standards that are met by an identity assertion, based on the Identity Providers identity management processes, type of auth credential used, binding strength,  etc.', category:coreCategory, specificationRequired:false).save()
	def eduPersonScopedAffiliation =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.9', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonScopedAffiliation', friendlyName:'eduPersonScopedAffiliation', alias:'eduPersonScopedAffiliation', description:'This attribute enables an organisation to assert its relationship with the user.', category:coreCategory, specificationRequired:false).save()
	def eduPersonPrimaryAffiliation =  new AttributeBase(oid:'1.3.6.1.4.1.5923.1.1.1.5', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:eduPersonPrimaryAffiliation', friendlyName:'Primary Affiliation', alias:'eduPersonPrimaryAffiliation', description:'Specifies the persons PRIMARY relationship to the institution in broad categories such as student, faculty, staff, alum, etc.', category:optionalCategory, specificationRequired:false).save()
	
	def cn =  new AttributeBase(oid:'2.5.4.3', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:cn', friendlyName:'Common Name', alias:'commonName', description:'An individuals common name, typically their full name. This attribute should not be used in transactions where it is desirable to maintain user anonymity.', category:coreCategory, specificationRequired:false).save()
	def sn =  new AttributeBase(oid:'2.5.4.4', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:sn', friendlyName:'Surname', alias:'surname', description:'Surname or family name', category:optionalCategory, specificationRequired:false).save()
	def givenName =  new AttributeBase(oid:'2.5.4.42', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:givenName', friendlyName:'Given name', alias:'givenName', description:'Given name of a person', category:optionalCategory, specificationRequired:false).save()
	def displayName =  new AttributeBase(oid:'2.16.840.1.113730.3.1.241', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:displayName', friendlyName:'Display Name', alias:'displayName', description:'Preferred name of a person to be used when displaying entries. This attribute should not be used in transactions where it is desirable to maintain user anonymity.', category:coreCategory, specificationRequired:false).save()
	
	def mail =  new AttributeBase(oid:'0.9.2342.19200300.100.1.3', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:mail', friendlyName:'Email', alias:'email', description:'Preferred address for e-mail to be sent to this person', category:coreCategory, specificationRequired:false).save()
	def telephoneNumber =  new AttributeBase(oid:'2.5.4.20', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:telephoneNumber', friendlyName:'Business phone number', alias:'telephoneNumber', description:'Office or campus phone number of the individual', category:optionalCategory, specificationRequired:false).save()
	def mobile =  new AttributeBase(oid:'0.9.2342.19200300.100.1.41', nameFormat: attrUri, name:'urn:mace:dir:attribute-def:mobile', friendlyName:'Mobile phone number', alias:'mobileNumber', description:'Mobile phone number', category:optionalCategory, specificationRequired:false).save()

	def homeOrganization =  new AttributeBase(oid:'1.3.6.1.4.1.25178.1.2.9', nameFormat: attrUri, name:'urn:oid:1.3.6.1.4.1.25178.1.2.9', friendlyName:'Home Organization', alias:'homeOrganization', description:'Users Home Organization', category:optionalCategory, specificationRequired:false).save()
	def homeOrganizationType =  new AttributeBase(oid:'1.3.6.1.4.1.25178.1.2.10', nameFormat: attrUri, name:'urn:oid:1.3.6.1.4.1.25178.1.2.10', friendlyName:'Home Organization Type', alias:'homeOrganizationType', description:'Type of Organization the user belongs too', category:optionalCategory, specificationRequired:false).save()
	
{'fraction_non_alphanumeric': 0.12791585874610728, 'fraction_numerical': 0.04024913332158176, 'mean_word_length': 7.791322314049586, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 89, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6636168', 'n_tokens_mistral': 5165, 'n_tokens_neox': 4820, 'n_words': 1195}