Sun Java System Content Delivery Server 内容开发指南
|
|
本附录提供了如何提交具有预览文件和定制字段的内容和内容版本的示例。
将原始内容文件作为预览
以下示例说明了如何提交将原始内容文件作为其预览的内容项。(请注意,midlet 和 iappli 内容类型不能用作预览。) ZIP 文件包含内容文件 Lullaby_1_1.mid,它也用作预览文件。ZIP 文件还包含 meta/ContentSubmission.xml 文件。
代码示例 A-1 将原始内容用作预览的内容项
<?xml version="1.0" encoding="UTF-8"?>
<ContentSubmission>
<Action value="New"/>
<ContentDescriptor>
<ContentType>ringtone</ContentType>
<EditionName>Lullaby1.1</EditionName>
<Version>1.1</Version>
<Preview>
<Wap>
<File useContentFile="true" caption="Full Version"/>
</Wap>
<Web>
<File useContentFile="true" caption="Hear the complete lullaby"/>
</Web>
</Preview>
</ContentDescriptor>
<WebDescriptor>
<Category>Home:Entertainment:Music</Category>
<WebGroup>
<DisplayName>Lullaby</DisplayName>
<ShortDescription>Memories every time your phone rings</ShortDescription>
<LongDescription>Bring back memories of gentler days every time your phone rings</LongDescription>
</WebGroup>
</WebDescriptor>
</ContentSubmission>
|
具有两个预览集的版本
以下示例说明了如何提交具有两个预览集的版本。ZIP 文件包含预览文件 Lullaby_1_2.mid(用作预览的原始内容项)和 preview/Lullaby_1_2.mp3(用于在 Web 上进行查看的预览)。ZIP 文件还包含 meta/ContentSubmission.xml 文件。
代码示例 A-2 将原始内容用作预览并具有用于 Web 的不同预览的版本
<?xml version="1.0" encoding="UTF-8"?>
<ContentSubmission>
<Action value="Add">
<EditionName>Lullaby1.1</EditionName>
</Action>
<ContentDescriptor>
<ContentType>ringtone</ContentType>
<EditionName>Lullaby1.2</EditionName>
<Version>1.2</Version>
<Preview>
<Wap>
<File useContentFile="true" caption="Full Version"/>
</Wap>
<Web>
<File src="/preview/Lullaby_1_2.mp3" caption="Full Version"/>
</Web>
</Preview>
<CustomField customKey="Studio" value="Manchester Studio 3"/>
<CustomField customKey="Rating" value="9.8"/>
<CustomField customKey="SeeAlso" value="5183,1235,8532,4345"/>
</ContentDescriptor>
</ContentSubmission>
|
具有单独预览文件的内容
以下示例说明了使用单独预览文件而不是其本身的内容项。ZIP 文件包含内容文件 Lullaby_2_1.mid(用作预览的原始内容项)和预览文件 preview/Lullaby_2_1_Short.mid。ZIP 文件还包含 meta/ContentSubmission.xml 文件。
代码示例 A-3 将单独文件作为预览的内容项
<?xml version="1.0" encoding="UTF-8"?>
<ContentSubmission>
<Action value="New"/>
<ContentDescriptor>
<ContentType>ringtone</ContentType>
<EditionName>Lullaby2.1</EditionName>
<Version>2.1</Version>
<Preview>
<Wap>
<File src="/preview/LullabySample_2_1_Short.mid" caption="Short Version"/>
</Wap>
<Web>
<File src="/preview/LullabySample_2_1_Short.mid" caption="Hear a short version of the lullaby"/>
</Web>
</Preview>
<CustomField customKey="Rating" value="9.8"/>
</ContentDescriptor>
<WebDescriptor>
<Category>Home:Entertainment:Music</Category>
<WebGroup>
<DisplayName>Lullaby</DisplayName>
<ShortDescription>Memories every time your phone rings</ShortDescription>
<LongDescription>Bring back memories of gentler days every time your phone rings</LongDescription>
</WebGroup>
<CustomField customKey="Artist" value="The Cure"/>
</WebDescriptor>
</ContentSubmission>
|
具有单独预览文件的版本
以下示例说明了使用单独预览文件而不是其本身的版本。ZIP 文件包含内容文件 Lullaby_2_2.mid(用作预览的原始内容项)以及预览文件 preview/Lullaby_2_2_Short.mid 和 preview/Lullaby_2_2_Short.mp3。ZIP 文件还包含 meta/ContentSubmission.xml 文件。
代码示例 A-4 将单独文件作为预览并具有用于 Web 的不同预览的版本
<?xml version="1.0" encoding="UTF-8"?>
<ContentSubmission>
<Action value="Add">
<EditionName>Lullaby2.1</EditionName>
</Action>
<ContentDescriptor>
<ContentType>ringtone</ContentType>
<EditionName>Lullaby2.2</EditionName>
<Version>2.2</Version>
<Preview>
<Wap>
<File src="/preview/LullabySample_2_2_Short.mid" caption="Short Version"/>
</Wap>
<Web>
<File src="/preview/LullabySample_2_2_Short.mp3" caption="Short Version"/>
</Web>
</Preview>
<CustomField customKey="Studio" value="Manchester Studio 3"/>
<CustomField customKey="Rating" value="9.8"/>
<CustomField customKey="SeeAlso" value="5183,1235,8532,4345"/>
<CustomField customKey="Featured" value="true"/>
<CustomField customKey="SimilarArtists" value="VHS or Beta, Siouxie and the Banshees"/>
<CustomField customKey="First Release Format" value="On Vinyl"/>
<CustomField customKey="First Release Date" value="i1989-05-02 00:00:00"/>
<CustomField customKey="ASIN" value="B000002H70"/>
<CustomField customKey="SalesRank" value="1248"/>
<CustomField customKey="Downloads Today" value="34"/>
</ContentDescriptor>
</ContentSubmission>
|
具有多个预览文件的内容
以下示例说明了具有多个预览文件的 MIDlet 内容项。ZIP 文件包含内容文件 GreatGame_3_1.jad 和 GreatGame_3_1.jar 以及预览文件 preview/GreatGameTitle.jpg 和 preview/GreatGamePlay.jpg。ZIP 文件还包含 meta/ContentSubmission.xml 文件。
代码示例 A-5 具有多个预览的内容项
<?xml version="1.0" encoding="UTF-8"?>
<ContentSubmission>
<Action value="New"/>
<ContentDescriptor>
<ContentType>midlet</ContentType>
<EditionName>GreatGame3.1</EditionName>
<Version>3.1</Version>
<Preview>
<Wap>
<File src="/preview/GreatGameTitle.jpg" caption="Title Screen"/>
<File src="/preview/GreatGamePlay.jpg" caption="Play Screen"/>
</Wap>
<Web>
<File src="/preview/GreatGameTitle.jpg" caption="Title Screen"/>
<File src="/preview/GreatGamePlay.jpg" caption="Play Screen"/>
</Web>
</Preview>
</ContentDescriptor>
<WebDescriptor>
<Category>Home:Entertainment:Games</Category>
<WebGroup>
<DisplayName>Great Game</DisplayName>
<ShortDescription>Play a great game</ShortDescription>
<LongDescription>Have a great time playing a great game</LongDescription>
</WebGroup>
</WebDescriptor>
</ContentSubmission>
|
具有多个预览文件的版本
以下示例说明了具有多个不同格式的预览文件的 MIDlet 内容项版本。ZIP 文件包含内容文件 GreatGame_3_2.jad 和 GreatGame_3_2.jar。它还包含以下预览文件:
- preview/GreatGameTitle.jpg
- preview/GreatGamePlay.jpg
- preview/GreatGameTitle.gif
- preview/GreatGamePlayAnimated.gif
ZIP 文件还包含 meta/ContentSubmission.xml 文件。
代码示例 A-6 具有多个预览的版本
<?xml version="1.0" encoding="UTF-8"?>
<ContentSubmission>
<Action value="Add">
<EditionName>GreatGame3.1</EditionName>
</Action>
<ContentDescriptor>
<ContentType>ringtone</ContentType>
<EditionName>GreatGame3.2</EditionName>
<Version>3.2</Version>
<Preview>
<Wap>
<File src="/preview/GreatGameTitle.jpg" caption="Title Screen"/>
<File src="/preview/GreatGamePlay.jpg" caption="Play Screen"/>
</Wap>
<Web>
<File src="/preview/GreatGameTitle.gif" caption="Title Screen"/>
<File src="/preview/GreatGamePlayAnimated.gif" caption="Animated Play Screen"/>
</Web>
</Preview>
</ContentDescriptor>
</ContentSubmission>
|
Sun Java System Content Delivery Server 内容开发指南
|
820-5376-10
|
|
版权所有 © 2008, Sun Microsystems, Inc. 保留所有权利