Exemplo n.º 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;
 }
Exemplo n.º 2
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);
   }
 }
Exemplo 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;
 }
Exemplo 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;
 }
Exemplo n.º 5
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;
 }