Package org.openrdf.sail.config

Examples of org.openrdf.sail.config.SailConfigException


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

    AndroidNativeStore nativeStore = new AndroidNativeStore();

    if (config instanceof NativeStoreConfig) {
View Full Code Here


      if (forceSyncLit != null) {
        try {
          setForceSync(forceSyncLit.booleanValue());
        }
        catch (IllegalArgumentException e) {
          throw new SailConfigException("Boolean value required for " + FORCE_SYNC + " property, found "
              + forceSyncLit);
        }
      }

      Literal valueCacheSizeLit = GraphUtil.getOptionalObjectLiteral(graph, implNode, VALUE_CACHE_SIZE);
      if (valueCacheSizeLit != null) {
        try {
          setValueCacheSize(valueCacheSizeLit.intValue());
        }
        catch (NumberFormatException e) {
          throw new SailConfigException("Integer value required for " + VALUE_CACHE_SIZE
              + " property, found " + valueCacheSizeLit);
        }
      }

      Literal valueIDCacheSizeLit = GraphUtil.getOptionalObjectLiteral(graph, implNode,
          VALUE_ID_CACHE_SIZE);
      if (valueIDCacheSizeLit != null) {
        try {
          setValueIDCacheSize(valueIDCacheSizeLit.intValue());
        }
        catch (NumberFormatException e) {
          throw new SailConfigException("Integer value required for " + VALUE_ID_CACHE_SIZE
              + " property, found " + valueIDCacheSizeLit);
        }
      }

      Literal namespaceCacheSizeLit = GraphUtil.getOptionalObjectLiteral(graph, implNode,
          NAMESPACE_CACHE_SIZE);
      if (namespaceCacheSizeLit != null) {
        try {
          setNamespaceCacheSize(namespaceCacheSizeLit.intValue());
        }
        catch (NumberFormatException e) {
          throw new SailConfigException("Integer value required for " + NAMESPACE_CACHE_SIZE
              + " property, found " + namespaceCacheSizeLit);
        }
      }

      Literal namespaceIDCacheSizeLit = GraphUtil.getOptionalObjectLiteral(graph, implNode,
          NAMESPACE_ID_CACHE_SIZE);
      if (namespaceIDCacheSizeLit != null) {
        try {
          setNamespaceIDCacheSize(namespaceIDCacheSizeLit.intValue());
        }
        catch (NumberFormatException e) {
          throw new SailConfigException("Integer value required for " + NAMESPACE_ID_CACHE_SIZE
              + " property, found " + namespaceIDCacheSizeLit);
        }
      }
    }
    catch (GraphUtilException e) {
      throw new SailConfigException(e.getMessage(), e);
    }
  }
View Full Code Here

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

    return new ForwardChainingRDFSInferencer();
  }
View Full Code Here

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

    return new DirectTypeHierarchyInferencer();
  }
View Full Code Here

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

    MemoryStore memoryStore = new MemoryStore();

    if (config instanceof MemoryStoreConfig) {
View Full Code Here

      if (persistValue != null) {
        try {
          setPersist((persistValue).booleanValue());
        }
        catch (IllegalArgumentException e) {
          throw new SailConfigException("Boolean value required for " + PERSIST + " property, found "
              + persistValue);
        }
      }

      Literal syncDelayValue = GraphUtil.getOptionalObjectLiteral(graph, implNode, SYNC_DELAY);
      if (syncDelayValue != null) {
        try {
          setSyncDelay((syncDelayValue).longValue());
        }
        catch (NumberFormatException e) {
          throw new SailConfigException("Long integer value required for " + SYNC_DELAY
              + " property, found " + syncDelayValue);
        }
      }
    }
    catch (GraphUtilException e) {
      throw new SailConfigException(e.getMessage(), e);
    }
  }
View Full Code Here

      password = get(graph, implNode, PASSWORD);
      layout = get(graph, implNode, LAYOUT);
      indexed = get(graph, implNode, INDEXED);
    }
    catch (GraphUtilException e) {
      throw new SailConfigException(e.getMessage(), e);
    }
  }
View Full Code Here

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

    RdbmsStoreConfig rdbms = (RdbmsStoreConfig)config;
    String jdbcDriver = rdbms.getJdbcDriver();
    String url = rdbms.getUrl();
View Full Code Here

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

    NativeStore nativeStore = new NativeStore();

    if (config instanceof NativeStoreConfig) {
View Full Code Here

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

TOP

Related Classes of org.openrdf.sail.config.SailConfigException

Copyright © 2018 www.massapicom. 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.