text: /*
  
  Run this script on:
  
  	Profiles RNS Version 2.7.0
  
  to update its data to:
  
  	Profiles RNS Version 2.8.0
  
  *** You are recommended to back up your database before running this script!
  
  *** You should review each step of this script to ensure that it will not overwrite any customizations you have made to ProfilesRNS.
  
  *** Make sure you run the ProfilesRNS_Upgrade_Schema.sql file before running this file.
   
  */
  
  update [Ontology.].[PropertyGroupProperty] set  CustomDisplayModule =  '<Module ID="ApplyXSLT"><ParamList><Param Name="XSLTPath">~/profile/XSLT/Awards.xslt</Param></ParamList></Module>' where PropertyGroupURI= 'http://profiles.catalyst.harvard.edu/ontology/prns#PropertyGroupBiography' and  PropertyURI= 'http://vivoweb.org/ontology/core#awardOrHonor'
  
  update [Ontology.Presentation].[XML] set  PresentationXML =  '<Presentation PresentationClass="network">
    <PageOptions Columns="3" />
    <WindowName>{{{//rdf:RDF/rdf:Description[@rdf:about= ../rdf:Description[1]/rdf:subject/@rdf:resource]/foaf:firstName}}} {{{//rdf:RDF/rdf:Description[@rdf:about= /rdf:RDF[1]/rdf:Description[1]/rdf:subject/@rdf:resource]/foaf:lastName}}}''s research topics</WindowName>
    <PageColumns>3</PageColumns>
    <PageTitle>{{{//rdf:RDF/rdf:Description[@rdf:about= ../rdf:Description[1]/rdf:subject/@rdf:resource]/foaf:firstName}}} {{{//rdf:RDF/rdf:Description[@rdf:about= /rdf:RDF[1]/rdf:Description[1]/rdf:subject/@rdf:resource]/foaf:lastName}}}</PageTitle>
    <PageBackLinkName>Back to Profile</PageBackLinkName>
    <PageBackLinkURL>{{{//rdf:RDF/rdf:Description/rdf:subject/@rdf:resource}}}</PageBackLinkURL>
    <PageSubTitle>Concepts  ({{{//rdf:RDF/rdf:Description/prns:numberOfConnections}}})</PageSubTitle>
    <PageDescription>Concepts are derived automatically from a person''s publications.</PageDescription>
    <PanelTabType>Default</PanelTabType>
    <PanelList>
      <Panel Type="active">
        <Module ID="MiniSearch" />
        <Module ID="MainMenu" />
      </Panel>
      <Panel Type="main" TabSort="0" TabType="Default" Alias="cloud" Name="Cloud">
        <Module ID="NetworkList">
          <ParamList>
            <Param Name="Cloud">true</Param>
          </ParamList>
        </Module>
        <!--<Module ID="NetworkList">
          <ParamList>
            <Param Name="DataURI">rdf:RDF/rdf:Description[1]/@rdf:about</Param>
            <Param Name="InfoCaption">In this concept ''cloud'', the sizes of the concepts are based not only on the number of corresponding publications, but also how relevant the concepts are to the overall topics of the publications, how long ago the publications were written, whether the person was the first or senior author, and how many other people have written about the same topic. The largest concepts are those that are most unique to this person.</Param>
            <Param Name="BulletType" />
            <Param Name="Columns">2</Param>
            <Param Name="NetworkListNode">rdf:RDF/rdf:Description[@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasConnection/@rdf:resource]</Param>
            <Param Name="CloudWeightNode">prns:connectionWeight</Param>
            <Param Name="ItemURLText">{{{rdf:Description[1]/rdf:object/@rdf:resource}}}</Param>
            <Param Name="ItemText" />
            <Param Name="ItemURL">{{{rdf:Description[1]/rdf:object/@rdf:resource}}}</Param>
          </ParamList>
        </Module>-->
      </Panel>
      <Panel Type="main" TabSort="1" Alias="categories" Name="Categories">
        <Module ID="NetworkCategories">
          <ParamList>
            <Param Name="InfoCaption">Concepts listed here are grouped according to their ''semantic'' categories. Within each category, up to ten concepts are shown, in decreasing order of relevance.</Param>
            <Param Name="NetworkListNode">rdf:RDF/rdf:Description[@rdf:about= //rdf:RDF/rdf:Description/prns:hasConnection/@rdf:resource]</Param>
            <Param Name="CategoryPath">//prns:meshSemanticGroupName</Param>
            <Param Name="ItemText">{{{//rdf:Description/rdfs:label}}}</Param>
            <Param Name="ItemURL">{{{//rdf:Description/@rdf:about}}}</Param>
          </ParamList>
        </Module>
      </Panel>
      <Panel Type="main" TabSort="2" Alias="timeline" Name="Timeline">
        <Module ID="NetworkTimeline">
          <ParamList>
            <Param Name="TimelineType">Concept</Param>
            <Param Name="InfoCaption">The timeline below shows the dates (blue tick marks) of publications associated with @SubjectName''s top concepts. The average publication date for each concept is shown as a red circle, illustrating changes in the primary topics that @SubjectName has written about over time.</Param>
          </ParamList>
        </Module>
      </Panel>
      <Panel Type="main" TabSort="3" Alias="details" Name="Details">
        <Module ID="ApplyXSLT">
          <ParamList>
            <Param Name="DataURI">rdf:RDF/rdf:Description/@rdf:about</Param>
            <Param Name="XSLTPath">~/profile/XSLT/ConceptDetail.xslt</Param>
          </ParamList>
        </Module>
      </Panel>
      <Panel Type="passive">
        <Module ID="PassiveHeader" />
        <Module ID="PassiveList">
          <ParamList>
            <Param Name="DataURI">rdf:RDF/rdf:Description/rdf:subject/@rdf:resource</Param>
            <Param Name="ExpandRDFList">
              <ExpandRDF Class="http://xmlns.com/foaf/0.1/Person" Property="http://vivoweb.org/ontology/core#authorInAuthorship" Limit="1" />
            </Param>
            <Param Name="InfoCaption">Concepts</Param>
            <Param Name="Description">Derived automatically from this person''s publications.</Param>
            <Param Name="MaxDisplay">5</Param>
            <Param Name="ListNode">rdf:RDF/rdf:Description[@rdf:about= /rdf:RDF[1]/rdf:Description[1]/vivo:hasResearchArea/@rdf:resource]</Param>
            <Param Name="ItemURLText">{{{rdf:Description/rdfs:label}}}</Param>
            <Param Name="ItemText" />
            <Param Name="ItemURL">{{{rdf:Description/@rdf:about}}}</Param>
            <Param Name="MoreURL">{{{rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://vivoweb.org/ontology/core#hasResearchArea"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/@rdf:about}}}</Param>
            <Param Name="MoreText">See all ({{{rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://vivoweb.org/ontology/core#hasResearchArea"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/prns:numberOfConnections}}}) concept(s)</Param>
          </ParamList>
        </Module>
        <Module ID="PassiveList">
          <ParamList>
            <Param Name="DataURI">rdf:RDF/rdf:Description/rdf:subject/@rdf:resource</Param>
            <Param Name="ExpandRDFList">
              <ExpandRDF Class="http://xmlns.com/foaf/0.1/Person" Property="http://vivoweb.org/ontology/core#authorInAuthorship" Limit="1" />
            </Param>
            <Param Name="InfoCaption">Co-Authors</Param>
            <Param Name="MaxDisplay">5</Param>
            <Param Name="Description">People in Profiles who have published with this person.</Param>
            <Param Name="ListNode">rdf:RDF/rdf:Description[@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:coAuthorOf/@rdf:resource]</Param>
            <Param Name="ItemURLText">{{{rdf:Description/rdfs:label}}}</Param>
            <Param Name="ItemURL">{{{rdf:Description/@rdf:about}}}</Param>
            <Param Name="MoreURL">{{{rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://profiles.catalyst.harvard.edu/ontology/prns#coAuthorOf"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/@rdf:about}}}</Param>
            <Param Name="MoreText">See all ({{{rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://profiles.catalyst.harvard.edu/ontology/prns#coAuthorOf"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/prns:numberOfConnections}}}) people</Param>
          </ParamList>
        </Module>
        <Module ID="PassiveList">
          <ParamList>
            <Param Name="DataURI">rdf:RDF/rdf:Description/rdf:subject/@rdf:resource</Param>
            <Param Name="ExpandRDFList">
              <ExpandRDF Class="http://xmlns.com/foaf/0.1/Person" Property="http://vivoweb.org/ontology/core#authorInAuthorship" Limit="1" />
            </Param>
            <Param Name="InfoCaption">Similar People</Param>
            <Param Name="Description">People who share similar concepts with this person.</Param>
            <Param Name="MaxDisplay">11</Param>
            <Param Name="ListNode">rdf:RDF/rdf:Description[@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:similarTo/@rdf:resource]</Param>
            <Param Name="ItemURLText">{{{rdf:Description/rdfs:label}}}</Param>
            <Param Name="ItemText" />
            <Param Name="ItemURL">{{{rdf:Description/@rdf:about}}}</Param>
            <Param Name="MoreURL">{{{rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://profiles.catalyst.harvard.edu/ontology/prns#similarTo"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/@rdf:about}}}</Param>
            <Param Name="MoreText">See all ({{{rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://profiles.catalyst.harvard.edu/ontology/prns#similarTo"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/prns:numberOfConnections}}}) people</Param>
          </ParamList>
        </Module>
        <Module ID="CustomViewPersonSameDepartment" />
        <Module ID="PassiveList">
          <ParamList>
            <Param Name="DataURI">rdf:RDF/rdf:Description/rdf:subject/@rdf:resource</Param>
            <Param Name="ExpandRDFList">
              <ExpandRDF Class="http://xmlns.com/foaf/0.1/Person" Property="http://vivoweb.org/ontology/core#authorInAuthorship" Limit="1" />
            </Param>
            <Param Name="InfoCaption">Physical Neighbors</Param>
            <Param Name="Description">People whose addresses are nearby this person.</Param>
            <Param Name="MaxDisplay">11</Param>
            <Param Name="ListNode">rdf:RDF/rdf:Description[@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:physicalNeighborOf/@rdf:resource]</Param>
            <Param Name="ItemURLText">{{{rdf:Description/rdfs:label}}}</Param>
            <Param Name="ItemText" />
            <Param Name="ItemURL">{{{rdf:Description/@rdf:about}}}</Param>
          </ParamList>
        </Module>
      </Panel>
    </PanelList>
  </Presentation>'	  
  where Type= 'N' and  Subject= 'http://xmlns.com/foaf/0.1/Person' and  Predicate= 'http://vivoweb.org/ontology/core#hasResearchArea' and  Object is null
  
  
  update [Ontology.Presentation].[XML] set  PresentationXML =  '<Presentation PresentationClass="profile">
    <PageOptions Columns="3" />
    <WindowName>{{{rdf:RDF[1]/rdf:Description[1]/foaf:firstName[1]}}} {{{rdf:RDF[1]/rdf:Description[1]/foaf:lastName[1]}}}</WindowName>
    <PageColumns>3</PageColumns>
    <PageTitle>{{{rdf:RDF[1]/rdf:Description[1]/prns:fullName[1]}}}</PageTitle>
    <PageBackLinkName />
    <PageBackLinkURL />
    <PageSubTitle />
    <PageDescription />
    <PanelTabType>Fixed</PanelTabType>
    <PanelList>
      <Panel Type="active">
        <Module ID="MiniSearch" />
        <Module ID="MainMenu" />
      </Panel>
      <Panel Type="main" TabType="Fixed">
        <Module ID="CustomViewPersonGeneralInfo" />
        <Module ID="ApplyXSLT">
          <ParamList>
            <Param Name="XSLTPath">~/profile/XSLT/OtherPositions.xslt</Param>
          </ParamList>
        </Module>
        <Module ID="PropertyList">
          <ParamList />
        </Module>
        <Module ID="HRFooter" />
      </Panel>
      <Panel Type="passive">
        <Module ID="PassiveHeader">
          <ParamList>
            <Param Name="DisplayRule">rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://vivoweb.org/ontology/core#hasResearchArea"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/prns:numberOfConnections</Param>
            <Param Name="DisplayRule">rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://profiles.catalyst.harvard.edu/ontology/prns#coAuthorOf"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/prns:numberOfConnections</Param>
            <Param Name="DisplayRule">rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://profiles.catalyst.harvard.edu/ontology/prns#similarTo"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/prns:numberOfConnections</Param>
          </ParamList>
        </Module>
        <Module ID="PassiveList">
          <ParamList>
            <Param Name="InfoCaption">Concepts</Param>
            <Param Name="Description">Derived automatically from this person''s publications.</Param>
            <Param Name="MaxDisplay">5</Param>
            <Param Name="ListNode">rdf:RDF/rdf:Description[@rdf:about= /rdf:RDF[1]/rdf:Description[1]/vivo:hasResearchArea/@rdf:resource]</Param>
            <Param Name="ItemURLText">{{{rdf:Description/rdfs:label}}}</Param>
            <Param Name="ItemText" />
            <Param Name="ItemURL">{{{rdf:Description/@rdf:about}}}</Param>
            <Param Name="MoreURL">{{{rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://vivoweb.org/ontology/core#hasResearchArea"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/@rdf:about}}}</Param>
            <Param Name="MoreText">See all ({{{rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://vivoweb.org/ontology/core#hasResearchArea"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/prns:numberOfConnections}}}) concept(s)</Param>
          </ParamList>
        </Module>
        <Module ID="PassiveList">
          <ParamList>
            <Param Name="InfoCaption">Co-Authors</Param>
            <Param Name="MaxDisplay">5</Param>
            <Param Name="Description">People in Profiles who have published with this person.</Param>
            <Param Name="ListNode">rdf:RDF/rdf:Description[@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:coAuthorOf/@rdf:resource]</Param>
            <Param Name="ItemURLText">{{{rdf:Description/rdfs:label}}}</Param>
            <Param Name="ItemURL">{{{rdf:Description/@rdf:about}}}</Param>
            <Param Name="MoreURL">{{{rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://profiles.catalyst.harvard.edu/ontology/prns#coAuthorOf"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/@rdf:about}}}</Param>
            <Param Name="MoreText">See all ({{{rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://profiles.catalyst.harvard.edu/ontology/prns#coAuthorOf"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/prns:numberOfConnections}}}) people</Param>
          </ParamList>
        </Module>
        <Module ID="PassiveList">
          <ParamList>
            <Param Name="InfoCaption">Similar People</Param>
            <Param Name="Description">People who share similar concepts with this person.</Param>
            <Param Name="MaxDisplay">11</Param>
            <Param Name="ListNode">rdf:RDF/rdf:Description[@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:similarTo/@rdf:resource]</Param>
            <Param Name="ItemURLText">{{{rdf:Description/rdfs:label}}}</Param>
            <Param Name="ItemText" />
            <Param Name="ItemURL">{{{rdf:Description/@rdf:about}}}</Param>
            <Param Name="MoreURL">{{{rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://profiles.catalyst.harvard.edu/ontology/prns#similarTo"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/@rdf:about}}}</Param>
            <Param Name="MoreText">See all ({{{rdf:RDF/rdf:Description[rdf:predicate/@rdf:resource="http://profiles.catalyst.harvard.edu/ontology/prns#similarTo"][@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:hasNetwork/@rdf:resource]/prns:numberOfConnections}}}) people</Param>
          </ParamList>
        </Module>
        <Module ID="CustomViewPersonSameDepartment" />
        <Module ID="Gadgets">
          <ParamList>
            <Param Name="HTML">
              <div id="gadgets-tools" class="gadgets-gadget-parent" />
            </Param>
          </ParamList>
        </Module>
        <Module ID="PassiveList">
          <ParamList>
            <Param Name="InfoCaption">Physical Neighbors</Param>
            <Param Name="Description">People whose addresses are nearby this person.</Param>
            <Param Name="MaxDisplay">11</Param>
            <Param Name="ListNode">rdf:RDF/rdf:Description[@rdf:about= /rdf:RDF[1]/rdf:Description[1]/prns:physicalNeighborOf/@rdf:resource]</Param>
            <Param Name="ItemURLText">{{{rdf:Description/rdfs:label}}}</Param>
            <Param Name="ItemText" />
            <Param Name="ItemURL">{{{rdf:Description/@rdf:about}}}</Param>
          </ParamList>
        </Module>
      </Panel>
    </PanelList>
    <ExpandRDFList>
      <ExpandRDF Class="http://xmlns.com/foaf/0.1/Person" Property="http://vivoweb.org/ontology/core#authorInAuthorship" Limit="1" />
    </ExpandRDFList>
  </Presentation>' 
  where Type= 'P' and  Subject= 'http://xmlns.com/foaf/0.1/Person' and  Predicate is null and  Object is null
  
  
  update [Ontology.Presentation].[XML] set  PresentationXML =  '<Presentation PresentationClass="profile">
    <PageOptions Columns="3" />
    <WindowName>{{{rdf:RDF[1]/rdf:Description[1]/rdfs:label[1]}}}</WindowName>
    <PageColumns>3</PageColumns>
    <PageTitle>{{{rdf:RDF[1]/rdf:Description[1]/rdfs:label[1]}}}</PageTitle>
    <PageBackLinkName />
    <PageBackLinkURL />
    <PageSubTitle />
    <PageDescription />
    <PanelTabType>Fixed</PanelTabType>
    <PanelList>
      <Panel Type="active">
        <Module ID="MiniSearch" />
        <Module ID="MainMenu" />
      </Panel>
      <Panel Type="main" TabSort="0" TabType="Default">
        <Module ID="CustomViewConceptMeshInfo">
          <ParamList />
        </Module>
      </Panel>
      <Panel Type="main" TabSort="0" TabType="Default">
        <Module ID="CustomViewConceptPublication">
          <ParamList>
            <Param Name="TimelineCaption">This graph shows the total number of publications written about "@ConceptName" by people in this website by year, and whether "@ConceptName" was a major or minor topic of these publications. &lt;!--In all years combined, a total of [[[TODO:PUBLICATION COUNT]]] publications were written by people in Profiles.--&gt;</Param>
            <Param Name="CitedCaption">Below are the publications written about "@ConceptName" that have been cited the most by articles in Pubmed Central.</Param>
            <Param Name="NewestCaption">Below are the most recent publications written about "@ConceptName" by people in Profiles.</Param>
            <Param Name="OldestCaption">Below are the earliest publications written about "@ConceptName" by people in Profiles.</Param>
          </ParamList>
        </Module>
      </Panel>
      <Panel Type="passive">
        <Module ID="PassiveList">
          <ParamList>
            <Param Name="InfoCaption">People</Param>
            <Param Name="Description">People who have written about this concept.</Param>
            <Param Name="MaxDisplay">5</Param>
            <Param Name="ListNode">rdf:RDF/rdf:Description[@rdf:about= /rdf:RDF[1]/rdf:Description[1]/vivo:researchAreaOf/@rdf:resource]</Param>
            <Param Name="ItemURLText">{{{rdf:Description/rdfs:label}}}</Param>
            <Param Name="ItemText" />
            <Param Name="ItemURL">{{{rdf:Description/@rdf:about}}}</Param>
            <Param Name="MoreURL">/search/default.aspx?searchtype=people&amp;searchfor={{{rdf:RDF/rdf:Description/rdfs:label}}}&amp;classuri=http://xmlns.com/foaf/0.1/Person&amp;erpage=15&amp;offset=0&amp;exactPhrase=true</Param>
            <Param Name="MoreText">See all people</Param>
          </ParamList>
        </Module>
        <Module ID="CustomViewConceptSimilarMesh">
          <ParamList>
            <Param Name="InfoCaption">Similar Concepts</Param>
            <Param Name="Description">People who have written about this concept.</Param>
          </ParamList>
        </Module>
        <Module ID="CustomViewConceptTopJournal">
          <ParamList>
            <Param Name="InfoCaption">Top Journals</Param>
            <Param Name="Description">Top journals in which articles about this concept have been published.</Param>
          </ParamList>
        </Module>
      </Panel>
    </PanelList>
  </Presentation>' 
  where Type= 'P' and  Subject= 'http://www.w3.org/2004/02/skos/core#Concept' and  Predicate is null and  Object is null
  		 
  --*****************************************************************************************
  --*****************************************************************************************
  --*****************************************************************************************
  --*****
  --***** Finalize changes
  --*****
  --*****************************************************************************************
  --*****************************************************************************************
  --*****************************************************************************************
    
  -- The next two rows update fields such as nodeID values, and table identifiers. This should not affect any existing customizations
  EXEC [Ontology.].[UpdateDerivedFields]
  EXEC [Ontology.].[UpdateCounts]
  EXEC [Ontology.].CleanUp @action='UpdateIDs'
  
  -- Update the RDF tables and cache
  EXEC [Framework.].[RunJobGroup] @JobGroup = 3
  
  
  GO