Examples of Federation


Examples of org.openrdf.sail.federation.Federation

  @Override
  protected Repository createRepository()
    throws IOException
  {
    Federation sail = new Federation();
    sail.addMember(new SailRepository(new MemoryStore()));
    sail.addMember(new SailRepository(new MemoryStore()));
    sail.addMember(new SailRepository(new MemoryStore()));
    return new SailRepository(sail);
  }
View Full Code Here

Examples of org.openrdf.sail.federation.Federation

    throws Exception
  {
    SailRepository ref = new SailRepository(new MemoryStore());
    ref.initialize();
    reference = ref.getConnection();
    Federation federation = new Federation();
    SailRepository repo = new SailRepository(federation);
    repo.initialize();
    federation.addMember(createMember("1"));
    federation.addMember(createMember("2"));
    federation.addMember(createMember("3"));
    federation.setLocalPropertySpace(Arrays.asList("urn:schema:b:", "urn:schema:d:"));
    con = repo.getConnection();
  }
View Full Code Here

Examples of org.openrdf.sail.federation.Federation

  @Override
  protected Sail createSail()
    throws StoreException
  {
    Federation sail = new Federation();
    sail.addMember(new SailRepository(new MemoryStore()));
    sail.addMember(new SailRepository(new MemoryStore()));
    sail.addMember(new SailRepository(new MemoryStore()));
    sail.initialize();
    return sail;
  }
View Full Code Here

Examples of org.openrdf.sail.federation.Federation

    if (!SAIL_TYPE.equals(config.getType())) {
      throw new StoreConfigException("Invalid Sail type: " + config.getType());
    }
    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;
  }
View Full Code Here

Examples of org.openrdf.sail.federation.Federation

        log.info("creating new HTTP repository client for server at {}", serverUrl);

        httpRepository = new HTTPRepository(serverUrl);

        // TODO: would be better to implement a RepositorySail as NotifyingSail wrapper around a repository
        Federation store = new Federation();
        store.addMember(httpRepository);

        return (NotifyingSail)store;
    }
View Full Code Here

Examples of org.xrace.model.Federation

    }
  }

  private void createTestPersonnes()
  {
    final Federation paysCan = getFederationService().findByCode("CAN");
    final Federation paysUsa = getFederationService().findByCode("USA");
    Province provinceQc = getProvinceService().findByCode(paysCan, "QB");

    Personne personne;

    personne = new Personne("Doe", "John", "38 rue St-Joseph", "Quebec",
View Full Code Here

Examples of org.xrace.model.Federation

     * @see wicket.markup.html.form.IChoiceRenderer#getDisplayValue(Object)
     */
    @Override
    public Object getDisplayValue(final Object object)
    {
      final Federation federation = (Federation) object;

      if (federation == null)
      {
        return "Indépendant";
      }

      final Locale locale = getLocale();
      if (locale.getLanguage().equals(Locale.FRENCH.getLanguage()))
      {
        return federation.getPays();
      }
      else
      {
        return federation.getCountry();
      }
    }
View Full Code Here

Examples of org.xrace.model.Federation

{
  @Override
  protected void onSetUpInTransaction() throws Exception
  {
    Personne personne;
    final Federation pays = getFederationService().findByCode("CAN");

    personne = new Personne("Coté", "Marc - André", "pas important",
        "Québec", "G1B 2U8", "455-909-9090", new GregorianCalendar(
            1970, 0, 1).getTime(), "M", pays.getProvinces().get(0),
        pays, pays);

    getPersonneService().save(personne);

    personne = new Personne("Cote", "MarcAndre", "pas important", "Québec",
        "G1B 2U8", "455-909-9090", new GregorianCalendar(1970, 0, 1)
            .getTime(), "M", pays.getProvinces().get(0), pays, pays);

    getPersonneService().save(personne);

    personne = new Personne("Cote", "Marc Andre", "pas important",
        "Québec", "G1B 2U8", "455-909-9090", new GregorianCalendar(
            1970, 0, 1).getTime(), "M", pays.getProvinces().get(0),
        pays, pays);

    getPersonneService().save(personne);

    personne = new Personne("Cote", "Marc Andre", "pas important",
        "Québec", "G1B 2U8", "455-909-9090", new GregorianCalendar(
            1970, 1, 1).getTime(), "M", pays.getProvinces().get(0),
        pays, pays);

    getPersonneService().save(personne);

    personne = new Personne("Lapierre", "Marc - André", "pas important",
        "Québec", "G1B 2U8", "455-909-9090", new GregorianCalendar(
            1970, 0, 1).getTime(), "M", pays.getProvinces().get(0),
        pays, pays);

    getPersonneService().save(personne);

    personne = new Personne("Lapierre", "Marc-André", "pas important",
        "Québec", "G1B 2U8", "455-909-9090", new GregorianCalendar(
            1970, 1, 1).getTime(), "M", pays.getProvinces().get(0),
        pays, pays);

    getPersonneService().save(personne);
  }
View Full Code Here

Examples of org.xrace.model.Federation

  }

  @Test
  public final void testSaveNew()
  {
    final Federation pays = getFederationService().findByCode("CAN");

    final Personne personne = new Personne("Morane", "Bob",
        "786, rue de la rue", "Beauceville", "T7U 8U7", "418-909-9989",
        new GregorianCalendar(1970, 1, 1).getTime(), "M", pays
            .getProvinces().get(0), pays, pays);
    getPersonneService().save(personne);
    Assert.assertEquals(1,
        getPersonneService().findByNomPrenomExact("Morane", "Bob")
            .size());
View Full Code Here

Examples of org.xrace.model.Federation

        .findByUserName("carnaval@fqsc.net"));
  }

  public final void testCreateCompte()
  {
    final Federation pays = getFederationService().findByCode("CAN");
    final Federation federation = getFederationService().findByCode("CAN");
    Assert.assertNotNull(federation);

    Personne personne = new Personne("Morane", "Bob", "786, rue de la rue",
        "Beauceville", "T7U 8U7", "418-909-9989",
        new GregorianCalendar(1970, 1, 1).getTime(), "M", pays
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.