Examples of ElementRule


Examples of com.sun.msv.grammar.relax.ElementRule

        }
       
        ElementRules er = getReader().module.elementRules.getOrCreate(label);
        getReader().setDeclaredLocationOf(er);    // remember where this ElementRules is defined
       
        er.addElementRule( reader.pool, new ElementRule( reader.pool, clause, getContentModel() ) );
       
        super.endSelf();
    }
View Full Code Here

Examples of com.sun.msv.grammar.relax.ElementRule

                reader.backwardReference.memorizeLink(att);
            }
           
            // create anonymous ElementRule. this rule will never be added to
            // RefContainer.
            return new ElementRule( reader.pool, c, contentModel );
        } catch( DatatypeException e ) {
            // derivation failed
            reader.reportError( e, RELAXCoreReader.ERR_BAD_TYPE, e.getMessage() );
            // recover by using harmless expression. anything will do.
            return Expression.nullSet;
View Full Code Here

Examples of com.sun.msv.grammar.relax.ElementRule

       
        Object o = filter.getVerifier().getCurrentElementType();
       
        if( o instanceof ElementRule ) {
            // for RELAX
            ElementRule er = (ElementRule)o;
            if( er.getParent()==null )
                System.out.println("##inline");
            else
                System.out.println(er.getParent().name);
            return;
        }
        if( o instanceof TypedElementPattern ) {
            // for typed TREX
            System.out.println( ((TypedElementPattern)o).label );
View Full Code Here

Examples of com.sun.msv.grammar.relax.ElementRule

        }
       
        ElementRules er = getReader().module.elementRules.getOrCreate(label);
        getReader().setDeclaredLocationOf(er);    // remember where this ElementRules is defined
       
        er.addElementRule( reader.pool, new ElementRule( reader.pool, clause, getContentModel() ) );
       
        super.endSelf();
    }
View Full Code Here

Examples of com.sun.msv.grammar.relax.ElementRule

                reader.backwardReference.memorizeLink(att);
            }
           
            // create anonymous ElementRule. this rule will never be added to
            // RefContainer.
            return new ElementRule( reader.pool, c, contentModel );
        } catch( DatatypeException e ) {
            // derivation failed
            reader.reportError( e, RELAXCoreReader.ERR_BAD_TYPE, e.getMessage() );
            // recover by using harmless expression. anything will do.
            return Expression.nullSet;
View Full Code Here

Examples of net.sf.mzmine.modules.peaklistmethods.identification.formulaprediction.elements.ElementRule

    String elementsArray[] = elements.split(",");
    for (String elementEntry : elementsArray) {

      try {
        ElementRule rule = new ElementRule(elementEntry);

        // We can ignore elements with max 0 atoms
        if (rule.getMaxCount() == 0)
          continue;

        rulesSet.add(rule);

      } catch (IllegalArgumentException e) {
View Full Code Here

Examples of net.sf.mzmine.modules.peaklistmethods.identification.formulaprediction.elements.ElementRule

      String elementsArray[] = elements.split(",");
      for (String elementEntry : elementsArray) {

        try {
          ElementRule rule = new ElementRule(elementEntry);

          // We can ignore elements with max 0 atoms
          if (rule.getMaxCount() == 0) {
            continue;
          }

          // Adjust the maximum numbers according to the mass we are
          // searching
          int maxCountAccordingToMass = (int) (massRange.getMax() / rule
              .getMass());
          if (rule.getMaxCount() > maxCountAccordingToMass) {
            rule.setMaxCount(maxCountAccordingToMass);
          }

          rulesSet.add(rule);

        } catch (IllegalArgumentException e) {
View Full Code Here

Examples of net.sf.mzmine.modules.peaklistmethods.identification.formulaprediction.elements.ElementRule

          + msmsScan.getScanNumber());
    }
    // Sorted by mass in descending order
    ArrayList<ElementRule> rulesSet = new ArrayList<ElementRule>();
    for (IIsotope isotope : parentFormula.isotopes()) {
      ElementRule rule = new ElementRule(isotope.getSymbol(), 0,
          parentFormula.getIsotopeCount(isotope));
      rulesSet.add(rule);
    }
    ElementRule msmsElementRules[] = rulesSet.toArray(new ElementRule[0]);

    int totalMSMSpeaks = 0, interpretedMSMSpeaks = 0;
    Map<DataPoint, String> msmsAnnotations = new Hashtable<DataPoint, String>();

    msmsCycle : for (DataPoint dp : msmsIons) {
View Full Code Here

Examples of org.antlr.works.grammar.element.ElementRule

        // 'rules' is a list of set of rules given by ANTLR
        for (Object ruleSet : rules) {
            final Set rulesSet = (Set) ruleSet;
            for (Object rule : rulesSet) {
                final Rule aRule = (Rule) rule;
                final ElementRule r = engine.getRuleWithName(aRule.name);
                if (r == null)
                    continue;
                r.setLeftRecursiveRulesSet(rulesSet);
            }
        }
    }
View Full Code Here

Examples of org.antlr.works.grammar.element.ElementRule

    protected boolean willLaunch() {

        if(!checkForCurrentRule())
            return false;

        ElementRule rule = window.getCurrentRule();
        List<ElementReference> refs = window.editorRules.getReferencesInRule(rule);
        if(refs == null || refs.isEmpty()) {
            XJAlert.display(window.getJavaContainer(), "Error", "The selected rule doesn't contain any references");
            return false;
        }
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.