Examples of PlainLiteralNode


Examples of org.wymiwyg.rdf.graphs.PlainLiteralNode

          if (node instanceof NamedNode) {
            result = com.hp.hpl.jena.graph.Node
                .createURI(((NamedNode) node).getURIRef());
          } else {
            if (node instanceof PlainLiteralNode) {
              PlainLiteralNode lit = (PlainLiteralNode) node;
              result = com.hp.hpl.jena.graph.Node.createLiteral(
                  lit.getLexicalForm(),
                  lit.getLocale() == null ? null : lit
                      .getLocale().toString(), false);
            } else {
              TypedLiteralNode lit = (TypedLiteralNode) node;
              result = com.hp.hpl.jena.graph.Node.createLiteral(
                  lit.getLexicalForm(), null, TypeMapper
                      .getInstance().getSafeTypeByName(
                          lit.getDataType()
                              .toString()));
            }
          }
        } else {
          result = com.hp.hpl.jena.graph.Node.createAnon();
View Full Code Here

Examples of org.wymiwyg.rdf.graphs.PlainLiteralNode

        if (object instanceof TypedLiteralNode) {
          TypedLiteralNode literal = (TypedLiteralNode)object;
          targetObject = model.createTypedLiteral(literal.getLexicalForm(),  TypeMapper.getInstance().getSafeTypeByName(literal.getDataType().toString()));
        } else {
          if (object instanceof PlainLiteralNode) {
            PlainLiteralNode literal = (PlainLiteralNode)object;
            Locale locale = literal.getLocale();
            if (locale != null) {
              targetObject = model.createLiteral(literal.getLexicalForm(),  literal.getLocale().toString());
            } else {
              targetObject = model.createLiteral(literal.getLexicalForm());
            }
          } else {
            targetObject = model.createResource(((NamedNode)object).getURIRef());
          }
        }
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.