Package org.sbml.jsbml.util.filters

Examples of org.sbml.jsbml.util.filters.Filter


   * @throws IOException
   * @throws XMLStreamException
   */
  public static void main(String[] args) throws XMLStreamException, IOException {
    SBMLDocument doc = SBMLReader.read(new File(args[0]));
    Filter filter = new NameFilter(args[1]);
    System.out.println(doc.filter(filter));
  }
View Full Code Here


    assertTrue(microM.getUnitCount() == 2);
    assertTrue(microM.getName().equals("microM"));
    assertTrue(microM.getUnit(0).getScale() == -6);
    assertTrue(microM.getUnit(0).getKind().getName().equals("mole"));
   
    int nbSpecies = model.getListOfSpecies().filterList(new Filter() {
     
        /*
         * (non-Javadoc)
         * @see org.sbml.jsbml.util.filters.Filter#accepts(java.lang.Object)
         */
 
View Full Code Here

    assertTrue(model.getLevel() == 1 && model.getVersion() == 1);
   
    assertTrue(model.getId().equals(""));
    assertTrue(model.getName().equals(""));
   
    int nbRateRules = model.getListOfRules().filterList(new Filter() {
     
      /*
       * (non-Javadoc)
       * @see org.sbml.jsbml.util.filters.Filter#accepts(java.lang.Object)
       */
      public boolean accepts(Object o) {
        if (o instanceof RateRule) {
          return true;
        }
       
        return false;
      }
    }).size();

    int nbAssignmentRules = model.getListOfRules().filterList(new Filter() {
     
      /*
       * (non-Javadoc)
       * @see org.sbml.jsbml.util.filters.Filter#accepts(java.lang.Object)
       */
 
View Full Code Here

    assertTrue(model.getLevel() == 1 && model.getVersion() == 1);
   
    assertTrue(model.getId().equals(""));
    assertTrue(model.getName().equals(""));
   
    int nbRateRules = model.getListOfRules().filterList(new Filter() {
     
      /*
       * (non-Javadoc)
       * @see org.sbml.jsbml.util.filters.Filter#accepts(java.lang.Object)
       */
      public boolean accepts(Object o) {
        if (o instanceof RateRule) {
          return true;
        }
       
        return false;
      }
    }).size();

    int nbAssignmentRules = model.getListOfRules().filterList(new Filter() {
     
      /*
       * (non-Javadoc)
       * @see org.sbml.jsbml.util.filters.Filter#accepts(java.lang.Object)
       */
 
View Full Code Here

    assertTrue(model.getLevel() == 1 && model.getVersion() == 1);
   
    assertTrue(model.getId().equals(""));
    assertTrue(model.getName().equals(""));
   
    int nbRateRules = model.getListOfRules().filterList(new Filter() {
     
      /*
       * (non-Javadoc)
       * @see org.sbml.jsbml.util.filters.Filter#accepts(java.lang.Object)
       */
      public boolean accepts(Object o) {
        if (o instanceof RateRule) {
          return true;
        }
       
        return false;
      }
    }).size();

    int nbAssignmentRules = model.getListOfRules().filterList(new Filter() {
     
      /*
       * (non-Javadoc)
       * @see org.sbml.jsbml.util.filters.Filter#accepts(java.lang.Object)
       */
 
View Full Code Here

   * @return the {@link ContainedSpeciesType} that has the given speciesTypeState id or null if
   * no {@link ContainedSpeciesType} are found that match {@code id}.
   */
  public ContainedSpeciesType getContainedSpeciesType(final String id) {
    if (isSetListOfContainedSpeciesTypes()) {
      return listOfContainedSpeciesTypes.firstHit(new Filter() {

        @Override
        public boolean accepts(Object o) {
          if (o instanceof ContainedSpeciesType &&
              ((ContainedSpeciesType) o).getSpeciesTypeState().equals(id)) {
View Full Code Here

  {
    if (sbmlDocument.isSetModel() && sbmlDocument.getModel().getExtension(namespaceURI) != null)
    {
      // going through the document to find all Curve objects
      // filtering only on the ListOfLayouts
      List<? extends TreeNode> curveElements = sbmlDocument.getModel().getExtension(namespaceURI).filter(new Filter() {

        @Override
        public boolean accepts(Object o)
        {
          if (o instanceof Curve)
View Full Code Here

   * @return the {@link BindingSiteReference} that has the given speciesTypeState id or null if
   * no {@link BindingSiteReference} are found that match {@code id}.
   */
  public BindingSiteReference getUnboundBindingSite(final String id) {
    if (isSetListOfUnboundBindingSites()) {
      return listOfUnboundBindingSites.firstHit(new Filter() {

        @Override
        public boolean accepts(Object o) {
          if (o instanceof BindingSiteReference &&
              ((BindingSiteReference) o).getSpeciesTypeState().equals(id)) {
View Full Code Here

  public void processEndDocument(SBMLDocument sbmlDocument) {
    if (sbmlDocument.isSetModel() && sbmlDocument.getModel().getExtension(getNamespaceURI()) != null)
    {
      // going through the document to find all Curve objects
      // filtering only on the ListOfLayouts
      List<? extends TreeNode> curveElements = sbmlDocument.getModel().getExtension(getNamespaceURI()).filter(new Filter() {
        /* (non-Javadoc)
         * @see org.sbml.jsbml.util.filters.Filter#accepts(java.lang.Object)
         */
        @Override
        public boolean accepts(Object o) {
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.util.filters.Filter

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.