Browse Source

improved bibtex entry URL creation (can now be parametrized using BIBTEXBROWSER_URL_BUILDER)

hg/35a367e65a464cf6cdf277c73f977a6828b723fe/bookmarks/master
Martin Monperrus 14 years ago
parent
commit
6a06000c43
  1. 20
      bibtexbrowser.php
  2. 36
      test/output/4c4c65636d50fa083859c4101a3f88dc.html
  3. 10
      test/output/7927fcd8654efc9521cae97590ac1e7b.html

20
bibtexbrowser.php

@ -963,8 +963,20 @@ class BibEntry {
/** Tries to build a good URL for this entry */
function getURL() {
if ($this->hasField('url')) return $this->getField('url');
else return "http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']).'/'.BIBTEXBROWSER_URL.'?'.createQueryString(array('key'=>$this->getKey()));
if (defined('BIBTEXBROWSER_URL_BUILDER')) {
$f = BIBTEXBROWSER_URL_BUILDER;
return $f($this);
}
return BIBTEXBROWSER_URL.'?'.createQueryString(array('key'=>$this->getKey()));
}
/** Tries to build a good absolute URL for this entry */
function getAbsoluteURL() {
if (defined('BIBTEXBROWSER_URL_BUILDER')) {
$f = BIBTEXBROWSER_URL_BUILDER;
return $f($this);
}
return "http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']).'/'.$this->getURL();
}
/** returns a "[pdf]" link if relevant */
@ -1229,7 +1241,7 @@ class BibEntry {
echo '<td class="bibitem">';
echo bib2html($this);
$href = 'href="'.BIBTEXBROWSER_URL.'?'.createQueryString(array(Q_KEY => $this->getKey())).'"';
$href = 'href="'.$this->getURL().'"';
// we add biburl and title to be able to retrieve this important information
// using Xpath expressions on the XHTML source
@ -2713,7 +2725,7 @@ class RSSDisplay {
?>
<item>
<title><?php echo $this->text2rss($bibentry->getTitle());?></title>
<link><?php echo htmlentities($bibentry->getURL());?></link>
<link><?php echo $bibentry->getAbsoluteURL();?></link>
<description>
<?php
// we are in XML, so we cannot have HTML entitites

36
test/output/4c4c65636d50fa083859c4101a3f88dc.html

@ -341,7 +341,7 @@
</item>
<item>
<title>Computing Model Complexity</title>
<link>http://www.ilogix.com/whitepapers/whitepapers.cfm</link>
<link>http://localhost./bibtexbrowser.php?key=Douglass2004&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Bruce Powel Douglass, "Computing Model Complexity", 2004.
@ -350,7 +350,7 @@
</item>
<item>
<title>Dynamic Metrics for Java</title>
<link>http://www.sable.mcgill.ca/publications/papers/2003-5/sable-paper-2003-5.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=dufour03&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Bruno Dufour, Karel Driesen, Laurie Hendren, Clark Verbrugge, "Dynamic Metrics for Java", In Proceedings of the ACM SIGPLAN 2003 Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'03), ACM Press, pp. 149-168, 2003.
@ -449,7 +449,7 @@
</item>
<item>
<title>Defining and Validating Metrics for UML Statechart Diagrams</title>
<link>http://alarcos.inf-cr.uclm.es/qaoose2002/docs/QAOOSE-Gen-Mir-Pia.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=Genero2002&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
M. Genero, D. Miranda, M. Piattini, "Defining and Validating Metrics for UML Statechart Diagrams", In Proceedings of QAOOSE'2002, 2002.
@ -539,7 +539,7 @@
</item>
<item>
<title>Characterizing the Evolution of Class Hierarchies</title>
<link>http://www.iam.unibe.ch/~scg/Archive/Papers/Girb05aHierarchiesEvolution.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=girba05a&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Tudor Gîrba, Michele Lanza, Stéphane Ducasse, "Characterizing the Evolution of Class Hierarchies", In Proceedings of the 9th European Conference on Software Maintenance and Reengineering (CSMR'05), IEEE Computer Society, pp. 2-11, 2005.
@ -665,7 +665,7 @@
</item>
<item>
<title>Software Metrics as Class Graph Properties</title>
<link>http://www.cs.utwente.nl/~kastenbe/public/Master_Thesis.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=Kastenberg2004&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Harmen Kastenberg, "Software Metrics as Class Graph Properties", Master's thesis, University of Twente, 2004.
@ -683,7 +683,7 @@
</item>
<item>
<title>Developing Software Metrics Applicable to UML Models</title>
<link>http://alarcos.inf-cr.uclm.es/qaoose2002/docs/QAOOSE-Kim-Bol.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=Kim2002&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Hyoseob Kim, Cornelia Boldyreff, "Developing Software Metrics Applicable to UML Models", In Proceedings of QAOOSE'2002, 2002.
@ -737,7 +737,7 @@
</item>
<item>
<title>Beyond Language Independent Object-Oriented Metrics: Model Independent Metrics</title>
<link>http://www.iam.unibe.ch/~scg/Archive/Papers/Lanz02bModelIndependentMetrics.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=Lanza2002&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Michele Lanza, Stéphane Ducasse, "Beyond Language Independent Object-Oriented Metrics: Model Independent Metrics", In Proceedings of the 6th International Workshop on Quantitative Approaches in Object-Oriented Software Engineering, pp. 77-84, 2002.
@ -755,7 +755,7 @@
</item>
<item>
<title>Automated Measurement of UML Models: an open toolset approach</title>
<link>http://www.jot.fm/issues/issue_2005_05/article2</link>
<link>http://localhost./bibtexbrowser.php?key=Lavazza2005&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Luigi Lavazza, Alberto Agostini, "Automated Measurement of UML Models: an open toolset approach", In Journal of Object Technology, vol. 4, no. 4, pp. 115-134, 2005.
@ -800,7 +800,7 @@
</item>
<item>
<title>Measuring the Requirements Management Key Process Area</title>
<link>http://www.cs.umu.se/~jubo/Projects/QMSE/ESCOM2001.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=Loconsole2001&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Annabella Loconsole, "Measuring the Requirements Management Key Process Area", In Proceedings of the 12th European Software Control and Metrics Conference (ESCOM'2001), 2001.
@ -935,7 +935,7 @@
</item>
<item>
<title>Metrology - in short</title>
<link>http://www.euromet.org/docs/pubs/docs/Metrology_in_short_2nd_edition_may_2004.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=Metrotrade2003&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Metrotrade Project, Regmet Project, "Metrology - in short", European Association of National Metrology Institutes, 2003.
@ -980,7 +980,7 @@
</item>
<item>
<title>La mesure des modèles par les modèles : une approche générative</title>
<link>http://www.monperrus.net/martin/la-mesure-des-modeles-par-les-modeles-une-approche-generative.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=monperrus08phd&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Martin Monperrus, "La mesure des modèles par les modèles : une approche générative", PhD thesis, Université de Rennes, 2008. (Advisor: JM. Jézéquel; Examiners: H. Sahraoui, S. Ducasse)
@ -989,7 +989,7 @@
</item>
<item>
<title>Counts Count</title>
<link>http://www.monperrus.net/martin/Counts_Count.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=monperrus07&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Martin Monperrus, Joël Champeau, Brigitte Hoeltzener, "Counts Count", In Proceedings of the 2nd Workshop on Model Size Metrics (MSM'07) co-located with MODELS'2007, 2007.
@ -998,7 +998,7 @@
</item>
<item>
<title>Measuring Models</title>
<link>http://www.monperrus.net/martin/Measuring-models-in-Model-Driven-Software-Development-Integrating-Quality-Assurance.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=monperrus08b&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Martin Monperrus, Jean-Marc Jézéquel, Joël Champeau, Brigitte Hoeltzener, "Measuring Models", Chapter in Model-Driven Software Development: Integrating Quality Assurance, IDEA Group, 2008.
@ -1007,7 +1007,7 @@ Model-Driven Engineering (MDE) is an approach to software development that uses
</item>
<item>
<title>Model-driven Engineering Metrics for Real Time Systems</title>
<link>http://www.monperrus.net/martin/Model-driven_Engineering_Metrics_for_Real_Time_Systems.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=monperrus08a&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Martin Monperrus, Jean-Marc Jézéquel, Joël Champeau, Brigitte Hoeltzener, "Model-driven Engineering Metrics for Real Time Systems", In Proceedings of the 4th European Congress on Embedded Real Time Software (ERTS'2008), 2008.
@ -1016,7 +1016,7 @@ Model-Driven Engineering (MDE) is an approach to software development that uses
</item>
<item>
<title>A Model-driven Measurement Approach</title>
<link>http://www.monperrus.net/martin/A-Model-Driven-Measurement-Approach.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=monperrus08d&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Martin Monperrus, Jean-Marc Jézéquel, Joël Champeau, Brigitte Hoeltzener, "A Model-driven Measurement Approach", In Proceedings of the ACM/IEEE 11th International Conference on Model Driven Engineering Languages and Systems (MODELS'2008), 2008. (acceptance rate: 58/274)
@ -1115,7 +1115,7 @@ Model-Driven Engineering (MDE) is an approach to software development that uses
</item>
<item>
<title>Measuring OCL expressions: a "tracing"-based approach</title>
<link>http://www-ctp.di.fct.unl.pt/QUASAR/QAOOSE2003/papers/OCLM-QAOOSE03.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=Reynoso2003&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Luis Reynoso, Marcela Genero, Mario Piattini, "Measuring OCL expressions: a "tracing"-based approach", In Proceedings of QAOOSE'2003, 2003.
@ -1124,7 +1124,7 @@ Model-Driven Engineering (MDE) is an approach to software development that uses
</item>
<item>
<title>Embedding Metrics into Information Systems Development Methods: An Application of Method Engineering Technique</title>
<link>http://link.springer.de/link/service/series/0558/bibs/2681/26810374.htm</link>
<link>http://localhost./bibtexbrowser.php?key=Saeki2003&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Motoshi Saeki, "Embedding Metrics into Information Systems Development Methods: An Application of Method Engineering Technique", In CAiSE, pp. 374-389, 2003.
@ -1169,7 +1169,7 @@ Model-Driven Engineering (MDE) is an approach to software development that uses
</item>
<item>
<title>The Software Design Metrics tool for the UML (http://www.sdmetrics.com/)</title>
<link>http://www.sdmetrics.com/</link>
<link>http://localhost./bibtexbrowser.php?key=sdmetrics&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
SDMetrics, "The Software Design Metrics tool for the UML (http://www.sdmetrics.com/)", 2006.

10
test/output/7927fcd8654efc9521cae97590ac1e7b.html

@ -8,7 +8,7 @@
<item>
<title>La mesure des modèles par les modèles : une approche générative</title>
<link>http://www.monperrus.net/martin/la-mesure-des-modeles-par-les-modeles-une-approche-generative.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=monperrus08phd&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Martin Monperrus, "La mesure des modèles par les modèles : une approche générative", PhD thesis, Université de Rennes, 2008. (Advisor: JM. Jézéquel; Examiners: H. Sahraoui, S. Ducasse)
@ -17,7 +17,7 @@
</item>
<item>
<title>A Model-driven Measurement Approach</title>
<link>http://www.monperrus.net/martin/A-Model-Driven-Measurement-Approach.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=monperrus08d&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Martin Monperrus, Jean-Marc Jézéquel, Joël Champeau, Brigitte Hoeltzener, "A Model-driven Measurement Approach", In Proceedings of the ACM/IEEE 11th International Conference on Model Driven Engineering Languages and Systems (MODELS'2008), 2008. (acceptance rate: 58/274)
@ -26,7 +26,7 @@
</item>
<item>
<title>Measuring Models</title>
<link>http://www.monperrus.net/martin/Measuring-models-in-Model-Driven-Software-Development-Integrating-Quality-Assurance.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=monperrus08b&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Martin Monperrus, Jean-Marc Jézéquel, Joël Champeau, Brigitte Hoeltzener, "Measuring Models", Chapter in Model-Driven Software Development: Integrating Quality Assurance, IDEA Group, 2008.
@ -35,7 +35,7 @@ Model-Driven Engineering (MDE) is an approach to software development that uses
</item>
<item>
<title>Model-driven Engineering Metrics for Real Time Systems</title>
<link>http://www.monperrus.net/martin/Model-driven_Engineering_Metrics_for_Real_Time_Systems.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=monperrus08a&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Martin Monperrus, Jean-Marc Jézéquel, Joël Champeau, Brigitte Hoeltzener, "Model-driven Engineering Metrics for Real Time Systems", In Proceedings of the 4th European Congress on Embedded Real Time Software (ERTS'2008), 2008.
@ -44,7 +44,7 @@ Model-Driven Engineering (MDE) is an approach to software development that uses
</item>
<item>
<title>Counts Count</title>
<link>http://www.monperrus.net/martin/Counts_Count.pdf</link>
<link>http://localhost./bibtexbrowser.php?key=monperrus07&amp;amp;bib=%252Fvar%252Fwww%252Fbibtexbrowser%252Ftest%252Finput%252Fmetrics.bib</link>
<description>
Martin Monperrus, Joël Champeau, Brigitte Hoeltzener, "Counts Count", In Proceedings of the 2nd Workshop on Model Size Metrics (MSM'07) co-located with MODELS'2007, 2007.

Loading…
Cancel
Save