Пример #1
0
 public Entity ToEntity(org.openrdf.model.Value ent)
 {
     if (ent == null)
     {
         return(null);
     }
     if (ent is BNodeWrapper)
     {
         return(((BNodeWrapper)ent).r);
     }
     if (ent is URIWrapper)
     {
         return(((URIWrapper)ent).r);
     }
     if (ent is org.openrdf.model.BNode)
     {
         org.openrdf.model.BNode bnode = (org.openrdf.model.BNode)ent;
         Entity r = (Entity)bnodes[bnode.getID()];
         if (r == null)
         {
             r = new BNode();
             bnodes[bnode.getID()] = r;
         }
         return(r);
     }
     else if (ent is org.openrdf.model.URI)
     {
         org.openrdf.model.URI uri = (org.openrdf.model.URI)ent;
         return(new Entity(uri.toString()));
     }
     else
     {
         return(null);
     }
 }
Пример #2
0
 public Resource ToResource(org.openrdf.model.Value value)
 {
     if (value == null)
     {
         return(null);
     }
     if (value is LiteralWrapper)
     {
         return(((LiteralWrapper)value).r);
     }
     if (value is org.openrdf.model.Literal)
     {
         org.openrdf.model.Literal literal = (org.openrdf.model.Literal)value;
         return(new Literal(literal.getLabel(), literal.getLanguage(), literal.getDatatype() == null ? null : literal.getDatatype().toString()));
     }
     else
     {
         return(ToEntity(value));
     }
 }
Пример #3
0
				public Stmt(org.openrdf.model.Resource subject, org.openrdf.model.URI @predicate, org.openrdf.model.Value @object) {
					this.subject = subject;
					this.predicate = predicate;
					this.@object = @object;
				}
Пример #4
0
 public Stmt(org.openrdf.model.Resource subject, org.openrdf.model.URI @predicate, org.openrdf.model.Value @object)
 {
     this.subject   = subject;
     this.predicate = predicate;
     this.@object   = @object;
 }
Пример #5
0
 public org.openrdf.model.Statement createStatement(org.openrdf.model.Resource subject, org.openrdf.model.URI @predicate, org.openrdf.model.Value @object)
 {
     return(new Stmt(subject, predicate, @object));
 }
Пример #6
0
 public bool hasStatement(org.openrdf.model.Value subject, org.openrdf.model.URI @predicate, org.openrdf.model.Value @object, org.openrdf.model.URI graph)
 {
     return(has(new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), ToEntity(graph))));
 }
Пример #7
0
 public bool hasDefaultStatement(org.openrdf.model.Value subject, org.openrdf.model.URI @predicate, org.openrdf.model.Value @object)
 {
     return(has(new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), QueryMeta)));
 }
Пример #8
0
 /**
  * Gets all the statements that come from a particular named graph and have
  * a certain subject, predicate, and object. Any of the parameters can be
  * null, in which case it assumes these are "wildcards" and all statements
  * that match the remainding parameters will be returned.
  */
 public java.util.Iterator getStatements(org.openrdf.model.Value subject, org.openrdf.model.URI predicate, org.openrdf.model.Value @object, org.openrdf.model.URI graph)
 {
     return(GetIterator(new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), ToEntity(graph)), false));
 }
Пример #9
0
 /**
  * Gets all the statements that come from the default graph and have a
  * certain subject, predicate, and object. Any of the parameters can be
  * null, in which case it assumes these are "wildcards" and all statements
  * that match the remainding parameters will be returned.
  */
 public java.util.Iterator getDefaultStatements(org.openrdf.model.Value subject, org.openrdf.model.URI predicate, org.openrdf.model.Value @object)
 {
     return(GetIterator(new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), QueryMeta), true));
 }