Ejemplo n.º 1
0
 public ColumnVar as(String name) {
   try {
     ColumnVar clone = (ColumnVar) super.clone();
     clone.name = name;
     return clone;
   } catch (CloneNotSupportedException e) {
     throw new AssertionError(e);
   }
 }
Ejemplo n.º 2
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;
 }
Ejemplo n.º 3
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;
 }
Ejemplo n.º 4
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;
 }