Package org.openrdf.model

Examples of org.openrdf.model.Value


  }

  public Value evaluate(Str node, BindingSet bindings)
    throws ValueExprEvaluationException, StoreException
  {
    Value argValue = evaluate(node.getArg(), bindings);

    if (argValue instanceof URI) {
      return tripleSource.getValueFactory().createLiteral(argValue.toString());
    }
    else if (argValue instanceof Literal) {
      Literal literal = (Literal)argValue;

      if (QueryEvaluationUtil.isSimpleLiteral(literal)) {
View Full Code Here


  public Value evaluate(Label node, BindingSet bindings)
    throws ValueExprEvaluationException, StoreException
  {
    // FIXME: deprecate Label in favour of Str(?)
    Value argValue = evaluate(node.getArg(), bindings);

    if (argValue instanceof Literal) {
      Literal literal = (Literal)argValue;

      if (QueryEvaluationUtil.isSimpleLiteral(literal)) {
View Full Code Here

  }

  public Value evaluate(Lang node, BindingSet bindings)
    throws ValueExprEvaluationException, StoreException
  {
    Value argValue = evaluate(node.getArg(), bindings);

    if (argValue instanceof Literal) {
      Literal literal = (Literal)argValue;

      String langTag = literal.getLanguage();
View Full Code Here

  }

  public Value evaluate(Datatype node, BindingSet bindings)
    throws ValueExprEvaluationException, StoreException
  {
    Value v = evaluate(node.getArg(), bindings);

    if (v instanceof Literal) {
      Literal literal = (Literal)v;

      if (literal.getDatatype() != null) {
View Full Code Here

  }

  public Value evaluate(Namespace node, BindingSet bindings)
    throws ValueExprEvaluationException, StoreException
  {
    Value argValue = evaluate(node.getArg(), bindings);

    if (argValue instanceof URI) {
      URI uri = (URI)argValue;
      return tripleSource.getValueFactory().createURI(uri.getNamespace());
    }
View Full Code Here

  }

  public Value evaluate(LocalName node, BindingSet bindings)
    throws ValueExprEvaluationException, StoreException
  {
    Value argValue = evaluate(node.getArg(), bindings);

    if (argValue instanceof URI) {
      URI uri = (URI)argValue;
      return tripleSource.getValueFactory().createLiteral(uri.getLocalName());
    }
View Full Code Here

   *         otherwise.
   */
  public Value evaluate(IsResource node, BindingSet bindings)
    throws ValueExprEvaluationException, StoreException
  {
    Value argValue = evaluate(node.getArg(), bindings);
    return BooleanLiteralImpl.valueOf(argValue instanceof Resource);
  }
View Full Code Here

   *         otherwise.
   */
  public Value evaluate(IsURI node, BindingSet bindings)
    throws ValueExprEvaluationException, StoreException
  {
    Value argValue = evaluate(node.getArg(), bindings);
    return BooleanLiteralImpl.valueOf(argValue instanceof URI);
  }
View Full Code Here

   *         otherwise.
   */
  public Value evaluate(IsBNode node, BindingSet bindings)
    throws ValueExprEvaluationException, StoreException
  {
    Value argValue = evaluate(node.getArg(), bindings);
    return BooleanLiteralImpl.valueOf(argValue instanceof BNode);
  }
View Full Code Here

   *         otherwise.
   */
  public Value evaluate(IsLiteral node, BindingSet bindings)
    throws ValueExprEvaluationException, StoreException
  {
    Value argValue = evaluate(node.getArg(), bindings);
    return BooleanLiteralImpl.valueOf(argValue instanceof Literal);
  }
View Full Code Here

TOP

Related Classes of org.openrdf.model.Value

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.