updated xml metadata namespace URLs (removed streamonthefly references)
This commit is contained in:
parent
6fb2474242
commit
f789ade91a
5 changed files with 107 additions and 84 deletions
|
@ -2,11 +2,11 @@
|
|||
<audioClip id="0000000000000001"
|
||||
playlength="00:18:30.000000" uri="file:var/test1.mp3">
|
||||
<metadata
|
||||
xmlns="http://www.streamonthefly.org/"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:dcterms="http://purl.org/dc/terms/"
|
||||
xmlns:xbmf="http://www.streamonthefly.org/xbmf"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
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:dcterms="http://purl.org/dc/terms/"
|
||||
xmlns:xml="http://www.w3.org/XML/1998/namespace"
|
||||
>
|
||||
<dc:title >File Title txt</dc:title>
|
||||
<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:modified >2004-05-24</dcterms:modified>
|
||||
<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: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: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>
|
||||
</audioClip>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
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 $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -82,11 +82,11 @@ using namespace boost::posix_time;
|
|||
* playlength="00:18:30.000000"
|
||||
* uri="file:var/test1.mp3" >
|
||||
* <metadata
|
||||
* xmlns="http://www.streamonthefly.org/"
|
||||
* xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
* xmlns:dcterms="http://purl.org/dc/terms/"
|
||||
* xmlns:xbmf="http://www.streamonthefly.org/xbmf"
|
||||
* xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
|
||||
* 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:dcterms="http://purl.org/dc/terms/"
|
||||
* xmlns:xml="http://www.w3.org/XML/1998/namespace" >
|
||||
* <dc:title >File Title txt</dc:title>
|
||||
* <dcterms:extent >00:02:30.000000</dcterms:extent>
|
||||
* ...
|
||||
|
@ -130,7 +130,7 @@ using namespace boost::posix_time;
|
|||
* </code></pre>
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.24 $
|
||||
* @version $Revision: 1.25 $
|
||||
*/
|
||||
class AudioClip : public Configurable,
|
||||
public Playable
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
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 $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -81,11 +81,11 @@ using namespace boost::posix_time;
|
|||
* ...
|
||||
* <playlistElement> ... </playlistElement>
|
||||
* <metadata
|
||||
* xmlns="http://www.streamonthefly.org/"
|
||||
* xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
* xmlns:dcterms="http://purl.org/dc/terms/"
|
||||
* xmlns:xbmf="http://www.streamonthefly.org/xbmf"
|
||||
* xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
|
||||
* 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:dcterms="http://purl.org/dc/terms/"
|
||||
* xmlns:xml="http://www.w3.org/XML/1998/namespace" >
|
||||
* <dc:title >File Title txt</dc:title>
|
||||
* <dcterms:extent >00:02:30.000000</dcterms:extent>
|
||||
* ...
|
||||
|
@ -128,7 +128,7 @@ using namespace boost::posix_time;
|
|||
* </code></pre>
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.34 $
|
||||
* @version $Revision: 1.35 $
|
||||
*/
|
||||
class Playlist : public Configurable,
|
||||
public Playable
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
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 $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -92,11 +92,6 @@ static const std::string extentElementPrefix = "dcterms";
|
|||
*/
|
||||
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.
|
||||
*/
|
||||
|
@ -107,29 +102,46 @@ static const std::string titleElementPrefix = "dc";
|
|||
*/
|
||||
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.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
static const std::string liveSupportNamespaceUri
|
||||
= "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 */
|
||||
|
||||
|
@ -489,13 +501,15 @@ AudioClip :: setMetadata(Ptr<const Glib::ustring>::Ref value,
|
|||
metadata = dynamic_cast<xmlpp::Element*> (rootList.front());
|
||||
} else {
|
||||
metadata = rootNode->add_child(metadataElementName);
|
||||
metadata->set_namespace_declaration(defaultPrefixUri);
|
||||
metadata->set_namespace_declaration(titleElementUri,
|
||||
titleElementPrefix);
|
||||
metadata->set_namespace_declaration(extentElementUri,
|
||||
extentElementPrefix);
|
||||
metadata->set_namespace_declaration(defaultNamespaceUri);
|
||||
metadata->set_namespace_declaration(liveSupportNamespaceUri,
|
||||
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
|
||||
|
@ -569,13 +583,15 @@ AudioClip :: getXmlDocumentString() const throw ()
|
|||
}
|
||||
|
||||
xmlpp::Element* metadata = rootNode->add_child(metadataElementName);
|
||||
metadata->set_namespace_declaration(defaultPrefixUri);
|
||||
metadata->set_namespace_declaration(titleElementUri,
|
||||
titleElementPrefix);
|
||||
metadata->set_namespace_declaration(extentElementUri,
|
||||
extentElementPrefix);
|
||||
metadata->set_namespace_declaration(defaultNamespaceUri);
|
||||
metadata->set_namespace_declaration(liveSupportNamespaceUri,
|
||||
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(
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
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 $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -86,11 +86,6 @@ static const std::string extentElementPrefix = "dcterms";
|
|||
*/
|
||||
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.
|
||||
*/
|
||||
|
@ -101,27 +96,46 @@ static const std::string titleElementPrefix = "dc";
|
|||
*/
|
||||
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.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
static const std::string liveSupportNamespaceUri
|
||||
= "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 */
|
||||
|
||||
|
@ -670,13 +684,15 @@ Playlist :: setMetadata(Ptr<const Glib::ustring>::Ref value,
|
|||
metadata = dynamic_cast<xmlpp::Element*> (rootList.front());
|
||||
} else {
|
||||
metadata = rootNode->add_child(metadataElementName);
|
||||
metadata->set_namespace_declaration(defaultPrefixUri);
|
||||
metadata->set_namespace_declaration(titleElementUri,
|
||||
titleElementPrefix);
|
||||
metadata->set_namespace_declaration(extentElementUri,
|
||||
extentElementPrefix);
|
||||
metadata->set_namespace_declaration(defaultNamespaceUri);
|
||||
metadata->set_namespace_declaration(liveSupportNamespaceUri,
|
||||
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
|
||||
|
@ -761,13 +777,15 @@ Playlist :: getXmlDocumentString() const throw ()
|
|||
}
|
||||
|
||||
xmlpp::Element* metadata = rootNode->add_child(metadataElementName);
|
||||
metadata->set_namespace_declaration(defaultPrefixUri);
|
||||
metadata->set_namespace_declaration(titleElementUri,
|
||||
titleElementPrefix);
|
||||
metadata->set_namespace_declaration(extentElementUri,
|
||||
extentElementPrefix);
|
||||
metadata->set_namespace_declaration(defaultNamespaceUri);
|
||||
metadata->set_namespace_declaration(liveSupportNamespaceUri,
|
||||
liveSupportNamespacePrefix);
|
||||
metadata->set_namespace_declaration(dcNamespaceUri,
|
||||
titleElementPrefix);
|
||||
metadata->set_namespace_declaration(dctermsNamespaceUri,
|
||||
extentElementPrefix);
|
||||
metadata->set_namespace_declaration(xmlNamespaceUri,
|
||||
xmlNamespacePrefix);
|
||||
}
|
||||
|
||||
Glib::ustring playlistElementsXmlString("\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue