Examples of CVTerm


Examples of org.sbml.jsbml.CVTerm

  }
 
  /** Public get SBOTerm string */
  private String getSBOTermString(String sboTerm){
    String text = "<p>";
    CVTerm term = new CVTerm(CVTerm.Qualifier.BQB_IS, "urn:miriam:biomodels.sbo:" + sboTerm);
    text += String.format("<b><span color=\"green\">%s</span></b><br>", sboTerm);
    for (String rURI : term.getResources()){
      text += MiriamResourceInfo.getInfoFromMiriamResource(link, rURI);
    }
    text += "</p>";
    return text;
  }
View Full Code Here

Examples of org.sbml.jsbml.CVTerm

  }

  @Test
  public void test_CVTerm_addResource()
  {
    CVTerm term = new  CVTerm(); // TODO : difference to document => CVTerm term = new  CVTerm(CVTerm.Type.MODEL_QUALIFIER); constructor does not exist
    term.setQualifierType(CVTerm.Type.MODEL_QUALIFIER);   
    String resource =  "GO6666";
    assertTrue( term != null );
    assertTrue( term.getQualifierType() == CVTerm.Type.MODEL_QUALIFIER ); // TODO : difference to document ==> CVTerm.Type.MODEL_QUALIFIER
    term.addResource(resource);
    List<String> xa = term.getResources(); // TODO : difference to document ==> term.getResources(); does not return XMLAttributes but a List<String>
    assertTrue( xa.size() == 1 );
    // assertTrue(xa.getName(0).equals( "rdf:resource"));
    assertTrue(xa.get(0).equals( "GO6666"));
    term = null;
  }
View Full Code Here

Examples of org.sbml.jsbml.CVTerm

    term = null;
  }

  @Test public void test_CVTerm_create()
  {
    CVTerm term = new  CVTerm();
    term.setQualifierType(CVTerm.Type.MODEL_QUALIFIER)
    assertTrue( term != null );
    assertTrue( term.getQualifierType() == CVTerm.Type.MODEL_QUALIFIER );
    term = null;
  }
View Full Code Here

Examples of org.sbml.jsbml.CVTerm

  }
  */

  @Test public void test_CVTerm_getResources()
  {
    CVTerm term = new  CVTerm();
    term.setQualifierType(CVTerm.Type.MODEL_QUALIFIER);
    String resource =  "GO6666";
    String resource1 =  "OtherURI";
    long number;
    term.addResource(resource);
    term.addResource(resource1);
    number = term.getNumResources();
    assertTrue( number == 2 );
    assertTrue(term.getResourceURI(0).equals( "GO6666"));
    assertTrue(term.getResourceURI(1).equals( "OtherURI"));
    term = null;
  }
View Full Code Here

Examples of org.sbml.jsbml.CVTerm

    term = null;
  }

  @Test public void test_CVTerm_set_get()
  {
    CVTerm term = new  CVTerm();
    term.setQualifierType(CVTerm.Type.MODEL_QUALIFIER);
    assertTrue( term != null );
    assertTrue( term.getQualifierType() == CVTerm.Type.MODEL_QUALIFIER );
    term.setModelQualifierType(CVTerm.Qualifier.BQM_IS); // TODO : difference to document ==> libsbml.BQM_IS become
    assertTrue( term != null );
    assertTrue( term.getQualifierType() == CVTerm.Type.MODEL_QUALIFIER );
    assertTrue( term.getModelQualifierType() == CVTerm.Qualifier.BQM_IS );
    term.setQualifierType(CVTerm.Type.BIOLOGICAL_QUALIFIER);
    term.setBiologicalQualifierType(CVTerm.Qualifier.BQB_IS);
    assertTrue( term.getQualifierType() == CVTerm.Type.BIOLOGICAL_QUALIFIER );
    assertTrue( term.getBiologicalQualifierType() == CVTerm.Qualifier.BQB_IS );
    term = null;
  }
View Full Code Here

Examples of org.sbml.jsbml.CVTerm

    Species s1 = model.createSpecies("s1", model.createCompartment("c1"));
    s1.setMetaId("meta_" + s1.getId());
    // Not necessary anymore.
    // s1.getAnnotation().addRDFAnnotationNamespace("bqbiol", "",
    // "http://biomodels.net/biology-qualifiers/");
    s1.addCVTerm(new CVTerm(CVTerm.Type.BIOLOGICAL_QUALIFIER,
        CVTerm.Qualifier.BQB_HAS_PART, "urn:miriam:obo.chebi:CHEBI:15422"));
    System.out.println("==================================");
    new SBMLWriter().write(doc, System.out);
    new JTreeOfSBML(doc);
  }
View Full Code Here

Examples of org.sbml.jsbml.CVTerm

      // sets the qualifierType and biologicalQualifierType of this
      // CVTerm. Then, adds the
      // initialized CVTerm to annotation.
      if (biologicalQualifierMap.containsKey(elementName)
          && !hasAttributes && !hasNamespaces) {
        CVTerm cvTerm = new CVTerm();
        cvTerm.setQualifierType(Type.BIOLOGICAL_QUALIFIER);
        cvTerm.setBiologicalQualifierType(biologicalQualifierMap
            .get(elementName));

        annotation.addCVTerm(cvTerm);
        return cvTerm;
      } else {
View Full Code Here

Examples of org.sbml.jsbml.CVTerm

  }

  @Test
  public void test_CVTerm_addResource()
  {
    CVTerm term = new  CVTerm(); // TODO : difference to document => CVTerm term = new  CVTerm(CVTerm.Type.MODEL_QUALIFIER); constructor does not exist
    term.setQualifierType(CVTerm.Type.MODEL_QUALIFIER);   
    String resource =  "GO6666";
    assertTrue( term != null );
    assertTrue( term.getQualifierType() == CVTerm.Type.MODEL_QUALIFIER ); // TODO : difference to document ==> CVTerm.Type.MODEL_QUALIFIER
    term.addResource(resource);
    List<String> xa = term.getResources(); // TODO : difference to document ==> term.getResources(); does not return XMLAttributes but a List<String>
    assertTrue( xa.size() == 1 );
    // assertTrue(xa.getName(0).equals( "rdf:resource"));
    assertTrue(xa.get(0).equals( "GO6666"));
    term = null;
  }
View Full Code Here

Examples of org.sbml.jsbml.CVTerm

    term = null;
  }

  @Test public void test_CVTerm_create()
  {
    CVTerm term = new  CVTerm();
    term.setQualifierType(CVTerm.Type.MODEL_QUALIFIER)
    assertTrue( term != null );
    assertTrue( term.getQualifierType() == CVTerm.Type.MODEL_QUALIFIER );
    term = null;
  }
View Full Code Here

Examples of org.sbml.jsbml.CVTerm

  }
  */

  @Test public void test_CVTerm_getResources()
  {
    CVTerm term = new  CVTerm();
    term.setQualifierType(CVTerm.Type.MODEL_QUALIFIER);
    String resource =  "GO6666";
    String resource1 =  "OtherURI";
    long number;
    term.addResource(resource);
    term.addResource(resource1);
    number = term.getNumResources();
    assertTrue( number == 2 );
    assertTrue(term.getResourceURI(0).equals( "GO6666"));
    assertTrue(term.getResourceURI(1).equals( "OtherURI"));
    term = null;
  }
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.