Package lupos.datastructures.items.literal

Examples of lupos.datastructures.items.literal.AnonymousLiteral


                  LiteralFactory.createLiteral("\""
                      + lit.getLabel() + "\""));
            }
          } else if (v instanceof BNode) {
            binding.add(new Variable(b.getName()),
                new AnonymousLiteral(((BNode) v).toString()));
          } else if (v instanceof URI) {
            binding.add(new Variable(b.getName()), LiteralFactory
                .createURILiteral("<" + (v) + ">"));
          }
        }
View Full Code Here


      } catch (final URISyntaxException e) {
        System.err.println(e);
        e.printStackTrace();
      }
    } else {
      subj = new AnonymousLiteral("_:b" + ((BNode) subject).getID());
    }
    try {
      pred = LiteralFactory.createURILiteral("<"
          + arg0.getPredicate().getNamespace()
          + arg0.getPredicate().getLocalName() + ">");
    } catch (final URISyntaxException e) {
      System.err.println(e);
      e.printStackTrace();
    }
    final Value object = arg0.getObject();
    if (object instanceof URI) {
      try {
        obj = LiteralFactory.createURILiteral("<"
            + ((URI) object).getNamespace()
            + ((URI) object).getLocalName() + ">");
      } catch (final URISyntaxException e) {
        System.err.println(e);
        e.printStackTrace();
      }
    } else if (object instanceof BNode) {
      obj = new AnonymousLiteral("_:b" + ((BNode) object).getID());
    } else if (object instanceof org.openrdf.model.Literal) {
      final org.openrdf.model.Literal lit = (org.openrdf.model.Literal) object;
      if (lit.getDatatype() != null) {
        try {
          obj = TypedLiteralOriginalContent.createTypedLiteral("\""
View Full Code Here

      for (final TriplePattern tp : template) {
        final Triple trip = new Triple();
        for (int i = 0; i < 3; i++) {
          if (tp.getPos(i) instanceof BlankNode) {
            final BlankNode bn = (BlankNode) tp.getPos(i);
            AnonymousLiteral al = assignedBlankNodes.get(bn);
            if (al == null) {
              do {
                al = new AnonymousLiteral("_:_constructedBN"
                    + bnodeid++);
              } while (alreadyUsedBlankNodes.contains(al));
              assignedBlankNodes.put(bn, al);
            }
            trip.setPos(i, al);
View Full Code Here

TOP

Related Classes of lupos.datastructures.items.literal.AnonymousLiteral

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.