You can add a text input field to query the SCG bib anywhere as follows:
+/scgbib/query+
You can link to an scg bib entry by copying the base url of a query result from the SCG Bibliography. You can remove the Seaside session gunk if you want, but it is not necessary. For example:
*Traits theses>http://scg.unibe.ch/scgbib?query=traits+thesis*
yields: Traits theses
Within the scg pier, you can also remove the http://...
stuff, but then you must use wiki notation for the parameters, as follows:
*Traits theses>/scgbib|query=traits thesis*
yields: Traits theses
Various parameters can be configured. The query field may be either a set of keywords that must be present, or a regular expression. (The query engine makes an educated guess which it is, and reverts to keywords if the supposed regex does not compile.) Note that regexes are slower than to match than keywords. The following parameters can be set:
query=<keywords|regexString> caseSensitive=false|true sortBy=author|year|category display=summary|abstract|bibtex hideControls=false|true
Example:
*Traits theses bibtex>/scgbib|query=traits thesis|display=bibtex|hideControls=true*
To embed the result of a query, another approach is needed, since scgbib query results cannot be directly embedded.
One approach is to create a Component subpage of type Fixed Query, fill in its parameters as required, and then embed that page wherever you like. An example is the SCG Publications page.
Even simpler, you may link to the existing fixed query page and override its parameters as follows:
+/scgbib/fixedquery|query=Duca06b+
which yields:
NB: Escaped or-bars can now be used within queries, so you can write:
+/scgbib/fixedquery|query=Miln80a\|Miln92b|hideControls=true+
Fixed queries should suffice for most needs. To generate a personal publication list, however, a naive query may also return papers authored by other people appearing in a volume edited by the person in question. An author query will return just those entries for papers authored by that person, plus entries for volumes edited by that person, but with no author field. To achieve this, the query field is first used to retrieve all candidate entries. Then a second regex parameter is used to match exactly the author field or the editor field without authors.
author=<regexString>
For example:
+/scgbib/author|query=Olthoff|author=Olthoff|hideControls=true+
yields:
Missing Information is another special query component intended for maintenance purposes. Here the additional parameter is a regex specifying information that each entry matching the query is also expected to match.
info=<regexString>
In most cases the regex required is a or-query. Here are several prepackaged queries:
NB: Now that Pier supports escaped or-bars within queries, a fixed query can be used instead of this component.
The source code resides at http://www.squeaksource.com/Citezen.html in the package Citezen-Pier
. Model classes are shown below in yellow, view classes in pink, Pier/Seaside classes in blue, and Citezen/Magritte classes in green.
A BibFile
is a Pier Structure pointing to a bibtex file on the server. It holds a timestamp noting the last time the file was loaded. If the file changes, it will be reloaded. There should be just one BibFile
per bibtex file. The BibFile
splits the bibtex file (via a MAReferenceFileModel
) into a BibList
of BibEntry
objects, each of which holds the text of a single bibtex entry. A BibEntry
will lazily generate a parsed Citezen CZEntry
if it is needed, i.e., to be rendered.
A BibFile
is rendered by a BibFileView
. The scgbib on this site is rendered at SCG Bibliography. This interface generates a QuerySpec
, which holds all the query parameters and evaluates the query to produce a QueryResult
, which is rendered by the various interfaces. Note that a BibFileView
is a kind of Pier component that cannot be embedded, which is why we need the other view classes.
A QueryBox
is a simple widget that displays an input box and forwards its result to the BibFileView
.
A FixedQuery
can be used to configure a fixed QuerySpec
. Note that the QueryResult
has a timestamp too, so it will only be reevaluated if the bibtext file changes. AuthorPage
and MissingInfoPage
provide additional parameters to AuthorQuerySpec
and MissingInfoSpec
for complex queries described earlier.
See also: Pierbib Requirements