示例#1
0
 public static ColumnVar createPred(String alias, Var v, URI uri, boolean implied) {
   ColumnVar var = createSubj(alias, v, uri);
   var.column = "pred";
   var.implied = uri != null && implied;
   var.types = ValueTypes.URI;
   return var;
 }
示例#2
0
 public ColumnVar as(String name) {
   try {
     ColumnVar clone = (ColumnVar) super.clone();
     clone.name = name;
     return clone;
   } catch (CloneNotSupportedException e) {
     throw new AssertionError(e);
   }
 }
示例#3
0
 public ColumnVar as(String alias, String column) {
   try {
     ColumnVar clone = (ColumnVar) super.clone();
     clone.alias = alias;
     clone.column = column;
     clone.nullable = true;
     return clone;
   } catch (CloneNotSupportedException e) {
     throw new AssertionError(e);
   }
 }
示例#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;
 }
示例#5
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;
 }
示例#6
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;
 }