curHandler.xmlBlob.setBlob(blob.toString());
curHandler.xmlBlob.setBlob(blob.toString());
curHandler.xmlBlob.setBlob(blob.toString());
curHandler.xmlBlob.setBlob(blob.toString());
curHandler.xmlBlob.setBlob(blob.toString());
curHandler.xmlBlob.setBlob(blob.toString());
@Override public Content parseContent(Element element) { checkNotNull(element); String href = element.getAttribute("href"); if (href.equals("")) { StringBuilder builder = new StringBuilder(); NodeList nodeList = element.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node child = nodeList.item(i); if (child.getNodeType() == Node.ELEMENT_NODE) { builder.append(xmlElementOf((Element) child)); } else if (child.getNodeType() == Node.TEXT_NODE) { builder.append(child.getNodeValue()); } } XmlBlob xmlBlob = new XmlBlob(); xmlBlob.setBlob(builder.toString()); TextContent content = new TextContent(); content.setContent(new XhtmlTextConstruct(xmlBlob)); return content; } OutOfLineContent content = new OutOfLineContent(); content.setUri(href); return content; }
private void setPublicState(VideoEntry entry) throws Exception { YouTubeMediaGroup mediaGroup = entry.getMediaGroup(); if (mediaGroup.isPrivate()) { System.out.println("Video is private"); mediaGroup.setPrivate(false); } XmlBlob entryBlob = entry.getXmlBlob(); entryBlob.setBlob("<yt:accessControl action='list' permission='allowed'/>"); entry.setXmlBlob(entryBlob); entry.update(); }
private void setUnlistedState(VideoEntry entry) throws Exception { YouTubeMediaGroup mediaGroup = entry.getMediaGroup(); if (mediaGroup.isPrivate()) { System.out.println("Video is private"); mediaGroup.setPrivate(false); } XmlBlob xmlBlob = entry.getXmlBlob(); xmlBlob.setBlob("<yt:accessControl action='list' permission='denied'/>"); entry.setXmlBlob(xmlBlob); entry.update(); }
/** * Sets the content of the given entry to the given String. */ public static void setContent(BaseContentEntry<?> entry, String content) { XmlBlob blob = new XmlBlob(); blob.setBlob(content); TextConstruct textConstruct = new XhtmlTextConstruct(blob); entry.setContent(textConstruct); }
blob.setBlob(content); TextConstruct textConstruct = new XhtmlTextConstruct(blob); entry.setContent(textConstruct);
OMElement infoElement = (OMElement) extendedPropertyChildIterator.next(); XmlBlob xmlBlob = new XmlBlob(); xmlBlob.setBlob(infoElement.toString()); extendedProperty.setXmlBlob(xmlBlob); } else {
cumulative.setBlob(w.toString()); return cumulative;
cumulative.setBlob(w.toString()); return cumulative;
cumulative.setBlob(w.toString()); return cumulative;