Examples of StoreConfigException


Examples of org.openrdf.store.StoreConfigException

      if (maxTripleTablesLit != null) {
        try {
          setMaxTripleTables(maxTripleTablesLit.intValue());
        }
        catch (NumberFormatException e) {
          throw new StoreConfigException("Invalid value for maxTripleTables: " + maxTripleTablesLit);
        }
      }
    }
    catch (ModelException e) {
      throw new StoreConfigException(e.getMessage(), e);
    }
  }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

  public RdbmsStore getSail(SailImplConfig config)
    throws StoreConfigException
  {
    if (!SAIL_TYPE.equals(config.getType())) {
      throw new StoreConfigException("Invalid Sail type: " + config.getType());
    }

    if (config instanceof RdbmsStoreConfig) {
      RdbmsStoreConfig rdbmsConfig = (RdbmsStoreConfig)config;
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

  public Sail getSail(SailImplConfig config)
    throws StoreConfigException
  {
    if (!SAIL_TYPE.equals(config.getType())) {
      throw new StoreConfigException("Invalid Sail type: " + config.getType());
    }

    NativeStore nativeStore = new NativeStore();

    if (config instanceof NativeStoreConfig) {
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

      if (forceSyncLit != null) {
        try {
          setForceSync(forceSyncLit.booleanValue());
        }
        catch (IllegalArgumentException e) {
          throw new StoreConfigException("Boolean value required for " + FORCE_SYNC
              + " property, found " + forceSyncLit);
        }
      }
    }
    catch (ModelException e) {
      throw new StoreConfigException(e.getMessage(), e);
    }
  }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

  public Sail getSail(SailImplConfig config)
    throws StoreConfigException
  {
    if (!SAIL_TYPE.equals(config.getType())) {
      throw new StoreConfigException("Invalid Sail type: " + config.getType());
    }

    return new AccessControlSail();
  }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

  public Sail getSail(SailImplConfig config)
    throws StoreConfigException
  {
    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());
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

    throws StoreConfigException
  {
    super.validate();

    if (members.isEmpty()) {
      throw new StoreConfigException("No federation members specified");
    }

    for (RepositoryImplConfig member : members) {
      member.validate();
    }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

    for (Value member : model.filter(implNode, MEMBER, null).objects()) {
      if (member instanceof Resource) {
        addMember(RepositoryImplConfigBase.create(model, (Resource)member));
      }
      else {
        throw new StoreConfigException("Found literal for federation member node, expected a resource");
      }
    }

    for (Value space : model.filter(implNode, LOCALPROPERTYSPACE, null).objects()) {
      addLocalPropertySpace(space.stringValue());
    }

    try {
      Literal distinctLit = model.filter(implNode, DISTINCT, null).objectLiteral();
      if (distinctLit != null) {
        try {
          distinct = distinctLit.booleanValue();
        }
        catch (IllegalArgumentException e) {
          throw new StoreConfigException(
              "Invalid boolean value for <distinct> parameter in federation config: " + distinctLit);
        }
      }
    }
    catch (ModelException e) {
      throw new StoreConfigException("Invalid or inconsistent <distinct> parameter for federation config");
    }

    try {
      Literal readOnlyLit = model.filter(implNode, READ_ONLY, null).objectLiteral();
      if (readOnlyLit != null) {
        try {
          readOnly = readOnlyLit.booleanValue();
        }
        catch (IllegalArgumentException e) {
          throw new StoreConfigException(
              "Invalid boolean value for <readOnly> parameter in federation config: " + readOnlyLit);
        }
      }
    }
    catch (ModelException e) {
      throw new StoreConfigException("Invalid or inconsistent <readOnly> parameter for federation config");
    }
  }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

    }
    try {
      return new ConfigTemplate(parse(url), getSchemas());
    }
    catch (RDFParseException e) {
      throw new StoreConfigException(e);
    }
    catch (IOException e) {
      throw new StoreConfigException(e);
    }
  }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

        // Sesame 3.0 directory
        setRepositoryConfigManager(new LocalConfigManager(new File(baseDir, CONFIGURATIONS)));
      }
    }
    catch (StoreException e) {
      throw new StoreConfigException(e);
    }
  }
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.