Examples of addResource()


Examples of net.sourceforge.processdash.tool.bridge.ResourceListing.addResource()

                for (int i = 0; i < resourceElems.getLength(); i++) {
                    Element res = (Element) resourceElems.item(i);
                    String name = res.getAttribute(NAME_ATTR);
                    long mod = Long.parseLong(res.getAttribute(MOD_TIME_ATTR));
                    long sum = Long.parseLong(res.getAttribute(CHECKSUM_ATTR));
                    result.addResource(name, mod, sum);
                }
            }
            return result;
        } catch (Exception e) {
            IOException ioe = new IOException(
View Full Code Here

Examples of nl.siegmann.epublib.domain.Book.addResource()

    book.getMetadata().addIdentifier(new Identifier(Identifier.Scheme.ISBN, "987654321"));
    book.getMetadata().addAuthor(new Author("Joe", "Tester"));
    book.setCoverPage(new Resource(this.getClass().getResourceAsStream("/book1/cover.html"), "cover.html"));
    book.setCoverImage(new Resource(this.getClass().getResourceAsStream("/book1/cover.png"), "cover.png"));
    book.addSection("Chapter 1", new Resource(this.getClass().getResourceAsStream("/book1/chapter1.html"), "chapter1.html"));
    book.addResource(new Resource(this.getClass().getResourceAsStream("/book1/book1.css"), "book1.css"));
    TOCReference chapter2 = book.addSection("Second chapter", new Resource(this.getClass().getResourceAsStream("/book1/chapter2.html"), "chapter2.html"));
    book.addResource(new Resource(this.getClass().getResourceAsStream("/book1/flowers_320x240.jpg"), "flowers.jpg"));
    book.addSection(chapter2, "Chapter 2 section 1", new Resource(this.getClass().getResourceAsStream("/book1/chapter2_1.html"), "chapter2_1.html"));
    book.addSection("Chapter 3", new Resource(this.getClass().getResourceAsStream("/book1/chapter3.html"), "chapter3.html"));
    return book;
View Full Code Here

Examples of org.ajax4jsf.resource.InternetResourceBuilder.addResource()

      InternetResource resource = resourceBuilder.getResource(key);
      this.setKey(resource.getKey());
    } catch(ResourceNotFoundException ex){
      // If script not registered, append it to builder.
      setLastModified(new Date(resourceBuilder.getStartTime()));
      resourceBuilder.addResource(key,this);
    }
    String script ;
    if (getJavaScript().startsWith("/")) {
      // remove lead / for classloader covention.
      script = getJavaScript().substring(1);
View Full Code Here

Examples of org.apache.avalon.excalibur.monitor.Monitor.addResource()

                    public void run()
                    {
                        while ( true )
                        {
                            monitor.addResource( resource );
                            monitor.removeResource( resource );
                        }
                    }
                };
                thread.start();
View Full Code Here

Examples of org.apache.axis2.transport.testkit.tests.TestResourceSet.addResource()

        TestResourceSet[] endpointResourceSets = new TestResourceSet[endpointCount];
        try {
            for (int i=0; i<endpointCount; i++) {
                TestResourceSet clientResourceSet = new TestResourceSet(getResourceSet());
                AsyncChannel channel = channels[i];
                clientResourceSet.addResource(channel);
                AxisAsyncTestClient client = new AxisAsyncTestClient(false);
                clientResourceSet.addResource(client);
                clientResourceSet.setUp();
                clientResourceSets[i] = clientResourceSet;
               
View Full Code Here

Examples of org.apache.catalina.deploy.NamingResources.addResource()

                ("Invalid resource name - already exists'" + resourceName + "'");
        }
        resource = new ContextResource();
        resource.setName(resourceName);
        resource.setType(type);
        nresources.addResource(resource);

        // Return the corresponding MBean name
        ManagedBean managed = Registry.getRegistry(null, null)
            .findManagedBean("ContextResource");
        ObjectName oname =
View Full Code Here

Examples of org.apache.catalina.deploy.NamingResourcesImpl.addResource()

            resource.setProperty(Constants.FACTORY, ResourceFactory.class.getName());
            resource.setProperty(NamingUtil.NAME, name);
            resource.setType(info.className);
            resource.setAuth("Container");

            naming.addResource(resource);
        }
    }

    private static class Resource implements NamingUtil.Resource {
        private final ContextResource contextResource;
View Full Code Here

Examples of org.apache.commons.validator.Validator.addResource()

            // Create a validator with the ValidateBean actions for the bean
            // we're interested in.
            Validator validator = new Validator(resources, "ValidateBean");

            // Tell the validator which bean to validate against.
            validator.addResource(Validator.BEAN_KEY, bean);

            ValidatorResults results = null;

            // Run the validation actions against the bean.  Since all of the properties
            // are null, we expect them all to error out except for street2, which has
View Full Code Here

Examples of org.apache.felix.bundlerepository.impl.RepositoryImpl.addResource()

                try
                {
                    ResourceImpl resource = ( ResourceImpl ) dmh.createResource( file.toURI().toURL() );
                    if ( resource != null )
                    {
                        repository.addResource( resource );
                        doTemplate( mavenRepoUri, file, resource );
                        log.info( "Adding resource: " + file );
                    }
                    else
                    {
View Full Code Here

Examples of org.apache.fop.pdf.PDF3DStream.addResource()

        ImageBuffered img = new ImageBuffered(imgInfo, bi, null);
        PDFImage pdfimage = new ImageRenderedAdapter(img, resName);
        PDFXObject xobj = pdfDoc.addImage(resContext, pdfimage);

        PDF3DStream stream = annot.getStreamSafely();
        stream.addResource(resName, xobj);

        // load JavaScript library code once (per 3D stream)
        // this is because the DOM element could exist multiple times within
        // the extension section.
        if (!libLoadedList.contains(stream.referencePDF())) {
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.