Examples of Alternative


Examples of eu.scape_project.planning.model.Alternative

     *            Experiment alternative.
     * @param sampleObj
     *            Experiment sample object.
     */
    public void updateSelectedDetailedExperimentInfo(Object alt, Object sampleObj) {
        Alternative alternative = (Alternative) alt;
        SampleObject sampleObject = (SampleObject) sampleObj;

        selectedDetailedExperimentInfo = alternative.getExperiment().getDetailedInfo().get(sampleObject);
    }
View Full Code Here

Examples of eu.scape_project.planning.model.Alternative

     *            Alternative corresponding to the next file-upload.
     * @param sampleObj
     *            SampleObject corresponding to the next file-upload.
     */
    public void updateDataForNextUpload(Object alt, Object sampleObj) {
        Alternative alternative = (Alternative) alt;
        SampleObject sampleObject = (SampleObject) sampleObj;

        alternativeForNextUpload = alternative;
        sampleObjectForNextUpload = sampleObject;
    }
View Full Code Here

Examples of org.antlr.v4.tool.Alternative

    return list(new TestSetInline(this, blkAST, look));
  }

  @Override
  public boolean needsImplicitLabel(GrammarAST ID, LabeledOp op) {
    Alternative currentOuterMostAlt = getCurrentOuterMostAlt();
    boolean actionRefsAsToken = currentOuterMostAlt.tokenRefsInActions.containsKey(ID.getText());
    boolean actionRefsAsRule = currentOuterMostAlt.ruleRefsInActions.containsKey(ID.getText());
    return  op.getLabels().isEmpty() &&  (actionRefsAsToken || actionRefsAsRule);
  }
View Full Code Here

Examples of org.antlr.v4.tool.Alternative

            for (ActionAST a : r.namedActions.values()) {
                AttributeChecks checker = new AttributeChecks(g, r, null, a, a.token);
                checker.examineAction();
            }
            for (int i=1; i<=r.numberOfAlts; i++) {
                Alternative alt = r.alt[i];
                for (ActionAST a : alt.actions) {
                    AttributeChecks checker =
                        new AttributeChecks(g, r, alt, a, a.token);
                    checker.examineAction();
                }
View Full Code Here

Examples of org.antlr.v4.tool.Alternative

            for (int i=1; i<=r.numberOfAlts; i++) {
        if (r.hasAltSpecificContexts()) {
          labelNameSpace.clear();
        }

                Alternative a = r.alt[i];
                for (List<LabelElementPair> pairs : a.labelDefs.values() ) {
                    for (LabelElementPair p : pairs) {
                        checkForLabelConflict(r, p.label);
                        String name = p.label.getText();
                        LabelElementPair prev = labelNameSpace.get(name);
View Full Code Here

Examples of org.antlr.v4.tool.Alternative

public class UseDefAnalyzer {
  // side-effect: updates Alternative with refs in actions
  public static void trackTokenRuleRefsInActions(Grammar g) {
    for (Rule r : g.rules.values()) {
      for (int i=1; i<=r.numberOfAlts; i++) {
        Alternative alt = r.alt[i];
        for (ActionAST a : alt.actions) {
          ActionSniffer sniffer =  new ActionSniffer(g, r, alt, a, a.token);
          sniffer.examineAction();
        }
      }
View Full Code Here

Examples of org.jrdf.graph.Alternative

        // Check for null and ensure exactly the same class - not subclass.
        if (null == obj || getClass() != obj.getClass()) {
            return false;
        }

        Alternative alt = (Alternative) obj;

        boolean returnValue = false;
        if (size() == alt.size()) {
            List<ObjectNode> myValues = asList(toArray(new ObjectNode[size()]));
            List<ObjectNode> altValues = asList(toArray(new ObjectNode[size()]));
            returnValue = myValues.equals(altValues);
        }
        return returnValue;
View Full Code Here

Examples of org.openqreg.bean.Alternative

            if(ListElement.class.isAssignableFrom(clazz)) {
             
              if(arry[ALTERNATIVESCOLUMN] != null){
             
                Vector alternatives = new Vector();
                Alternative alternative = new Alternative();
                String[] altrows = ValidationHelper.separateToArray(
                    arry[ALTERNATIVESCOLUMN].toString(), "\n");
               
                for (int r = 0; r < altrows.length; r++) {
                  String row = altrows[r].toString();
                  if (row.indexOf("=") != -1) {
                    alternative = new Alternative();
                    alternative.setValue(row.substring(0,
                        row.indexOf("=")).trim().replaceAll("\"",
                        ""));
                    alternative.setText(row.substring(
                        row.indexOf("=") + 1).trim().replaceAll(
                        "\"", ""));
                    alternatives.add(alternative);
                  }
                }
                alternatives.trimToSize();
                var.setAlternatvies(alternatives);
              }
           
              if(arry[ALTERNATIVESDATECOLUMN] != null) {
                Vector alternatives = var.getAlternatvies();
                Alternative alternative = new Alternative();
                String[] altrows = ValidationHelper.separateToArray(
                    arry[ALTERNATIVESDATECOLUMN].toString(), "\n");
                for (int r = 0; r < altrows.length; r++) {
                  String row = altrows[r].toString();
                  if (row.indexOf("=") != -1) {
                    alternative = (Alternative) alternatives.get(r);
                    int startPos = row.indexOf("=") + 1;
                    alternative.setStartDate(((row.substring(startPos,
                        row.indexOf("/")).trim()).replaceAll("\"",
                        "")).replaceAll("\\(", ""));
                    alternative.setEndDate(((row.substring(row
                        .indexOf("/") + 1).trim()).replaceAll("\"",
                        "")).replaceAll("\\)", ""));
                  }
                }
                alternatives.trimToSize();
View Full Code Here

Examples of org.openqreg.bean.Alternative

    StringBuffer out = new StringBuffer();
    Iterator it = variables.iterator();
    VariableForImport var;
    Vector alternatives = new Vector();
    int counter = 0;
    Alternative alternative = new Alternative();
    while (it.hasNext()) {
      counter = 0;
      var = (VariableForImport) it.next();
      alternatives = var.getAlternatvies();
     
      try {
        Class clazz = Class.forName(var.getType());     
     
        if (var.getName() != null
            && !var.getName().equals("")
            && alternatives != null
            && var.getTable() != null
            && !var.getTable().equals("")
            && (ListElement.class.isAssignableFrom(clazz))) {
 
          out
              .append("insert into listboxtextrow (ID, LISTORDER, LANGUAGEID, TEXT, TEXTVALUE, SELECTED, TSCREATED, TSUPDATED, CREATEDBY, UPDATEDBY, VALIDFROM)");
          out.append(" values (");
          out.append("'" + var.getTable().toUpperCase() + "_"
              + var.getName().toUpperCase() + "_L' ");
          out
              .append(", 0, '"
                  + var.getLanguageid()
                  + "', '', '', 1, localtimestamp,localtimestamp, 'System', 'System', DATE '2004-01-01');");
          out.append(nl);
 
          for (int r = 0; r < alternatives.size(); r++) {
            counter++;
            alternative = (Alternative) alternatives.get(r);
            out
                .append("insert into listboxtextrow (ID, LISTORDER, LANGUAGEID, TEXT, TEXTVALUE, "
                    + "SELECTED, TSCREATED, TSUPDATED, CREATEDBY, UPDATEDBY, VALIDFROM, VALIDTO)");
            out.append("values (");
            out.append("'" + var.getTable().toUpperCase() + "_"
                + var.getName().toUpperCase() + "_L' ");
            out.append(", " + counter);
            out.append(", '" + var.getLanguageid());
            out
                .append("', '"
                    + alternative.getText()
                    + "', '"
                    + alternative.getValue()
                    + "', "
                    + "0, localtimestamp,localtimestamp, 'System', 'System', DATE '"
                    + alternative.getStartDate() + "'");
            if (!"".equals(alternative.getEndDate())) {
              out.append(", DATE '" + alternative.getEndDate() + "'");
            } else {
              out.append(", null");
            }
 
            out.append(");");
View Full Code Here

Examples of org.sablecc.sablecc.lrautomaton.Alternative

            if (alternative == null) {
                throw CompilerException.invalidReference(identifier);
            }

            Alternative grammarAlternative = alternative
                    .getGrammarAlternative();

            int size = grammarAlternative.getElements().size();
            if (size == 0) {
                throw CompilerException.alternativeNotRecursive(identifier);
            }

            String prodName = this.currentProduction.getNameToken().getText();

            // is it left recursive?
            Element element = grammarAlternative.getElement(0);
            if (element instanceof ProductionElement
                    && ((ProductionElement) element).getProduction().getName()
                            .equals(prodName)) {
                // check that recursion is followed by token
                if (grammarAlternative.getElements().size() < 2
                        || !(grammarAlternative.getElement(1) instanceof TokenElement)) {
                    throw CompilerException
                            .recursionNotFollowedByToken(identifier);
                }
            }
            else {
                // not left recursive => check that it is right recursive
                element = grammarAlternative.getElement(size - 1);
                if (!(element instanceof ProductionElement)
                        || !((ProductionElement) element).getProduction()
                                .getName().equals(prodName)) {
                    throw CompilerException.alternativeNotRecursive(identifier);
                }
            }

            this.currentPriorityLevel.addAlternative(grammarAlternative);
            grammarAlternative.setPriorityLevel(this.currentPriorityLevel,
                    identifier);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.