Package org.openrdf.model

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


      if (password != null) {
        setPassword(password.getLabel());
      }
      Literal readOnly = model.filter(implNode, READ_ONLY, null).objectLiteral();
      if (readOnly != null) {
        setReadOnly(readOnly.booleanValue());
      }
      for (Value obj : model.filter(implNode, SUBJECTSPACE, null).objects()) {
        subjectSpace.add(obj.stringValue());
      }
    }
View Full Code Here


      }

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

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

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

    super.parse(model, implNode);

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

      }

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

                } else if (type.equals(XMLSchema.INTEGER)) {
                    return l.integerValue();
                } else if (type.equals(XMLSchema.BYTE)) {
                    return l.byteValue();
                } else if (type.equals(XMLSchema.BOOLEAN)) {
                    return l.booleanValue();
                } else if (type.equals(XMLSchema.SHORT)) {
                    return l.shortValue();
                } else if (type.equals(XMLSchema.FLOAT)) {
                    return l.floatValue();
                } else if (type.equals(XMLSchema.DOUBLE)) {
View Full Code Here

        assertEquals(XMLSchema.SHORT, l.getDatatype());
        l = vf.createLiteral(true);
        assertNotNull(l);
        assertNull(l.getLanguage());
        assertEquals("true", l.getLabel());
        assertEquals(true, l.booleanValue());
        assertEquals(XMLSchema.BOOLEAN, l.getDatatype());
        l = vf.createLiteral((byte) 'c');
        assertNotNull(l);
        assertNull(l.getLanguage());
        assertEquals("99", l.getLabel());
View Full Code Here

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

            throw new ValueExprEvaluationException(e.getMessage(), e);
          }
        }
        else if (datatype.equals(XMLSchema.BOOLEAN)) {
          try {
            return valueFactory.createLiteral(literal.booleanValue() ? 1.0 : 0.0);
          }
          catch (IllegalArgumentException e) {
            throw new ValueExprEvaluationException(e.getMessage(), 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.