Package lupos.datastructures.items

Examples of lupos.datastructures.items.Variable


  }
 
  public XYChartModel(ChartTyp type, String[] vars){
    this(type);
   
    categoryVar = new Variable(vars[0]);
    valueVar = new Variable(vars[1]);
    valueVar2 = new Variable(vars[2]);
  }
View Full Code Here


  public DBAnswer(Bindings b) throws Exception {
    String[] variables = { "thumbnail", "wikiarticle", "subject", "name",
        "birthDate", "deathDate", "birthPlace", "label""comment" };
    int i = 0;
    Literal k = b.get(new Variable(variables[i]));
    if (k != Literals.createTyped("", Literals.XSD.String))
      this.thumbnail = k;
    i++;
    k = b.get(new Variable(variables[i]));
    if (k != Literals.createTyped("", Literals.XSD.String))
      this.wikiarticle = k;
    i++;
    k = b.get(new Variable(variables[i]));
    if (k != Literals.createTyped("", Literals.XSD.String))
      this.subject = k;
    i++;
    k = b.get(new Variable(variables[i]));
    if (k != Literals.createTyped("", Literals.XSD.String))
      this.name = k;
    i++;
    k = b.get(new Variable(variables[i]));
    if (k != Literals.createTyped("", Literals.XSD.String))
      this.birthDate = k;
    i++;
    k = b.get(new Variable(variables[i]));
    if (k != Literals.createTyped("", Literals.XSD.String))
      this.deathDate = k;
    i++;
    k = b.get(new Variable(variables[i]));
    if (k != Literals.createTyped("", Literals.XSD.String))
      this.birthPlace = k;
    i++;
    k = b.get(new Variable(variables[i]));
    if (k != Literals.createTyped("", Literals.XSD.String))
      this.label = k;
    i++;
    k = b.get(new Variable(variables[i]));
    if (k != Literals.createTyped("", Literals.XSD.String))
      this.comment = k;
  }
View Full Code Here

        bins.setText(null);
        JOptionPane.showMessageDialog(this, "Number of Bins should be an Integer", "Error", JOptionPane.ERROR_MESSAGE);
      }
    }
   
    getModel().setXVar( new Variable(variable.getText()));
    getModel().setNrBins(numberBins);
    getModel().fillDataset(l.getWrappedObject());
  }
View Full Code Here

   * @param chartType
   */
  public DataModel(ChartTyp chartType){
   
    this.chartType=chartType;
    categoryVar = new Variable("");
   
  }
View Full Code Here

  protected Variable valueVar;
  protected Variable valueVar2;
 
  public CategoryChartModel(ChartTyp chartType){
    super(chartType);
    valueVar = new Variable("");
    valueVar2 = new Variable("");
    dataset = new DefaultCategoryDataset();
  }
View Full Code Here

    dataset = new DefaultCategoryDataset();
  }
 
  public CategoryChartModel(ChartTyp chartType, String[] vars){
    super(chartType);
    categoryVar = new Variable(vars[0]);
    valueVar = new Variable(vars[1]);
    if (vars.length>2)
      valueVar2 = new Variable(vars[2]);
    dataset = new DefaultCategoryDataset();
  }
View Full Code Here

          // Bindings bb = Bindings.createNewInstance();
          final Value v = b.getValue();
          if (v instanceof org.openrdf.model.Literal) {
            final org.openrdf.model.Literal lit = (org.openrdf.model.Literal) v;
            if (lit.getDatatype() != null) {
              binding.add(new Variable(b.getName()),
                  TypedLiteralOriginalContent
                      .createTypedLiteral("\""
                          + lit.getLabel() + "\"",
                          "<" + lit.getDatatype()
                              + ">"));
            } else {
              binding.add(new Variable(b.getName()),
                  LiteralFactory.createLiteral("\""
                      + lit.getLabel() + "\""));
            }
          } else if (v instanceof BNode) {
            binding.add(new Variable(b.getName()),
                new AnonymousLiteral(((BNode) v).toString()));
          } else if (v instanceof URI) {
            binding.add(new Variable(b.getName()), LiteralFactory
                .createURILiteral("<" + (v) + ">"));
          }
        }
        qr.add(binding);
      }
View Full Code Here

    final Object[] joinVars = join.getIntersectionVariables().toArray();
    final LinkedList<Variable> replaceLitLeft = replaceLit
        .getSubstitutionsLiteralLeft();
    final LinkedList<Literal> replaceLitRight = replaceLit
        .getSubstitutionsLiteralRight();
    Variable var;
    Literal lit;
    for (int i = replaceLitLeft.size() - 1; i >= 0; i--) {
      var = replaceLitLeft.get(i);
      // Split ReplaceLit and pull only not intersection variables
      // downwards
View Full Code Here

    // If TriplePattern has two identical variables then generate should not
    // contain different literals at these positions
    final HashMap<Variable, Literal> varPositions = new HashMap<Variable, Literal>();
    for (int b = 0; b < 3; b++) {
      if (patItems[b].isVariable()) {
        final Variable v = (Variable) patItems[b];
        if ((varPositions.get(v) == null)
            && (!generateItems[b].isVariable())) { // new variable
          // found => store the binding for next time
          varPositions.put(v, (Literal) generateItems[b]);
        } else if ((varPositions.get(v) != null)
View Full Code Here

        .getSubstitutionsVariableRight();
    final Object[] intersectionJoin = join.getIntersectionVariables()
        .toArray();

    for (int i = 0; i < replaceVarsLeft.size(); i++) {
      final Variable replaceVarRight = replaceVarsRight.get(i);
      final Variable replaceVarLeft = replaceVarsLeft.get(i);
      // Join gets (p,lit1) (p,lit2) and ReplaceVar has (x,p) => no
      // trigger
      // After incorrect Transformation Join could get (x,lit1) (p,lit2)
      // => trigger
      if (!arrayContains(intersectionJoin, replaceVarRight)) {
View Full Code Here

TOP

Related Classes of lupos.datastructures.items.Variable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.