Version: 1.1.1

org.biomoby.shared.extended
Class ServiceTypeParser

java.lang.Object
  extended by org.biomoby.shared.extended.ServiceTypeParser

public class ServiceTypeParser
extends Object

Author:
Eddie created Oct 18, 2005

        ServiceTypeParser p = new ServiceTypeParser("http://biomoby.org/RESOURCES/MOBY-S/Services");
                MobyServiceType[] types = p.getMobyServiceTypesFromRDF();
                for (int i = 0; i < types.length; i++) {
                        System.out.println(types[i]);
                }
   

This would output a textual representation of the service type.


Constructor Summary
ServiceTypeParser()
          Default constructor - need to set the URL for the RDF document that describes the Service Type ontology using setURL(String url) or setURL(URL url)
ServiceTypeParser(String url)
          Parameterized Constructor that takes in a string argument that is the url for the RDF document that describes the Service Type ontology.
ServiceTypeParser(URL url)
          Parameterized Constructor that takes in a url for the RDF document that describes the Service Type ontology.
 
Method Summary
 MobyServiceType[] getMobyServiceTypesFromRDF()
           
 URL getUrl()
           
static void main(String[] args)
           
 void setUrl(String url)
           
 void setUrl(URL url)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceTypeParser

public ServiceTypeParser()
Default constructor - need to set the URL for the RDF document that describes the Service Type ontology using setURL(String url) or setURL(URL url)


ServiceTypeParser

public ServiceTypeParser(String url)
                  throws MobyException
Parameterized Constructor that takes in a string argument that is the url for the RDF document that describes the Service Type ontology.

Parameters:
url - a string representation for the URL that resolves to the RDF document that describes the Service Type ontology
Throws:
MobyException - thrown if the url is malformed

ServiceTypeParser

public ServiceTypeParser(URL url)
                  throws MobyException
Parameterized Constructor that takes in a url for the RDF document that describes the Service Type ontology.

Parameters:
url - the URL that resolves to the RDF document that describes the Service Type ontology
Throws:
MobyException - thrown if the url is malformed
Method Detail

setUrl

public void setUrl(URL url)
            throws MobyException
Parameters:
url - the URL that resolves to the RDF document that describes the Service Type ontology
Throws:
MobyException - thrown if the url is malformed

setUrl

public void setUrl(String url)
            throws MobyException
Parameters:
url - the string represention of the URL that resolves to the RDF document that describes the Service Type ontology.
Throws:
MobyException - thrown if the url is malformed

getUrl

public URL getUrl()
Returns:
the url used to retrieve the RDF document that describes the Service Type ontology.

getMobyServiceTypesFromRDF

public MobyServiceType[] getMobyServiceTypesFromRDF()
                                             throws MobyException
Returns:
an array of MobyServiceType objects created by parsing the RDF document
Throws:
MobyException - thrown if the location of the RDF document describing the Service Type ontology is invalid

main

public static void main(String[] args)
                 throws MobyException
Throws:
MobyException

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010