Source:
|
<%=Rptaxon("Refcache")%>
|
Name:
|
<%=NameA(6)%>
|
<% if len(NameA(2)) > 0 then %>
Nomencl. ref.: |
<%=NameA(2)%> |
<%end if %>
<% if len(NameA(3)) > 0 then %>
Nomencl. status(es) |
<% = NameA(3)%> |
<%end if %>
<%
' Search if the name has HOMONYMS and print them
'------------------------------------------------------------------------------------------
SQL= _
" SELECT NameFk1 " & _
" FROM RelName " & _
" WHERE NameFk2=" & Rptaxon("PTNameFk") &" AND RelNameQualifierFk = 2"
set Rhom = Server.CreateObject("ADODB.Recordset")
openRecordset Rhom, SQL
if Rhom.Recordcount > 0 then
'If it has homonyms show them, take the details.
SQL= _
" SELECT Name.NameId, Name.NameCache, Name.FullNameCache, Reference.RefYear " & _
" FROM Name LEFT JOIN Reference ON Name.NomRefFk = Reference.RefId "& _
" WHERE (Name.NameId = "& Rhom("NameFk1") &")"
set Rhom_details = Server.CreateObject("ADODB.Recordset")
openRecordset Rhom_details, SQL
While Not Rhom_details.EOF
non_part= Rhom_details("FullNameCache")
if Rhom_details("RefYear")<>"" then
non_part=non_part & " (" & Rhom_details("RefYear") & ")"
end if
%>
Homonyms |
<%=non_part%> |
<%
Rhom_details.MoveNext
Wend
Rhom_details.close()
set Rhom_details = Nothing
End if
Rhom.close
set Rhom = Nothing
'---------------- Rank -------------------------------------------------------------------
%>
Rank: |
<%=Rptaxon("Rank")%> |
<%
' ---------------------------- BASIONYM ------------------------------------------------------------
'Look to see if it's a basyonym of something and print it. BASYONYM OF
SQL=" SELECT dbo.Name.NameId, Name_1.NameId AS NameIdBas, Name_1.FullNameCache " & _
" FROM dbo.Name Name_1 INNER JOIN Name INNER JOIN RelName ON Name.NameId = RelName.NameFk1 ON Name_1.NameId = RelName.NameFk2 " & _
" WHERE (((Name.NameId)="&Rptaxon("PTNameFk")&") AND ((RelName.RelNameQualifierFk)=1))"
Set Rbas = Server.CreateObject("ADODB.Recordset")
openRecordset Rbas, SQL
if Rbas.RecordCount > 0 then
%>
Is basionym for: |
">
<%=Rbas("FullNameCache")%> |
<%
end if
Rbas.close
set Rbas=Nothing
%>
<%
' ---------------------------- Syn. Subst. ------------------------------------------------------------
'Look to see if it's a replaced Synonym of something and print it. REPLACED SYNONYM OF
SQL=" SELECT dbo.Name.NameId, Name_1.NameId AS NameIdBas, Name_1.FullNameCache " & _
" FROM dbo.Name Name_1 INNER JOIN Name INNER JOIN RelName ON Name.NameId = RelName.NameFk1 ON Name_1.NameId = RelName.NameFk2 " & _
" WHERE (((Name.NameId)=" & Rptaxon("PTNameFk") & ") AND ((RelName.RelNameQualifierFk)=3))"
Set RSubst = Server.CreateObject("ADODB.Recordset")
openRecordset RSubst, SQL
if RSubst.RecordCount > 0 then
%>
Is replaced synonym for: |
">
<%=RSubst("FullNameCache")%> |
<%
end if
RSubst.close
set RSubst=Nothing
%>
<%'-------------------- MISSAPLIED NAME -----------------------------------------------------------------------
' Find the accepted name in MCL.
SQL= "SELECT PTaxon_1.PTNameFk, PTaxon_1.PTRefFk, Name.NameCache, Name.FullNameCache, Name.Notes AS NameNotes" & _
" FROM (PTaxon AS PTaxon_1 INNER JOIN Name ON PTaxon_1.PTNameFk = Name.NameId) INNER JOIN (PTaxon INNER JOIN RelPTaxon ON (PTaxon.PTNameFk = RelPTaxon.PTNameFk1) " & _
" AND (PTaxon.PTRefFk = RelPTaxon.PTRefFk1)) ON (PTaxon_1.PTNameFk = RelPTaxon.PTNameFk2) AND (PTaxon_1.PTRefFk = RelPTaxon.PTRefFk2)" & _
" WHERE (((PTaxon.PTNameFk)="&Rptaxon("PTNameFk")&") AND ((PTaxon.PTRefFk)="&Rptaxon("PTRefFk")&") AND ((RelPTaxon.RelQualifierFk) = 3)) " & _
" ORDER BY Name.NameCache"
Set Racc = Server.CreateObject("ADODB.Recordset")
openRecordset Racc, SQL
if Racc.Recordcount>0 then
contador=0
While NOT Racc.EOF
contador=contador+1
%>
<%if contador=1 then%>
MisappliedName of:
<%end if%> |
&PTRefFk=<%=Racc("PTRefFk")%>">
<%=Racc("FullNameCache")%> |
<%
Racc.Movenext
Wend
Racc.Close
set Racc=Nothing
end if
'---------------------------------------------------------------------------------------------------------------
%>
<% '-----------------BASIONYM-------------------------------------------------------------------------------------------
'Look to see if it has a basionym of something.
SQL= _
" SELECT dbo.Name.NameId, Name_1.NameId AS NameIdBas, Name_1.FullNameCache " & _
" FROM Name Name_1 INNER JOIN Name INNER JOIN RelName ON Name.NameId = RelName.NameFk2 ON Name_1.NameId = RelName.NameFk1 " & _
" WHERE (((Name.NameId)="&Rptaxon("PTNameFk")&") AND ((RelName.RelNameQualifierFk)=1))"
Set Rbas = Server.CreateObject("ADODB.Recordset")
openRecordset Rbas, SQL
if Rbas.RecordCount > 0 then
%>
Basionym: |
&PTRefFk=<%=Request("PTRefFk")%>"><%=Rbas("FullNameCache")%> |
<%
end if
Rbas.close
set Rbas=Nothing
%>
<%'----------------- SYNONYMS -------------------------------------------------------------------------------------------
'Look for synonyms only if the potential taxon is accepted. SYNONYMS
if Rptaxon("StatusFk")=1 then
SQL= _
" SELECT PTaxon_1.PTNameFk, PTaxon_1.PTRefFk AS PTRefFk_s, Name.NameCache, Name.FullNameCache, Name.Notes AS NameNotes, Name.UnnamedNamePhrase, PTaxon.PTRefFk AS PTRefFk, RelPTQualifier.RelPTQualifier "&_
" FROM (PTaxon AS PTaxon_1 INNER JOIN (PTaxon INNER JOIN RelPTaxon ON (PTaxon.PTNameFk = RelPTaxon.PTNameFk2) AND (PTaxon.PTRefFk = RelPTaxon.PTRefFk2)) ON (PTaxon_1.PTNameFk = RelPTaxon.PTNameFk1) AND (PTaxon_1.PTRefFk = RelPTaxon.PTRefFk1)) INNER JOIN Name ON PTaxon_1.PTNameFk = Name.NameId INNER JOIN RelPTQualifier ON RelPTaxon.RelQualifierFk = RelPTQualifier.RelPTQualifierId " & _
" WHERE (((PTaxon.PTNameFk)="&Rptaxon("PTNameFk")&") AND ((PTaxon.PTRefFk)="&Rptaxon("PTRefFk")&") AND ((RelPTaxon.RelQualifierFk) in (2,4,5,6,7))) ORDER BY RelPTQualifier.RelPTQualifier DESC,Name.RankFk, Name.NameCache"
Set Rsyn = Server.CreateObject("ADODB.Recordset")
openRecordset Rsyn, SQL
if Rsyn.Recordcount>0 then
contador=0
syn_rel=""
While NOT Rsyn.EOF
contador=contador+1
%>
<%if contador=1 or syn_rel<>Rsyn("RelPTQualifier") then%>
<%=ucase(left(Trim(Replace(Replace(Rsyn("RelPTQualifier"),"is",""),"of","")),1))&right(Trim(Replace(Replace(Rsyn("RelPTQualifier"),"is",""),"of","")),len(Trim(Replace(Replace(Rsyn("RelPTQualifier"),"is",""),"of","")))-1)&"(s):"%>
<%end if%>
|
&PTRefFk=<%=Rsyn("PTRefFk_s")%>"><%=Rsyn("FullNameCache")%> |
<%
syn_rel=Rsyn("RelPTQualifier")
Rsyn.Movenext
Wend
Rsyn.Close
set Rsyn=Nothing
end if
end if
%>
<%'----------------- SYNONYMS -------------------------------------------------------------------------------------------
'Look for concept synonyms only if the potential taxon is accepted CONCEPT SYNONYMS
if Rptaxon("StatusFk")=1 then
SQL=_
" SELECT RelQualifierFk, NameId, Reference.RefId, NameCache, FullNameCache, Name.Notes AS NameNotes, RelPTQualifier AS RelQualifier, RelPTaxon.Notes AS RelNotes, Reference.RefCache, RelRefFk, is_congruent, is_included_in, includes, overlaps, excludes, doubtful, Reference_1.RefCache AS RelRefCache, RankFk "&_
" FROM RelPTQualifier INNER JOIN "&_
" RelPTaxon ON RelPTQualifier.RelPTQualifierId = RelPTaxon.RelQualifierFk INNER JOIN "&_
" Name ON RelPTaxon.PTNameFk2 = Name.NameId INNER JOIN "&_
" Reference ON RelPTaxon.PTRefFk2 = Reference.RefId INNER JOIN "&_
" Reference Reference_1 ON RelPTaxon.RelRefFk = Reference_1.RefId "&_
" WHERE (RelPTaxon.RelQualifierFk > 9) AND (RelPTaxon.PTRefFk1 = "&Rptaxon("PTRefFk")&") AND (RelPTaxon.PTNameFk1 = "&Rptaxon("PTNameFk")&") "&_
" UNION " & _
" SELECT RelQualifierFk, NameId, Reference.RefId, NameCache, FullNameCache, Name.Notes AS NameNotes, RelPTQualifier AS RelQualifier, RelPTaxon.Notes AS RelNotes, Reference.RefCache, RelRefFk, is_congruent, is_included_in, includes, overlaps, excludes, doubtful, Reference_1.RefCache AS RelRefCache, RankFk "&_
" FROM RelPTQualifier INNER JOIN "&_
" RelPTaxon ON RelPTQualifier.RelPTQualifierId = dbo.f_core_Reverse(RelPTaxon.RelQualifierFk) INNER JOIN "&_
" Name ON RelPTaxon.PTNameFk1 = Name.NameId INNER JOIN "&_
" Reference ON RelPTaxon.PTRefFk1 = Reference.RefId INNER JOIN "&_
" Reference Reference_1 ON RelPTaxon.RelRefFk = Reference_1.RefId "&_
" WHERE (RelPTaxon.RelQualifierFk > 9) AND (RelPTaxon.PTRefFk2 = "&Rptaxon("PTRefFk")&") AND (RelPTaxon.PTNameFk2 = "&Rptaxon("PTNameFk")&") "&_
"ORDER BY RelQualifierFk, RelRefFk, RankFk, namecache"
Set Rcsyn = Server.CreateObject("ADODB.Recordset")
openRecordset Rcsyn, SQL
if Rcsyn.Recordcount>0 then
%>
Concept Synonym(s):
|
|
<%
contador=0
ult_ref=""
While NOT Rcsyn.EOF
contador=contador+1
%>
<%if Rcsyn("RelRefCache")<>ult_ref then%>
|
According to: <%=Rcsyn("RelRefCache")%> |
<%end if%>
|
<%
'Construct a string concatenating the images that are needed to represent the concept relation
concept_images=""
if Rcsyn("is_congruent")<>0 then concept_images=""
if Rcsyn("is_included_in")<>0 then
if concept_images<>"" then
concept_images=concept_images&","
else
concept_images=""
end if
end if
if Rcsyn("includes")<>0 then
if concept_images<>"" then
concept_images=concept_images&","
else
concept_images=""
end if
end if
if Rcsyn("overlaps")<>0 then
if concept_images<>"" then
concept_images=concept_images&","
else
concept_images=""
end if
end if
if Rcsyn("excludes")<>0 then
if concept_images<>"" then
concept_images=concept_images&","
else
concept_images=""
end if
end if
concept_images="{"&concept_images&"}"
if Rcsyn("doubtful")<>0 then concept_images="?"&concept_images
%>
<%=concept_images%> &PTRefFk=<%=Rcsyn("RefId")%>"><%=Rcsyn("FullNameCache")%> sec. <%=Rcsyn("RefCache")%> <%=Rcsyn("RelNotes")%> |
<%
Rcsyn.Movenext
if NOT Rcsyn.EOF then
ult_ref=Rcsyn("RelRefCache")
end if
Wend
Rcsyn.Close
set Rcsyn=Nothing
end if
end if
%>
<%'------------------------MISSAPLIED NAMES--------------------------------------------------------------------------------
'Look for missaplied names only if the potential taxon is accepted
if Rptaxon("StatusFk")=1 then
SQL= _
" SELECT PTaxon_1.PTNameFk, PTaxon_1.PTRefFk AS PTRefFk_s, Name.NameCache, Name.FullNameCache, Name.Notes AS NameNotes, PTaxon.PTRefFk AS PTRefFk, RelPTQualifier.RelPTQualifier as RelQualifier, RelPTaxon.Notes as RelNotes, Reference.RefCache"&_
" FROM (PTaxon AS PTaxon_1 INNER JOIN (PTaxon INNER JOIN RelPTaxon ON (PTaxon.PTNameFk = RelPTaxon.PTNameFk2) AND (PTaxon.PTRefFk = RelPTaxon.PTRefFk2)) ON (PTaxon_1.PTNameFk = RelPTaxon.PTNameFk1) AND (PTaxon_1.PTRefFk = RelPTaxon.PTRefFk1)) INNER JOIN Name ON PTaxon_1.PTNameFk = Name.NameId INNER JOIN RelPTQualifier ON RelPTaxon.RelQualifierFk = RelPTQualifier.RelPTQualifierId INNER JOIN Reference ON PTaxon_1.PTRefFk = Reference.RefId"&_
" WHERE (((PTaxon.PTNameFk)="&Rptaxon("PTNameFk")&") AND ((PTaxon.PTRefFk)="&Rptaxon("PTRefFk")&") AND ((RelPTaxon.RelQualifierFk)=3)) ORDER BY Name.NameCache"
Set Rmiss = Server.CreateObject("ADODB.Recordset")
openRecordset Rmiss, SQL
if Rmiss.Recordcount > 0 then
contador=0
While NOT Rmiss.EOF
contador=contador + 1
%>
<%if contador=1 then%>
Missaplied Name(s):
<%end if%>
|
&PTRefFk=<%=Rmiss("PTRefFk_s")%>"><%=Rmiss("FullNameCache")%> sec. <%=Rmiss("RefCache")%> [<%=Rmiss("RelQualifier")%>] <%=Rmiss("RelNotes")%> |
<%
Rmiss.Movenext
Wend
Rmiss.Close
set Rmiss=Nothing
end if
end if
%>
<%'-----------------INCLUDED TAXA------------------------------------------------------------------------------------
'Look for included taxa only if the potential taxon is accepted. INCLUDED TAXA, hierarchy DOWN
if Rptaxon("StatusFk")=1 then
SQL="SELECT PTaxon_1.PTNameFk, PTaxon_1.PTRefFk, Name.FullNameCache, Reference.RefCache, Reference.RefId AS RefId "&_
" FROM Reference INNER JOIN ((PTaxon AS PTaxon_1 INNER JOIN (PTaxon INNER JOIN RelPTaxon ON (PTaxon.PTNameFk = RelPTaxon.PTNameFk2) AND (PTaxon.PTRefFk = RelPTaxon.PTRefFk2)) ON (PTaxon_1.PTNameFk = RelPTaxon.PTNameFk1) AND (PTaxon_1.PTRefFk = RelPTaxon.PTRefFk1)) INNER JOIN Name ON PTaxon_1.PTNameFk = Name.NameId) ON Reference.RefId = PTaxon_1.PTRefFk "&_
" WHERE (((PTaxon.PTNameFk)="&Rptaxon("PTNameFk")&") AND ((PTaxon.PTRefFk)="&Rptaxon("PTRefFk")&") AND ((RelPTaxon.RelQualifierFk)=1)) "&_
" ORDER BY Name.RankFk DESC, Name.FullNameCache"
Set Rinclu = Server.CreateObject("ADODB.Recordset")
openRecordset Rinclu, SQL
if Rinclu.Recordcount>0 then
contador=0
%>|
|
<%
While NOT Rinclu.EOF
contador=contador+1
%>
<%if contador=1 then%> Included taxa:
<%end if%> |
&PTRefFk=<%=Rinclu("PTRefFk")%>"><%=Rinclu("FullNameCache")%>
<%if Rinclu("PTRefFk")<>Rptaxon("PTRefFk") then%> sec. <%=Rinclu("RefCache")%><%end if%>
|
<%
Rinclu.Movenext
Wend
Rinclu.Close
set Rinclu=Nothing
end if
end if
%>
<%'---------------------------NOTES----------------------------------------------------------------------------------------
'There are two type of notes here, the one from the potential taxon and the one from the name. Show them if there´s something inside
if NameA(7)<>"" then %>
Name Notes: |
<%=NameA(7)%> |
<%end if%>
<% if Rptaxon("Notes")<>"" then %>
Taxon Notes: |
<%=Rptaxon("Notes")%> |
<%end if%>
|
|
<%
'-----------END of TAXON --------------------------------------------------------------------------------------------------------
%>
|