Examples of addResource()


Examples of org.teleal.cling.support.model.item.MusicTrack.addResource()

        System.err.println("Track "+trackResultItem.getName()+" ("+trackResultItem.getId()+") has "+
            trackItem.getPlayableElements().size()+
            " playable elements item, no support yet for ");
      }
      upnpResource.setValue(trackItem.getPlayableElements().iterator().next().getUri());
      upnpTrack.addResource(upnpResource);
    }
    return upnpTrack;

// unnecessary, initialized by constructor
//    upnpTrack.setClazz(new org.teleal.cling.support.model.DIDLObject.Class("object.item.audioItem.musicTrack"));
View Full Code Here

Examples of org.teleal.cling.support.model.item.Photo.addResource()

          upnpPhoto.setWriteStatus(WriteStatus.NOT_WRITABLE);
          upnpPhoto.setCreator("LastFM");
          upnpPhoto.setId(objectID+"/"+browsedItem.getId());
          upnpPhoto.setClazz(new org.teleal.cling.support.model.DIDLObject.Class("object.item.imageItem.photo"));
          Res url = new Res();
          upnpPhoto.addResource(url);
          url.setValue(smdImage.getUrl());
          if(url.getValue().endsWith(".png")) {
            url.setProtocolInfo(new ProtocolInfo("http-get:*:image/png:DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS="));
          } else if(url.getValue().endsWith(".jpg")) {
            url.setProtocolInfo(new ProtocolInfo("http-get:*:image/jpeg:DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS="));
 
View Full Code Here

Examples of org.vaadin.alump.fancylayouts.FancyImage.addResource()

        image.setHeight("281px");

        // Setting images used
        final List<Resource> resources = getImageResources();
        for (Resource resource : resources) {
            image.addResource(resource);
        }

        // Setting slideshow timeout to 3 seconds (3000 millisecs)
        image.setSlideShowTimeout(3000);
View Full Code Here

Examples of org.woped.core.model.PetriNetModelProcessor.addResource()

                  .getResourceArray();
              ResourceModel resourceModelTemp;
              for (int m = 0; m < resources.length; m++) {
                resourceModelTemp = new ResourceModel(
                    resources[m].getName());
                currentPetrinet.addResource(resourceModelTemp);
              }

              for (int n = 0; n < resourceMaps.length; n++) {
                currentPetrinet.addResourceMapping(
                    resourceMaps[n].getResourceClass(),
View Full Code Here

Examples of org.wso2.carbon.application.deployer.config.RegistryConfig.addResource()

        // read Item elements under Resources
        Iterator itemItr = resourcesElement.getChildrenWithLocalName(RegistryConfig.ITEM);
        while (itemItr.hasNext()) {
            OMElement itemElement = (OMElement) itemItr.next();
            regConfig.addResource(readChildText(itemElement, RegistryConfig.PATH),
                    readChildText(itemElement, RegistryConfig.FILE),
                    readChildText(itemElement, RegistryConfig.REGISTRY_TYPE));
        }

        // read Collection elements under Resources
View Full Code Here

Examples of org.wso2.carbon.dashboard.mgt.theme.ui.GSThemeMgtClient.addResource()

                }
                return false;
            }
            DataHandler dataHandler = fileItemData.getDataHandler();

            client.addResource(
                    calcualtePath(parentPath, resourceName), mediaType, description, dataHandler,
                    symlinkLocation);

            response.setContentType("text/html; charset=utf-8");
            String msg = "Successfully uploaded content.";
View Full Code Here

Examples of org.wso2.carbon.dataservices.core.engine.DataService.addResource()

      }

      /* add the resources */
      for (Iterator<OMElement> itr = dbsElement.getChildrenWithName(
          new QName(DBSFields.RESOURCE)); itr.hasNext();) {
        dataService.addResource(ResourceFactory.createResource(dataService,
            itr.next()));
      }
   
      /* init the data service object */
      dataService.init();
 
View Full Code Here

Examples of org.wso2.carbon.registry.resource.services.ResourceAdminServiceStub.addResource()

            // enable MTOM and set the previous cookie
            stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
            stub._getServiceClient().getOptions().setProperty(HTTPConstants.COOKIE_STRING, sessionCookie);
            DataHandler dataHandler = new DataHandler(new FileDataSource(filepath));
            // adding the resource
            stub.addResource(path, mediaType, description, dataHandler,null);
        } catch (Exception ex){
            ex.printStackTrace();
        }
    }
}
View Full Code Here

Examples of org.wso2.carbon.registry.resource.stub.ResourceAdminServiceStub.addResource()

        try {
            resourceAdminServiceStub.delete("/_system/config/xslt");
            resourceAdminServiceStub.addCollection("/_system/config/", "xslt", "",
                    "Contains test XSLT files");
            resourceAdminServiceStub.addResource(
                    "/_system/config/xslt/transform_back.xslt", "application/xml", "xslt files",
                    new DataHandler(new URL("file:///" + getClass().getResource("/transform_back.xslt").getPath())), null);
            Thread.sleep(1000);
            resourceAdminServiceStub.addResource(
                    "/_system/config/xslt/transform.xslt", "application/xml", "xslt files",
View Full Code Here

Examples of org.wso2.carbon.registry.resource.ui.clients.ResourceServiceClient.addResource()

                buildUIError(request, response, webContext, errorRedirect, msg);
                return false;
            }
            DataHandler dataHandler = fileItemData.getDataHandler();

            client.addResource(
                    calcualtePath(parentPath, resourceName), mediaType, description, dataHandler,
                    symlinkLocation);

            response.setContentType("text/html; charset=utf-8");
            String msg = "Successfully uploaded content.";
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.