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

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


  }
 
  protected static Resource getResource(org.openrdf.model.Resource resource) {
    if (resource instanceof org.openrdf.model.URI) {
      org.openrdf.model.URI uri = (org.openrdf.model.URI)resource;
      return new URI(uri.getURI());
    } else if (resource instanceof org.openrdf.model.BNode) {
      org.openrdf.model.BNode bNode = (org.openrdf.model.BNode)resource;
      return new BNode(bNode.getID());
    } else {
      return null;
View Full Code Here


    }
  }
 
  protected static org.openrdf.model.Resource getResource(Resource resource) {
    if (resource instanceof URI) {
      URI uri = (URI)resource;
      return new URIImpl(uri.getURI());
    } else if (resource instanceof BNode) {
      BNode bNode = (BNode)resource;
      return new BNodeImpl(bNode.getID());
    } else {
      return null;
View Full Code Here

    org.openrdf.model.Value value = getValue(object);
   
    Collection<Statement> statements = new ArrayList<Statement>();
    for (Object statement : graph.getStatementCollection(resource, uri, value)) {
      Resource _subject = getResource(((org.openrdf.model.Statement)statement).getSubject());
      URI _predicate = getURI(((org.openrdf.model.Statement)statement).getPredicate());
      Value _object = getValue(((org.openrdf.model.Statement)statement).getObject());
      statements.add(new Statement(_subject, _predicate, _object));
    }
   
    return statements;
View Full Code Here

    return null;
  }
 
  protected static URI getURI(org.openrdf.model.URI uri) {
    if (uri != null)
      return new URI(uri.getURI());

    return null;
  }
View Full Code Here

    } 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

TOP

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

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.