Source for file DublinCoreFragment.php
Documentation is available at DublinCoreFragment.php
* Created on 10.01.2007 by Norman Markgraf (nmarkgraf(at)user.sourceforge.net)
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* This software consists of voluntary contributions made by many individuals
* and is licensed under the GPL. For more information please see
* <http://opendocumentphp.org>.
* $Id: DublinCoreFragment.php 236 2007-07-24 07:43:40Z nmarkgraf $
require_once 'OpenDocumentPHP/util/Fragment.php';
* DublinCoreFragment class.
* @author Norman Markgraf (nmarkgraf(at)user.sourceforge.net)
* @copyright Copyright in 2006, 2007 by The OpenDocumentPHP Team
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License 2.0.
* @version $Revision: 236 $
* @package OpenDocumentPHP
* @since 0.5.0 - 08.02.2007
* @link http://dublincore.org/ Dublin Core Metadata Initiative (R)
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
private $description = null;
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
private $language = null;
* @param DOMNode $domFragment
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
if (!isset ($this->creator)) {
$this->creator = $this->getTag('creator', '');
return $this->creator->nodeValue;
* @since 0.5.0 - 08.02.2007
$newNode = $this->domFragment->createElementNS(self :: DC, 'dc:creator', $creator);
$this->setTag($this->creator, $newNode);
$this->creator = $newNode;
* @since 0.5.0 - 08.02.2007
if (!isset ($this->description)) {
$this->description = $this->getTag('description', '');
return $this->description->nodeValue;
* @param string $description
* @since 0.5.0 - 08.02.2007
$newNode = $this->domFragment->createElementNS(self :: DC, 'dc:description', $description);
$this->setTag($this->description, $newNode);
$this->description = $newNode;
* @since 0.5.0 - 08.02.2007
if (!isset ($this->language)) {
$this->language = $this->getTag('language', '');
return $this->language->nodeValue;
* @param string $language
* @since 0.5.0 - 08.02.2007
$newNode = $this->domFragment->createElementNS(self :: DC, 'dc:language', $language);
$this->setTag($this->language, $newNode);
$this->language = $newNode;
* @since 0.5.0 - 08.02.2007
if (!isset ($this->subject)) {
$this->subject = $this->getTag('subject', '');
return $this->subject->nodeValue;
* @since 0.5.0 - 08.02.2007
$newNode = $this->domFragment->createElementNS(self :: DC, 'dc:subject', $subject);
$this->setTag($this->subject, $newNode);
$this->subject = $newNode;
* @since 0.5.0 - 08.02.2007
if (!isset ($this->title)) {
$this->title = $this->getTag('title', '');
return $this->title->nodeValue;
* @since 0.5.0 - 08.02.2007
$newNode = $this->domFragment->createElementNS(self :: DC, 'dc:title', $title);
$this->setTag($this->title, $newNode);
* @param string $defaultValue
* @since 0.5.0 - 08.02.2007
protected function getTag($tag, $defaultValue) {
return parent :: getTag('//*/office:meta/dc:' . $tag, self :: DC, $tag, $defaultValue);
|