Package org.corrib.s3b.mbb.beans.rdf

Examples of org.corrib.s3b.mbb.beans.rdf.Literal


      org.openrdf.model.Resource resource = (org.openrdf.model.Resource)value;
      return getResource(resource);
    } else if (value instanceof org.openrdf.model.Literal) {
      org.openrdf.model.Literal literal = (org.openrdf.model.Literal)value;
      if (literal.getLanguage() != null) {
        return new Literal(literal.getLabel(), literal.getLanguage());
      } else if (literal.getDatatype() != null) {
        return new Literal(literal.getLabel(), new URI(literal.getDatatype().getURI()));
      } else {
        return new Literal(literal.getLabel());
      }
    } else {
      return null;
    }
  }
View Full Code Here


  protected static org.openrdf.model.Value getValue(Value value) {
    if (value instanceof Resource) {
      Resource resource = (Resource)value;
      return getResource(resource);
    } else if (value instanceof Literal) {
      Literal literal = (Literal)value;
      if (literal.getLanguage() != null) {
        return new LiteralImpl(literal.getLabel(), literal.getLanguage());
      } else if (literal.getDatatype() != null) {
        return new LiteralImpl(literal.getLabel(), new org.openrdf.model.impl.URIImpl(literal.getDatatype().getURI()));
      } else if (literal.getLabel() != null){//XXX
        return new LiteralImpl(literal.getLabel());
      } else
        return null;
    } else {
      return null;
    }
View Full Code Here

TOP

Related Classes of org.corrib.s3b.mbb.beans.rdf.Literal

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.