Exemple #1
0
 public static ColumnVar createCtx(String alias, Var v, Resource resource) {
   ColumnVar var = new ColumnVar();
   var.alias = alias;
   var.column = "ctx";
   if (v == null) {
     var.name = "__ctx" + Integer.toHexString(System.identityHashCode(var));
     var.anonymous = true;
     var.hidden = true;
   } else {
     var.name = v.getName();
     var.anonymous = v.isAnonymous();
   }
   var.value = resource;
   var.types = ValueTypes.RESOURCE;
   if (resource instanceof RdbmsURI) {
     var.types = ValueTypes.URI;
   }
   return var;
 }
Exemple #2
0
 public static ColumnVar createSubj(String alias, Var v, Resource resource) {
   ColumnVar var = new ColumnVar();
   var.alias = alias;
   var.column = "subj";
   var.name = v.getName();
   var.anonymous = v.isAnonymous();
   var.value = resource;
   var.types = ValueTypes.RESOURCE;
   if (resource instanceof RdbmsURI) {
     var.types = ValueTypes.URI;
   }
   return var;
 }
Exemple #3
0
 public static ColumnVar createObj(String alias, Var v, Value value) {
   ColumnVar var = new ColumnVar();
   var.alias = alias;
   var.column = "obj";
   var.name = v.getName();
   var.anonymous = v.isAnonymous();
   var.value = value;
   var.types = ValueTypes.UNKNOWN;
   if (value instanceof RdbmsURI) {
     var.types = ValueTypes.URI;
   } else if (value instanceof RdbmsResource) {
     var.types = ValueTypes.RESOURCE;
   }
   return var;
 }