public void setOnElement(Element element) { element.setTextContent(toString()); for (Property<DIDLAttribute> attr : attributes) { element.setAttributeNS( attr.getValue().getNamespaceURI(), attr.getValue().getPrefix() + ':' + attr.getDescriptorName(), attr.getValue().getValue()); } }
form.addLabelAndSelectableLastField("DC Contributor:", item.getFirstProperty(DIDLObject.Property.DC.CONTRIBUTOR.class).toString(), this); form.addLabelAndSelectableLastField("DC Date:", item.getFirstProperty(DIDLObject.Property.DC.DATE.class).toString(), this); form.addLabelAndSelectableLastField("DC Description:", item.getFirstProperty(DIDLObject.Property.DC.DESCRIPTION.class).toString(), this); form.addLabelAndSelectableLastField("DC Language:", item.getFirstProperty(DIDLObject.Property.DC.LANGUAGE.class).toString(), this); form.addLabelAndSelectableLastField("DC Publisher:", item.getFirstProperty(DIDLObject.Property.DC.PUBLISHER.class).toString(), this); form.addLabelAndSelectableLastField("DC Relation:", item.getFirstProperty(DIDLObject.Property.DC.RELATION.class).toString(), this); form.addLabelAndSelectableLastField("DC Rights:", item.getFirstProperty(DIDLObject.Property.DC.RELATION.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Artist:", item.getFirstProperty(DIDLObject.Property.UPNP.ARTIST.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Album:", item.getFirstProperty(DIDLObject.Property.UPNP.ALBUM.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Album Art URI:", item.getFirstProperty(DIDLObject.Property.UPNP.ALBUM_ART_URI.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Lyrics URI:", item.getFirstProperty(DIDLObject.Property.UPNP.LYRICS_URI.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Genre:", item.getFirstProperty(DIDLObject.Property.UPNP.GENRE.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Icon:", item.getFirstProperty(DIDLObject.Property.UPNP.ICON.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Long Description:", item.getFirstProperty(DIDLObject.Property.UPNP.LONG_DESCRIPTION.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Playlist:", item.getFirstProperty(DIDLObject.Property.UPNP.PLAYLIST.class).toString(), this);
form.addLabelAndSelectableLastField("UPnP Icon:", container.getFirstProperty(DIDLObject.Property.UPNP.ICON.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Storage Free:", container.getFirstProperty(DIDLObject.Property.UPNP.STORAGE_FREE.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Max Partition:", container.getFirstProperty(DIDLObject.Property.UPNP.STORAGE_MAX_PARTITION.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Storage Total:", container.getFirstProperty(DIDLObject.Property.UPNP.STORAGE_TOTAL.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Storage Used:", container.getFirstProperty(DIDLObject.Property.UPNP.STORAGE_USED.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Storage Medium:", container.getFirstProperty(DIDLObject.Property.UPNP.STORAGE_MEDIUM.class).toString(), this); form.addLabelAndSelectableLastField("UPnP Album Art URI:", container.getFirstProperty(DIDLObject.Property.UPNP.ALBUM_ART_URI.class).toString(), this);
private ArrayList<DIDLObjectDisplay> buildContentList(String parent, DIDLContent didl) { ArrayList<DIDLObjectDisplay> list = new ArrayList<DIDLObjectDisplay>(); if (parent != null) list.add(new DIDLObjectDisplay(new ClingDIDLParentContainer(parent))); for (Container item : didl.getContainers()) { list.add(new DIDLObjectDisplay(new ClingDIDLContainer(item))); Log.v(TAG, "Add container : " + item.getTitle()); } for (Item item : didl.getItems()) { ClingDIDLItem clingItem = null; if(item instanceof VideoItem) clingItem = new ClingVideoItem((VideoItem)item); else if(item instanceof AudioItem) clingItem = new ClingAudioItem((AudioItem)item); else if(item instanceof ImageItem) clingItem = new ClingImageItem((ImageItem)item); else clingItem = new ClingDIDLItem(item); list.add(new DIDLObjectDisplay(clingItem)); Log.v(TAG, "Add item : " + item.getTitle()); for (DIDLObject.Property p : item.getProperties()) Log.v(TAG, p.getDescriptorName() + " " + p.toString()); } return list; }
public void setOnElement(Element element) { element.setTextContent(toString()); for (Property<DIDLAttribute> attr : attributes) { element.setAttributeNS( attr.getValue().getNamespaceURI(), attr.getValue().getPrefix() + ':' + attr.getDescriptorName(), attr.getValue().getValue()); } }
public void setOnElement(Element element) { element.setTextContent(toString()); for (Property<DIDLAttribute> attr : attributes) { element.setAttributeNS( attr.getValue().getNamespaceURI(), attr.getValue().getPrefix() + ':' + attr.getDescriptorName(), attr.getValue().getValue()); } }