on 8/27/13, Eliza writes:
Hello,
We'd like to display the citation counts for articles listed on the profile pages.
So I modified the configuration file and added a citation count variable to the query.
However, the freemarker template didn't seem to pick up that variable.
See below for what was changed in the listViewConfig-authorInAuthorship.xml file:
<query-select>
SELECT DISTINCT ?subclass
?authorship
?infoResource
?infoResourceName
?globalCitationCount
?dateTime
?journal
?volume
?startPage
?endPage
?publisher
?locale
?appearsIn
?partOf
?editor
?hideThis
WHERE {
?subject ?property ?authorship
}
}
}
}
}
}
}
?hasGlobalCitationFrequencyObj
rdfs:label ?globalCitationCount
}
}
<critical-data-required>
FILTER ( bound(?infoResource) )
</critical-data-required>
} ORDER BY DESC(?dateTime) ?infoResourceName
</query-select>
And the template propStatement-authorInAuthorship.ftl:
…
<#local timesCited>
<#if statement.subclass??>
<#if statement.globalCitationCount??>
<br/>${statement.globalCitationCount!}
</#if>
</#if>
</#local>
${resourceTitle} ${citationDetails} <@dt.yearSpan "${statement.dateTime!}" /> ${resourceType} ${timesCited}
…
Any reason why it's not working?
Resolution:
on 8/28/13, Eliza writes:
It's finally resolved, but not until moving the variable to another construct:
<query-construct>
CONSTRUCT {
?subject ?property ?authorship .
?authorship ?authorshipProperty ?authorshipValue .
?hasGlobalCitationFrequencyObj
rdfs:label ?globalCitationCount
} WHERE {
{
?subject ?property ?authorship
}
UNION {
?subject ?property ?authorship .
?authorship ?authorshipProperty ?authorshipValue
} UNION {
?subject ?property ?authorship .
} UNION {
?subject ?property ?authorship .
} UNION {
?subject ?property ?authorship .
} UNION {
?subject ?property ?authorship .
} UNION {
?subject ?property ?authorship .
?hasGlobalCitationFrequencyObj
rdfs:label ?globalCitationCount
}
}
</query-construct>
This time, it was able to pick up the variable.
Not exactly sure why but it's working.