本文整理汇总了Java中org.fourthline.cling.support.model.DIDLObject.Property方法的典型用法代码示例。如果您正苦于以下问题:Java DIDLObject.Property方法的具体用法?Java DIDLObject.Property怎么用?Java DIDLObject.Property使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.fourthline.cling.support.model.DIDLObject
的用法示例。
在下文中一共展示了DIDLObject.Property方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startItem
import org.fourthline.cling.support.model.DIDLObject; //导入方法依赖的package包/类
@Override
protected void startItem(PlayableItem playableItem, Object loadedItem) {
// Communicating with the activity is only possible after the activity
// is started
// if we send an broadcast event to early the activity won't be up
// because there is no known way to query the activity state
// we are sending the command delayed
DIDLObject.Property<URI> albumArtUriProperty = playableItem.getItem() == null ? null : playableItem.getItem().getFirstProperty(DIDLObject.Property.UPNP.ALBUM_ART_URI.class);
albumArtUri = (albumArtUriProperty == null) ? null : albumArtUriProperty.getValue();
commandExecutionTimer = new Timer();
commandExecutionTimer.schedule(new TimerTask() {
@Override
public void run() {
Intent intent = new Intent();
intent.setAction(BackgroundMusicBroadcastReceiver.ACTION_PLAY);
getContext().sendBroadcast(intent);
}
}, 600L);
}
示例2: appendProperties
import org.fourthline.cling.support.model.DIDLObject; //导入方法依赖的package包/类
protected void appendProperties(Document descriptor, Element parent, DIDLObject object, String prefix,
Class<? extends DIDLObject.Property.NAMESPACE> namespace,
String namespaceURI) {
for (DIDLObject.Property<Object> property : object.getPropertiesByNamespace(namespace)) {
Element el = descriptor.createElementNS(namespaceURI, prefix + ":" + property.getDescriptorName());
parent.appendChild(el);
property.setOnElement(el);
}
}
示例3: appendProperties
import org.fourthline.cling.support.model.DIDLObject; //导入方法依赖的package包/类
protected void appendProperties(Document descriptor, Element parent,
DIDLObject object, String prefix,
Class<? extends DIDLObject.Property.NAMESPACE> namespace,
String namespaceURI) {
for (DIDLObject.Property<Object> property : object
.getPropertiesByNamespace(namespace)) {
Element el = descriptor.createElementNS(namespaceURI, prefix + ":"
+ property.getDescriptorName());
parent.appendChild(el);
property.setOnElement(el);
}
}