Package org.wymiwyg.rdf.graphs

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


        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

Related Classes of org.wymiwyg.rdf.graphs.PlainLiteralNode

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.