Examples of createResource()


Examples of org.joggito.core.descriptors.RDFDescriptorFactory.createResource()

  @BeforeClass
  public static void setUpClass() {
    Session session = SessionManager.getInstance().createSession("default");
    RDFDescriptorFactory df = new RDFDescriptorFactory(session);
    session.getMetaContext().addDescriptor(df.createResource(Person.class));
    factory = new BeanFactory(session);
  }

  @Test
  public void convertingResourceToBean() throws Exception {
View Full Code Here

Examples of org.jrdf.graph.GraphElementFactory.createResource()

        Graph fooGraph = JRDF_FACTORY.getNewGraph("foo");
        Graph barGraph = JRDF_FACTORY.getNewGraph("bar");
        GraphElementFactory barElementFactory = barGraph.getElementFactory();
        URI uri1 = URI.create("urn:hello");
        URI uri2 = URI.create("urn:there");
        Resource resource = barElementFactory.createResource(uri1);
        resource.addValue(uri1, uri2);
        resource.addValue(uri2, uri2);
        GraphElementFactory fooElementFactory = fooGraph.getElementFactory();
        Resource blankResource = fooElementFactory.createResource();
        blankResource.addValue(uri1, uri2);
View Full Code Here

Examples of org.linkedin.util.io.resource.internal.FileResourceProvider.createResource()

    }
    catch(IOException e)
    {
      throw new RuntimeException(e);
    }
    return frp.createResource(path);
  }
}
View Full Code Here

Examples of org.linkedin.util.io.resource.internal.JarResourceProvider.createResource()

    try
    {
      ResourceProvider provider =
        new JarResourceProvider(factory.createResource(uri));

      return provider.createResource("/").createRelative(path);
    }
    catch(UnsupportedURIException e)
    {
      URISyntaxException ex = new URISyntaxException(uri.toString(), "cannot create resource");
      ex.initCause(e);
View Full Code Here

Examples of org.linkedin.util.io.resource.internal.ResourceProvider.createResource()

    try
    {
      ResourceProvider provider =
        new JarResourceProvider(factory.createResource(uri));

      return provider.createResource("/").createRelative(path);
    }
    catch(UnsupportedURIException e)
    {
      URISyntaxException ex = new URISyntaxException(uri.toString(), "cannot create resource");
      ex.initCause(e);
View Full Code Here

Examples of org.linkedin.util.io.resource.internal.SchemeURIResourceFactory.createResource()

    SchemeURIResourceFactory factory = _factories.get(uri.getScheme());
    if(factory == null)
      throw new UnsupportedURIException("unsupported scheme " + uri.getScheme());

    return factory.createResource(uri, this);
  }
}
View Full Code Here

Examples of org.locationtech.udig.catalog.TemporaryResourceFactory.createResource()

                String attribute = element.getAttribute("descriptorClass"); //$NON-NLS-1$
                Class< ? > c = descriptor.getClass().getClassLoader().loadClass(attribute);
                if (c.isAssignableFrom(descriptor.getClass())) {
                    TemporaryResourceFactory fac = (TemporaryResourceFactory) element
                            .createExecutableExtension("factory"); //$NON-NLS-1$
                    return fac.createResource(descriptor);
                }
            } catch (ClassNotFoundException e) {
                // thats fine. Lets allow tracing to get this.
                CatalogPlugin.trace("Trying to match classes", e); //$NON-NLS-1$
            } catch (Exception e) {
View Full Code Here

Examples of org.rhq.core.clientapi.agent.inventory.ResourceFactoryAgentService.createResource()

            timeout);

        try {
            AgentClient agentClient = agentManager.getAgentClient(agent);
            ResourceFactoryAgentService resourceFactoryAgentService = agentClient.getResourceFactoryAgentService();
            resourceFactoryAgentService.createResource(request);

            return persistedHistory;
        } catch (Exception e) {
            LOG.error("Error while sending create resource request to agent service", e);
View Full Code Here

Examples of org.rhq.enterprise.server.resource.ResourceFactoryManagerLocal.createResource()

        Resource parentResource = EnterpriseFacesContextUtility.getResource();
        Configuration resourceConfiguration = getConfiguration();

        try {
            ResourceFactoryManagerLocal resourceFactoryManager = LookupUtil.getResourceFactoryManager();
            resourceFactoryManager.createResource(user, parentResource.getId(), getResourceTypeId(), getResourceName(),
                pluginConfiguration, resourceConfiguration);
        } catch (Exception e) {
            String errorMessages = ThrowableUtil.getAllMessages(e);
            FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR,
                "Failed to send create resource request to agent. Cause: " + errorMessages);
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.CreateResourceDelegate.createResource()

                     }
                  }
                  return results;
               }
            };
            report = delegate.createResource(report);
        } else {

            report = super.createResource(report);
        }
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.