From: <jen...@us...> - 2008-10-27 08:33:59
|
Revision: 1436 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1436&view=rev Author: jenslehmann Date: 2008-10-27 08:29:37 +0000 (Mon, 27 Oct 2008) Log Message: ----------- started DBpedia Navigator templates Added Paths: ----------- trunk/src/dbpedia-navigator/templates/ trunk/src/dbpedia-navigator/templates/AbstractTemplate.php trunk/src/dbpedia-navigator/templates/CityTemplate.php Added: trunk/src/dbpedia-navigator/templates/AbstractTemplate.php =================================================================== --- trunk/src/dbpedia-navigator/templates/AbstractTemplate.php (rev 0) +++ trunk/src/dbpedia-navigator/templates/AbstractTemplate.php 2008-10-27 08:29:37 UTC (rev 1436) @@ -0,0 +1,37 @@ +<?php +/** + * Copyright (C) 2007-2008, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +/** + * Abstract template class. Templates are used for displaying information + * about a particular entity in a user friendly way. + * + * You can also use this class for convenience functions accessible by + * all concrete templates. + * + * @author Jens Lehmann + */ +class AbstractTemplate { + + abstract function printTemplate($triples); + +} + +?> \ No newline at end of file Added: trunk/src/dbpedia-navigator/templates/CityTemplate.php =================================================================== --- trunk/src/dbpedia-navigator/templates/CityTemplate.php (rev 0) +++ trunk/src/dbpedia-navigator/templates/CityTemplate.php 2008-10-27 08:29:37 UTC (rev 1436) @@ -0,0 +1,42 @@ +<?php +/** + * Copyright (C) 2007-2008, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +/** + * Template for cities. + * + * @author Jens Lehmann + */ +class CityTemplate { + + function getTemplate($triples) { + $content = ""; + + $latitude = $triples['http://dbpedia.org/ontology/latitutedegrees'] + "° " + + $triples['http://dbpedia.org/ontology/latitudeminutes'] + "′" + + $triples['http://dbpedia.org/ontology/latitudeseconds'] + "″N"; + + // .. continue ... + + return $content; + } + +} +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |