Examples of ContentItem


Examples of org.pentaho.reporting.libraries.repository.ContentItem

    final PngEncoder encoder = new PngEncoder(image,
        PngEncoder.ENCODE_ALPHA, PngEncoder.FILTER_NONE, 5);
    final byte[] data = encoder.pngEncode();

    // write the encoded picture ...
    final ContentItem dataFile = dataLocation.createItem
        (dataNameGenerator.generateName("picture", "image/png"));

    // a png encoder is included in JCommon ...
    final OutputStream out = new BufferedOutputStream(dataFile.getOutputStream());
    out.write(data);
    out.flush();
    out.close();

    return urlRewriter.rewrite(documentContentItem, dataFile);
View Full Code Here

Examples of org.rometools.feed.module.content.ContentItem

            Element items = new Element("items", CONTENT_NS);
            Element bag = new Element("Bag", RDF_NS);
            items.addContent(bag);

            for (int i = 0; i < contentItems.size(); i++) {
                ContentItem contentItem = (ContentItem) contentItems.get(i);
                Element li = new Element("li", RDF_NS);
                Element item = new Element("item", CONTENT_NS);

                if (contentItem.getContentAbout() != null) {
                    Attribute about = new Attribute("about", contentItem.getContentAbout(), RDF_NS);
                    item.setAttribute(about);
                }

                if (contentItem.getContentFormat() != null) {
                    //System.out.println( "Format");
                    Element format = new Element("format", CONTENT_NS);
                    Attribute formatResource = new Attribute("resource", contentItem.getContentFormat(), RDF_NS);
                    format.setAttribute(formatResource);

                    item.addContent(format);
                }

                if (contentItem.getContentEncoding() != null) {
                    //System.out.println( "Encoding");
                    Element encoding = new Element("encoding", CONTENT_NS);
                    Attribute encodingResource = new Attribute("resource", contentItem.getContentEncoding(), RDF_NS);
                    encoding.setAttribute(encodingResource);
                    item.addContent(encoding);
                }

                if (contentItem.getContentValue() != null) {
                    Element value = new Element("value", RDF_NS);

                    if (contentItem.getContentValueParseType() != null) {
                        Attribute parseType = new Attribute("parseType", contentItem.getContentValueParseType(), RDF_NS);
                        value.setAttribute(parseType);
                    }

                    if (contentItem.getContentValueNamespaces() != null) {
                        List namespaces = contentItem.getContentValueNamespaces();

                        for (int ni = 0; ni < namespaces.size(); ni++) {
                            value.addNamespaceDeclaration((Namespace) namespaces.get(ni));
                        }
                    }

                    List detached = new ArrayList();

                    for (int c = 0;
                            c < contentItem.getContentValueDOM().size(); c++) {
                        detached.add(((Content) ((Content) contentItem.getContentValueDOM().get(c)).clone()).detach());
                    }

                    value.setContent(detached);
                    item.addContent(value);
                } // end value
View Full Code Here

Examples of org.rstudio.studio.client.workbench.views.source.model.ContentItem

   }
  
   public void onShowContent(ShowContentEvent event)
   {
      ensureVisible(true);
      ContentItem content = event.getContent();
      server_.newDocument(
            FileTypeRegistry.URLCONTENT.getTypeId(),
            null,
            (JsObject) content.cast(),
            new SimpleRequestCallback<SourceDocument>("Show")
            {
               @Override
               public void onResponseReceived(SourceDocument response)
               {
View Full Code Here

Examples of org.springsource.ide.eclipse.commons.content.core.ContentItem

    this.template = template;
    this.shell = shell;
  }

  public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
    ContentItem selectedItem = template.getItem();
    if (!selectedItem.isLocal() && selectedItem.getRemoteDescriptor().getUrl() == null) {
      String message = NLS.bind("In the descriptor file for ''{0}'', the URL to the project ZIP is missing.",
          selectedItem.getName());
      throw new InvocationTargetException(new CoreException(new Status(IStatus.ERROR, WizardPlugin.PLUGIN_ID,
          message)));
    }

    try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.