Package lupos.rif.model

Examples of lupos.rif.model.Constant


  public Object visit(final RIFDocument n, final IRuleNode argu) {
    final Document doc = new Document();
    doc.setParent(argu);

    final Constant baseNS = (Constant) n.f2.accept(this, doc);
    doc.setBaseNamespace(baseNS != null ? ((URILiteral) baseNS.getLiteral())
        .getString() : null);
    baseNamespace = doc.getBaseNamespace();

    for (final INode node : (List<INode>) n.f3.accept(this, doc)) {
      final String[] prefix = (String[]) node.accept(this, doc);
View Full Code Here


        final IExpression rightTerm = (IExpression) seq.get(1).accept(this, term);
        term.termParams.add(leftTerm);
        term.termParams.add(rightTerm);
        try {
          if (operator.equals("#"))
            term.termName = new Constant(
                LiteralFactory
                    .createURILiteralWithoutLazyLiteral("<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>"),
                term);
          else

            term.termName = new Constant(
                LiteralFactory
                    .createURILiteralWithoutLazyLiteral("<http://www.w3.org/2000/01/rdf-schema#subClassOf>"),
                term);
        } catch (URISyntaxException e) {
          throw new RIFException(e.getMessage());
View Full Code Here

      literal = LiteralFactory.createTypedLiteralWithoutLazyLiteral(content.toString(),
          type.toString());
    } catch (final URISyntaxException e) {
      throw new RIFException(e.getMessage());
    }
    return new Constant(literal, argu);
  }
View Full Code Here

    final TypedLiteral content = (TypedLiteral) ((Constant) n.f0.accept(
        this, argu)).getLiteral();
    final String langTag = (String) n.f1.accept(this, argu);
    final Literal literal = LiteralFactory.createLanguageTaggedLiteralWithoutLazyLiteral(
        content.getContent(), langTag);
    return new Constant(literal, argu);
  }
View Full Code Here

//          "<http://www.w3.org/2001/XMLSchema#string>");
//    } catch (final URISyntaxException e) {
//      throw new RIFException(e.getMessage());
//    }
    Literal literal = LiteralFactory.createLiteral(content);
    return new Constant(literal, argu);
  }
View Full Code Here

            + prefixMap.get(parts[0]) + parts[1] + ">");
      } catch (final URISyntaxException e) {
        throw new RIFException(e.toString());
      }
    }
    return new Constant(literal, argu);
  }
View Full Code Here

      literal = LiteralFactory.createTypedLiteralWithoutLazyLiteral("\"" + content + "\"",
          "<http://www.w3.org/2001/XMLSchema#integer>");
    } catch (final URISyntaxException e) {
      throw new RIFException(e.toString());
    }
    return new Constant(literal, argu);
  }
View Full Code Here

        literal = LiteralFactory.createTypedLiteralWithoutLazyLiteral("\"" + content
            + "\"", "<http://www.w3.org/2001/XMLSchema#decimal>");
      } catch (final URISyntaxException e) {
        throw new RIFException(e.toString());
      }
    return new Constant(literal, argu);
  }
View Full Code Here

    try {
      literal = LiteralFactory.createURILiteralWithoutLazyLiteral(uriRef);
    } catch (final URISyntaxException e) {
      throw new RIFException(e.toString());
    }
    return new Constant(literal, argu);
  }
View Full Code Here

      result.getItems().add((IExpression) expr.accept(this, result));
    return result;
  }

  public IRuleNode visit(RuleVariable obj, IRuleNode arg) throws RIFException {
    return new Constant(bindings.get(obj.getVariable()), arg);
  }
View Full Code Here

TOP

Related Classes of lupos.rif.model.Constant

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.