Package org.openrdf.model

Examples of org.openrdf.model.Literal.intValue()


      }

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


      if (includeInferred != null) {
        setIncludeInferred(includeInferred.booleanValue());
      }
      Literal maxQueryTime = model.filter(implNode, MAX_QUERY_TIME, null).objectLiteral();
      if (maxQueryTime != null) {
        setMaxQueryTime(maxQueryTime.intValue());
      }
      Literal queryResultLimit = model.filter(implNode, QUERY_RESULT_LIMIT, null).objectLiteral();
      if (queryResultLimit != null) {
        setQueryResultLimit(queryResultLimit.intValue());
      }
View Full Code Here

      if (maxQueryTime != null) {
        setMaxQueryTime(maxQueryTime.intValue());
      }
      Literal queryResultLimit = model.filter(implNode, QUERY_RESULT_LIMIT, null).objectLiteral();
      if (queryResultLimit != null) {
        setQueryResultLimit(queryResultLimit.intValue());
      }
      Literal queryLanguage = model.filter(implNode, QUERY_LANGUAGE, null).objectLiteral();
      if (queryLanguage != null) {
        setQueryLanguage(QueryLanguage.valueOf(queryLanguage.getLabel()));
      }
View Full Code Here

      }

      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);
        }
View Full Code Here

      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);
        }
View Full Code Here

      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);
        }
View Full Code Here

      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);
        }
View Full Code Here

                if (type.equals(XMLSchema.STRING)) {
                    return l.stringValue();
                } else if (type.equals(XMLSchema.LONG)) {
                    return l.longValue();
                } else if (type.equals(XMLSchema.INT)) {
                    return l.intValue();
                } else if (type.equals(XMLSchema.INTEGER)) {
                    return l.integerValue();
                } else if (type.equals(XMLSchema.BYTE)) {
                    return l.byteValue();
                } else if (type.equals(XMLSchema.BOOLEAN)) {
View Full Code Here

        assertEquals(XMLSchema.STRING, l.getDatatype());
        l = vf.createLiteral(42);
        assertNotNull(l);
        assertNull(l.getLanguage());
        assertEquals("42", l.getLabel());
        assertEquals(42, l.intValue());
        assertEquals(XMLSchema.INT, l.getDatatype());
        l = vf.createLiteral(42l);
        assertNotNull(l);
        assertNull(l.getLanguage());
        assertEquals("42", l.getLabel());
View Full Code Here

        l = (Literal) toSet(sc.getStatements(valueUri, hasValueUri, null, false)).iterator().next().getObject();
        assertNotNull(l);
        assertNull(l.getLanguage());
        assertEquals("42", l.getLabel());
        assertEquals(XMLSchema.INT, l.getDatatype());
        assertEquals(42, l.intValue());
        valueUri = vf.createURI(prefix + "shortValue");
        l = (Literal) toSet(sc.getStatements(valueUri, hasValueUri, null, false)).iterator().next().getObject();
        assertNotNull(l);
        assertNull(l.getLanguage());
        assertEquals("42", l.getLabel());
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.