updated xml metadata namespace URLs (removed streamonthefly references)

This commit is contained in:
fgerlits 2005-04-28 10:25:05 +00:00
parent 6fb2474242
commit f789ade91a
5 changed files with 107 additions and 84 deletions

View file

@ -2,11 +2,11 @@
<audioClip id="0000000000000001" <audioClip id="0000000000000001"
playlength="00:18:30.000000" uri="file:var/test1.mp3"> playlength="00:18:30.000000" uri="file:var/test1.mp3">
<metadata <metadata
xmlns="http://www.streamonthefly.org/" xmlns="http://mdlf.org/livesupport/elements/1.0/"
xmlns:ls="http://mdlf.org/livesupport/elements/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:xbmf="http://www.streamonthefly.org/xbmf" xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >
<dc:title >File Title txt</dc:title> <dc:title >File Title txt</dc:title>
<dcterms:alternative >Alternative File Title ín sőmé %$#@* LÁNGŰAGÉ</dcterms:alternative> <dcterms:alternative >Alternative File Title ín sőmé %$#@* LÁNGŰAGÉ</dcterms:alternative>
@ -17,20 +17,9 @@
<dcterms:issued >2004-05-23</dcterms:issued> <dcterms:issued >2004-05-23</dcterms:issued>
<dcterms:modified >2004-05-24</dcterms:modified> <dcterms:modified >2004-05-24</dcterms:modified>
<dcterms:valid >2004-05-25</dcterms:valid> <dcterms:valid >2004-05-25</dcterms:valid>
<dc:type xsi:type="dcterms:DCMIType" >Sound</dc:type>
<dc:format xsi:type="dcterms:IMT" >audio/mpeg</dc:format>
<dcterms:extent >00:18:30.000000</dcterms:extent> <dcterms:extent >00:18:30.000000</dcterms:extent>
<dcterms:medium >online</dcterms:medium> <dcterms:medium >online</dcterms:medium>
<dc:identifier >streamonthefly:</dc:identifier>
<dc:identifier >http://some.url.mdlf.org/</dc:identifier>
<dcterms:spatial >Spatial Coverage</dcterms:spatial> <dcterms:spatial >Spatial Coverage</dcterms:spatial>
<dcterms:temporal >Temporal Covarage</dcterms:temporal> <dcterms:temporal >Temporal Covarage</dcterms:temporal>
<xbmf:episodetitle >Episode Title txt</xbmf:episodetitle>
<xbmf:episodesequence >Episode sequence</xbmf:episodesequence>
<xbmf:contributor>
<xbmf:role>Editor</xbmf:role>
<xbmf:name>John X</xbmf:name>
<xbmf:phone>123456789</xbmf:phone>
</xbmf:contributor>
</metadata> </metadata>
</audioClip> </audioClip>

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.24 $ Version : $Revision: 1.25 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/AudioClip.h,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/AudioClip.h,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -82,11 +82,11 @@ using namespace boost::posix_time;
* playlength="00:18:30.000000" * playlength="00:18:30.000000"
* uri="file:var/test1.mp3" &gt; * uri="file:var/test1.mp3" &gt;
* &lt;metadata * &lt;metadata
* xmlns="http://www.streamonthefly.org/" * xmlns="http://mdlf.org/livesupport/elements/1.0/"
* xmlns:ls="http://mdlf.org/livesupport/elements/1.0/"
* xmlns:dc="http://purl.org/dc/elements/1.1/" * xmlns:dc="http://purl.org/dc/elements/1.1/"
* xmlns:dcterms="http://purl.org/dc/terms/" * xmlns:dcterms="http://purl.org/dc/terms/"
* xmlns:xbmf="http://www.streamonthefly.org/xbmf" * xmlns:xml="http://www.w3.org/XML/1998/namespace" &gt;
* xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" &gt;
* &lt;dc:title &gt;File Title txt&lt;/dc:title&gt; * &lt;dc:title &gt;File Title txt&lt;/dc:title&gt;
* &lt;dcterms:extent &gt;00:02:30.000000&lt;/dcterms:extent&gt; * &lt;dcterms:extent &gt;00:02:30.000000&lt;/dcterms:extent&gt;
* ... * ...
@ -130,7 +130,7 @@ using namespace boost::posix_time;
* </code></pre> * </code></pre>
* *
* @author $Author: fgerlits $ * @author $Author: fgerlits $
* @version $Revision: 1.24 $ * @version $Revision: 1.25 $
*/ */
class AudioClip : public Configurable, class AudioClip : public Configurable,
public Playable public Playable

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.34 $ Version : $Revision: 1.35 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/Playlist.h,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/Playlist.h,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -81,11 +81,11 @@ using namespace boost::posix_time;
* ... * ...
* &lt;playlistElement&gt; ... &lt;/playlistElement&gt; * &lt;playlistElement&gt; ... &lt;/playlistElement&gt;
* &lt;metadata * &lt;metadata
* xmlns="http://www.streamonthefly.org/" * xmlns="http://mdlf.org/livesupport/elements/1.0/"
* xmlns:ls="http://mdlf.org/livesupport/elements/1.0/"
* xmlns:dc="http://purl.org/dc/elements/1.1/" * xmlns:dc="http://purl.org/dc/elements/1.1/"
* xmlns:dcterms="http://purl.org/dc/terms/" * xmlns:dcterms="http://purl.org/dc/terms/"
* xmlns:xbmf="http://www.streamonthefly.org/xbmf" * xmlns:xml="http://www.w3.org/XML/1998/namespace" &gt;
* xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" &gt;
* &lt;dc:title &gt;File Title txt&lt;/dc:title&gt; * &lt;dc:title &gt;File Title txt&lt;/dc:title&gt;
* &lt;dcterms:extent &gt;00:02:30.000000&lt;/dcterms:extent&gt; * &lt;dcterms:extent &gt;00:02:30.000000&lt;/dcterms:extent&gt;
* ... * ...
@ -128,7 +128,7 @@ using namespace boost::posix_time;
* </code></pre> * </code></pre>
* *
* @author $Author: fgerlits $ * @author $Author: fgerlits $
* @version $Revision: 1.34 $ * @version $Revision: 1.35 $
*/ */
class Playlist : public Configurable, class Playlist : public Configurable,
public Playable public Playable

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.24 $ Version : $Revision: 1.25 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/AudioClip.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/AudioClip.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -92,11 +92,6 @@ static const std::string extentElementPrefix = "dcterms";
*/ */
static const std::string extentElementName = "extent"; static const std::string extentElementName = "extent";
/**
* The URI identifier for the "dcterms" prefix.
*/
static const std::string extentElementUri = "http://purl.org/dc/terms/";
/** /**
* The prefix of the title metadata element. * The prefix of the title metadata element.
*/ */
@ -107,29 +102,46 @@ static const std::string titleElementPrefix = "dc";
*/ */
static const std::string titleElementName = "title"; static const std::string titleElementName = "title";
/**
* The URI identifier for the "dc" prefix.
*/
static const std::string titleElementUri
= "http://purl.org/dc/elements/1.1/";
/**
* The URI identifier for the default XML namespace.
*/
static const std::string defaultPrefixUri
="http://www.streamonthefly.org/";
/** /**
* The prefix for the Live Support extension elements. * The prefix for the Live Support extension elements.
*/ */
static const std::string liveSupportNamespacePrefix = "ls"; static const std::string liveSupportNamespacePrefix = "ls";
/**
* The prefix for the "xml:" prefix elements.
*/
static const std::string xmlNamespacePrefix = "xml";
/**
* The URI identifier for the default namespace
*/
static const std::string defaultNamespaceUri
= "http://mdlf.org/livesupport/elements/1.0/";
/** /**
* The URI identifier for the "ls" prefix. * The URI identifier for the "ls" prefix.
*/ */
static const std::string liveSupportNamespaceUri static const std::string liveSupportNamespaceUri
= "http://mdlf.org/livesupport/elements/1.0/"; = "http://mdlf.org/livesupport/elements/1.0/";
/**
* The URI identifier for the "dc" prefix
*/
static const std::string dcNamespaceUri
= "http://purl.org/dc/elements/1.1/";
/**
* The URI identifier for the "dcterms" prefix
*/
static const std::string dctermsNamespaceUri
= "http://purl.org/dc/terms/";
/**
* The URI identifier for the "xml" prefix
*/
static const std::string xmlNamespaceUri
= "http://www.w3.org/XML/1998/namespace";
/* =============================================== local function prototypes */ /* =============================================== local function prototypes */
@ -489,13 +501,15 @@ AudioClip :: setMetadata(Ptr<const Glib::ustring>::Ref value,
metadata = dynamic_cast<xmlpp::Element*> (rootList.front()); metadata = dynamic_cast<xmlpp::Element*> (rootList.front());
} else { } else {
metadata = rootNode->add_child(metadataElementName); metadata = rootNode->add_child(metadataElementName);
metadata->set_namespace_declaration(defaultPrefixUri); metadata->set_namespace_declaration(defaultNamespaceUri);
metadata->set_namespace_declaration(titleElementUri,
titleElementPrefix);
metadata->set_namespace_declaration(extentElementUri,
extentElementPrefix);
metadata->set_namespace_declaration(liveSupportNamespaceUri, metadata->set_namespace_declaration(liveSupportNamespaceUri,
liveSupportNamespacePrefix); liveSupportNamespacePrefix);
metadata->set_namespace_declaration(dcNamespaceUri,
titleElementPrefix);
metadata->set_namespace_declaration(dctermsNamespaceUri,
extentElementPrefix);
metadata->set_namespace_declaration(xmlNamespaceUri,
xmlNamespacePrefix);
} }
// find the element to be modified // find the element to be modified
@ -569,13 +583,15 @@ AudioClip :: getXmlDocumentString() const throw ()
} }
xmlpp::Element* metadata = rootNode->add_child(metadataElementName); xmlpp::Element* metadata = rootNode->add_child(metadataElementName);
metadata->set_namespace_declaration(defaultPrefixUri); metadata->set_namespace_declaration(defaultNamespaceUri);
metadata->set_namespace_declaration(titleElementUri,
titleElementPrefix);
metadata->set_namespace_declaration(extentElementUri,
extentElementPrefix);
metadata->set_namespace_declaration(liveSupportNamespaceUri, metadata->set_namespace_declaration(liveSupportNamespaceUri,
liveSupportNamespacePrefix); liveSupportNamespacePrefix);
metadata->set_namespace_declaration(dcNamespaceUri,
titleElementPrefix);
metadata->set_namespace_declaration(dctermsNamespaceUri,
extentElementPrefix);
metadata->set_namespace_declaration(xmlNamespaceUri,
xmlNamespacePrefix);
} }
Ptr<Glib::ustring>::Ref metadataString(new Glib::ustring( Ptr<Glib::ustring>::Ref metadataString(new Glib::ustring(

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.34 $ Version : $Revision: 1.35 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/Playlist.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/Playlist.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -86,11 +86,6 @@ static const std::string extentElementPrefix = "dcterms";
*/ */
static const std::string extentElementName = "extent"; static const std::string extentElementName = "extent";
/**
* The URI identifier for the "dcterms" prefix
*/
static const std::string extentElementUri = "http://purl.org/dc/terms/";
/** /**
* The prefix of the title metadata element. * The prefix of the title metadata element.
*/ */
@ -101,27 +96,46 @@ static const std::string titleElementPrefix = "dc";
*/ */
static const std::string titleElementName = "title"; static const std::string titleElementName = "title";
/**
* The URI identifier for the "dc" prefix
*/
static const std::string titleElementUri ="http://purl.org/dc/elements/1.1/";
/**
* The URI identifier for the default XML namespace
*/
static const std::string defaultPrefixUri ="http://www.streamonthefly.org/";
/** /**
* The prefix for the Live Support extension elements. * The prefix for the Live Support extension elements.
*/ */
static const std::string liveSupportNamespacePrefix = "ls"; static const std::string liveSupportNamespacePrefix = "ls";
/**
* The prefix for the "xml:" prefix elements.
*/
static const std::string xmlNamespacePrefix = "xml";
/**
* The URI identifier for the default namespace
*/
static const std::string defaultNamespaceUri
= "http://mdlf.org/livesupport/elements/1.0/";
/** /**
* The URI identifier for the "ls" prefix. * The URI identifier for the "ls" prefix.
*/ */
static const std::string liveSupportNamespaceUri static const std::string liveSupportNamespaceUri
= "http://mdlf.org/livesupport/elements/1.0/"; = "http://mdlf.org/livesupport/elements/1.0/";
/**
* The URI identifier for the "dc" prefix
*/
static const std::string dcNamespaceUri
= "http://purl.org/dc/elements/1.1/";
/**
* The URI identifier for the "dcterms" prefix
*/
static const std::string dctermsNamespaceUri
= "http://purl.org/dc/terms/";
/**
* The URI identifier for the "xml" prefix
*/
static const std::string xmlNamespaceUri
= "http://www.w3.org/XML/1998/namespace";
/* =============================================== local function prototypes */ /* =============================================== local function prototypes */
@ -670,13 +684,15 @@ Playlist :: setMetadata(Ptr<const Glib::ustring>::Ref value,
metadata = dynamic_cast<xmlpp::Element*> (rootList.front()); metadata = dynamic_cast<xmlpp::Element*> (rootList.front());
} else { } else {
metadata = rootNode->add_child(metadataElementName); metadata = rootNode->add_child(metadataElementName);
metadata->set_namespace_declaration(defaultPrefixUri); metadata->set_namespace_declaration(defaultNamespaceUri);
metadata->set_namespace_declaration(titleElementUri,
titleElementPrefix);
metadata->set_namespace_declaration(extentElementUri,
extentElementPrefix);
metadata->set_namespace_declaration(liveSupportNamespaceUri, metadata->set_namespace_declaration(liveSupportNamespaceUri,
liveSupportNamespacePrefix); liveSupportNamespacePrefix);
metadata->set_namespace_declaration(dcNamespaceUri,
titleElementPrefix);
metadata->set_namespace_declaration(dctermsNamespaceUri,
extentElementPrefix);
metadata->set_namespace_declaration(xmlNamespaceUri,
xmlNamespacePrefix);
} }
// find the element to be modified // find the element to be modified
@ -761,13 +777,15 @@ Playlist :: getXmlDocumentString() const throw ()
} }
xmlpp::Element* metadata = rootNode->add_child(metadataElementName); xmlpp::Element* metadata = rootNode->add_child(metadataElementName);
metadata->set_namespace_declaration(defaultPrefixUri); metadata->set_namespace_declaration(defaultNamespaceUri);
metadata->set_namespace_declaration(titleElementUri,
titleElementPrefix);
metadata->set_namespace_declaration(extentElementUri,
extentElementPrefix);
metadata->set_namespace_declaration(liveSupportNamespaceUri, metadata->set_namespace_declaration(liveSupportNamespaceUri,
liveSupportNamespacePrefix); liveSupportNamespacePrefix);
metadata->set_namespace_declaration(dcNamespaceUri,
titleElementPrefix);
metadata->set_namespace_declaration(dctermsNamespaceUri,
extentElementPrefix);
metadata->set_namespace_declaration(xmlNamespaceUri,
xmlNamespacePrefix);
} }
Glib::ustring playlistElementsXmlString("\n"); Glib::ustring playlistElementsXmlString("\n");