insert into ROLE values ('SuperUser', 'Super User');
insert into ROLE values ('CatalogUser', 'Catalog User');
insert into ROLE values ('StandardUser', 'Standard User');
insert into ROLE values ('AnonymousUser', 'Anon User');

insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID) 
values ( 1, 2, 'Knowledge Integration Ltd', 'S1 2NS', 'Commercial',null);
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID) 
values ( 2, 2, 'Sheffield University', 'S1', 'Academic',null);
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID) 
values ( 3, 2, 'Barsley', 'S1', 'Council',null);
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID) 
values ( 4, 2, 'Doncaster', 'S1', 'Academic',null);
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID) 
values ( 5, 2, 'Sheffield', 'S1', 'Academic',null);
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID) 
values ( 6, 2, 'Rotherham', 'S1', 'Academic',null);

insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1001, 1, 'Ian Ibbotson', 'S11 7GD', null, 1, 1 );
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1002, 1, 'Neil Smith', 'NG2 7BL', null, 1, 1 );
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1003, 1, 'Rob Tice', 'XXX XX', null, 1, 1 );
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1004, 1, 'Liz Pearce', null, null, 2, 1 );
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1005, 1, 'kiadmin', null, null,1, 1 );
-- Barsnley catalog users
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1006, 1, 'John Coldwell', null, null, 3, 1 );
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1007, 1, 'Janet Telfer', null, null, 3, 1 );
-- Doncaster catalog users
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1008, 1, 'Mary Camm', null, null, 4, 1 );
-- Sheffield catalog users
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1009, 1, 'Shamim Hassen', null, null, 5, 1 );
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1010, 1, 'Sandra Hallatt', null, null, 5, 1 );
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1011, 1, 'Karen Wallace', null, null, 5, 1 );
-- Rotherham Catalog Users
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1012, 1, 'Anne Burrows', null, null, 6, 1 );
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1013, 1, 'Sue Gilbert', null, null, 6, 1 );
insert into PARTY(ID,PARTY_TYPE,NAME,POSTCODE,ORG_TYPE,PRIMARY_ORG_ID,ACCOUNT_ACTIVE_FLAG) 
values ( 1014, 1, 'Angella Parker', null, null, 6, 1 );




insert into ROLE_GRANT_PARTY(ID,USERNAME,ROLE) values (1,   'ibbo',   'SuperUser');
insert into ROLE_GRANT_PARTY(ID,USERNAME,ROLE) values (2,   'ibbo',   'CatalogUser');

insert into AUTHORITY values ( 1, 'System', 'Internal Categories (Document Type, etc)' );
insert into AUTHORITY values ( 100, 'ITForMe-Category', 'IT 4 Me Category List');

-- Set up some internal categories.

insert into CATEGORY(AUTHORITY_ID,AUTHORITY_CODE,NAME,DESCRIPTION) VALUES ( 1, 'TOP-LEVEL-TERM', 'Top Level Term', 'Category is a browse entry point' );

-- Set up our default collections
insert into COLLECTION (ID,NAME) values ( 1, 'Default' );
insert into COLLECTION (ID,NAME) values ( 2, 'IT4Me' );

-- Set up default agent subscriptions.
-- insert into OAI_COLLECTION(ID,NAME,DESCRIPTION) VALUES ( 1, 'Default', 'The Default Collection');
-- insert into OAI_COLLECTION(ID,NAME,DESCRIPTION) VALUES ( 2, 'IT4Me', 'IT For Me Default Collection');

-- Set up an internal channel pointing at the IT4Me OAI collection
-- An "Internal" channel relates to a local OAI collection, and names the OAI Colleciton we are presenting
insert into CHANNEL ( ID, CHANNEL_TYPE, CHANNEL_NAME, CHANNEL_ID ) VALUES ( 1, 1, 'IT4Me', 'IT4Me');

-- Subscribe the IT4Me System agent to the new internal channel.
insert into AGENT ( ID, AGENT_NAME, DATE_LAST_RUN ) VALUES ( 1, "IT For Me Default Agent", NULL );
insert into SUBSCRIPTION ( ID,CHANNEL_ID,RESUMPTION_TOKEN ) VALUES ( 1, 1, NULL );
insert into AGENT_SUBSCRIPTION_LINK(AGENT_ID,SUBSCIPTION_ID,AGENT_INDEX) VALUES ( 1, 1, 0);

insert into PROPERTY_SET_HEADER(ID,PROPSET_NAME) VALUES (1,'Core System Properties');
insert into PROPERTY_SET(PROP_SET_ID,PROP_NAME,PROP_VALUE) VALUES (1,'ia.core.EditorReview','true');

insert into PROPERTY_SET_HEADER(ID,PROPSET_NAME) VALUES (2,'Default Webapp Properties');
insert into PROPERTY_SET(PROP_SET_ID,PROP_NAME,PROP_VALUE) VALUES (2,'ia.web.DefaultSkinCSS','');
insert into PROPERTY_SET(PROP_SET_ID,PROP_NAME,PROP_VALUE) VALUES (2,'ia.web.home_tile','ia.it4me_welcome');
