Changeset 544


Ignore:
Timestamp:
08/05/12 02:17:56 (10 months ago)
Author:
tadamusiak
Message:

updating examples for consistency

Location:
trunk/ontoCAT/src/uk/ac/ebi/ontocat/examples
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ontoCAT/src/uk/ac/ebi/ontocat/examples/Example1.java

    r483 r544  
    4545                } 
    4646 
    47                 // Find all terms containing string thymus 
    48                 for (OntologyTerm ot : os.searchAll("thymus", SearchOptions.EXACT, 
     47                // Find all terms containing string adipocyte 
     48                // NB: OLS does not support searching properties in searchAll(), use 
     49                // searchOntology() instead 
     50                for (OntologyTerm ot : os.searchAll("adipocyte", 
    4951                                SearchOptions.INCLUDE_PROPERTIES)) { 
    5052                        System.out.println(ot); 
  • trunk/ontoCAT/src/uk/ac/ebi/ontocat/examples/Example2.java

    r483 r544  
    4949                } 
    5050 
    51                 // Find all terms containing string thymus 
    52                 for (OntologyTerm ot : os.searchAll("thymus", SearchOptions.EXACT, 
     51                // Find all terms containing string adipocyte 
     52                for (OntologyTerm ot : os.searchAll("adipocyte", 
    5353                                SearchOptions.INCLUDE_PROPERTIES)) { 
    5454                        System.out.println(ot); 
  • trunk/ontoCAT/src/uk/ac/ebi/ontocat/examples/Example3.java

    r483 r544  
    2525import java.net.URISyntaxException; 
    2626 
     27import uk.ac.ebi.ontocat.OntologyService.SearchOptions; 
    2728import uk.ac.ebi.ontocat.OntologyServiceException; 
    2829import uk.ac.ebi.ontocat.OntologyTerm; 
     
    3637 */ 
    3738public class Example3 { 
    38         public static void main(String[] args) throws OntologyServiceException, URISyntaxException { 
     39        public static void main(String[] args) throws OntologyServiceException, 
     40                        URISyntaxException { 
    3941                // Instantiate a FileOntologyService 
    40                 FileOntologyService os = new FileOntologyService(new URI("http://www.ebi.ac.uk/efo"), "EFO"); 
    41                 // Use a non-SKOS annotation for synonyms 
    42                 os.setSynonymSlot("alternative_term"); 
     42                FileOntologyService os = new FileOntologyService(new URI( 
     43                                "http://www.ebi.ac.uk/efo"), "EFO"); 
    4344 
    44                 // Find all terms containing string thymus 
    45                 for (OntologyTerm ot : os.searchAll("thymus")) { 
     45                // Find all terms containing string adipocyte 
     46                for (OntologyTerm ot : os.searchAll("adipocyte", 
     47                                SearchOptions.INCLUDE_PROPERTIES)) { 
    4648                        System.out.println(ot); 
    4749                } 
Note: See TracChangeset for help on using the changeset viewer.