Examples of RepositoryFactory


Examples of org.apache.sling.ide.transport.RepositoryFactory

            throw new CoreException(new Status(Status.ERROR, Activator.PLUGIN_ID, e.getMessage(), e));
        }
    }

    public static void stopRepository(IServer server, IProgressMonitor monitor) throws CoreException {
        RepositoryFactory repository = Activator.getDefault().getRepositoryFactory();
        try {
            RepositoryInfo repositoryInfo = getRepositoryInfo(server, monitor);
            repository.disconnectRepository(repositoryInfo);
        } catch (URISyntaxException e) {
            throw new CoreException(new Status(Status.ERROR, Activator.PLUGIN_ID, e.getMessage(), e));
        } catch (RuntimeException e) {
            throw new CoreException(new Status(Status.ERROR, Activator.PLUGIN_ID, e.getMessage(), e));
        }

Examples of org.openrdf.repository.config.RepositoryFactory

    }
    assert config instanceof FederationConfig;
    FederationConfig cfg = (FederationConfig)config;
    Federation sail = new Federation();
    for (RepositoryImplConfig member : cfg.getMembers()) {
      RepositoryFactory factory = RepositoryRegistry.getInstance().get(member.getType());
      if (factory == null) {
        throw new StoreConfigException("Unsupported repository type: " + config.getType());
      }
      sail.addMember(factory.getRepository(member));
    }
    sail.setLocalPropertySpace(cfg.getLocalPropertySpace());
    sail.setDistinct(cfg.isDistinct());
    sail.setReadOnly(cfg.isReadOnly());
    return sail;

Examples of org.openrdf.repository.config.RepositoryFactory

   *         configuration data.
   */
  private Repository createRepositoryStack(RepositoryImplConfig config)
    throws StoreConfigException
  {
    RepositoryFactory factory = RepositoryRegistry.getInstance().get(config.getType());
    if (factory == null) {
      throw new StoreConfigException("Unsupported repository type: " + config.getType());
    }

    Repository repository = factory.getRepository(config);

    if (config instanceof DelegatingRepositoryImplConfig) {
      RepositoryImplConfig delegateConfig = ((DelegatingRepositoryImplConfig)config).getDelegate();

      Repository delegate = createRepositoryStack(delegateConfig);

Examples of org.openrdf.repository.config.RepositoryFactory

   *         configuration data.
   */
  private Repository createRepositoryStack(RepositoryImplConfig config)
    throws RepositoryConfigException
  {
    RepositoryFactory factory = RepositoryRegistry.getInstance().get(config.getType());
    if (factory == null) {
      throw new RepositoryConfigException("Unsupported repository type: " + config.getType());
    }

    Repository repository = factory.getRepository(config);

    if (config instanceof DelegatingRepositoryImplConfig) {
      RepositoryImplConfig delegateConfig = ((DelegatingRepositoryImplConfig)config).getDelegate();

      Repository delegate = createRepositoryStack(delegateConfig);

Examples of org.sonatype.nexus.client.core.spi.subsystem.repository.RepositoryFactory

  }

  @SuppressWarnings("unchecked")
  private <R extends Repository> R convert(final String id, final RepositoryBaseResource rbs) {
    int currentScore = 0;
    RepositoryFactory factory = null;
    for (RepositoryFactory repositoryFactory : repositoryFactories) {
      final int score = repositoryFactory.canAdapt(rbs);
      if (score > currentScore) {
        currentScore = score;
        factory = repositoryFactory;
      }
    }

    if (factory == null) {
      throw new IllegalStateException(
          format("No repository factory found for repository with id %s", id)
      );
    }

    return (R) factory.adapt(getNexusClient(), rbs);
  }
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.