|
Version: 1.1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biomoby.shared.extended.NamespaceParser
public class NamespaceParser
An example of how to use this class is below:
NamespaceParser p = new NamespaceParser("http://biomoby.org/RESOURCES/MOBY-S/Namespaces");
MobyNamespace[] namespaces = p.getMobyNamespacesFromRDF();
for (int i = 0; i < namespaces.length; i++) {
System.out.println(namespaces[i]);
}
This would output the following: the name and description for each namespace in the document
| Constructor Summary | |
|---|---|
NamespaceParser()
Default constructor - need to set the URL for the RDF document that describes the Namespace ontology using setURL(String url) or setURL(URL url) |
|
NamespaceParser(String url)
Parameterized Constructor that takes in a string argument that is the url for the RDF document that describes the Namespace ontology. |
|
NamespaceParser(URL url)
Parameterized Constructor that takes in a url for the RDF document that describes the Namespace ontology. |
|
| Method Summary | |
|---|---|
InputStream |
getInputStream()
|
MobyNamespace[] |
getMobyNamespacesFromRDF()
|
URL |
getUrl()
|
static void |
main(String[] args)
|
void |
setInputStream(InputStream is)
If not null, overrides the URL when reading the definitions (e.g. if you have the RDF as a String, not a URL use this). |
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 |
|---|
public NamespaceParser()
public NamespaceParser(String url)
throws MobyException
url - a string representation for the URL that resolves to the RDF
document that describes the Namespace ontology
MobyException - thrown if the url is malformed
public NamespaceParser(URL url)
throws MobyException
url - the URL that resolves to the RDF document that describes the
Namespace ontology
MobyException - thrown if the url is malformed| Method Detail |
|---|
public void setUrl(URL url)
throws MobyException
url - the URL that resolves to the RDF document that describes the
Namespace ontology
MobyException - thrown if the url is malformed
public void setUrl(String url)
throws MobyException
url - the string representation of the URL that resolves to the RDF
document that describes the Namespace ontology
MobyException - thrown if the url is malformedpublic URL getUrl()
public void setInputStream(InputStream is)
public InputStream getInputStream()
public MobyNamespace[] getMobyNamespacesFromRDF()
throws MobyException
MobyException - thrown if the location of the RDF document describing the
Namsepace ontology is invalid
public static void main(String[] args)
throws MobyException
MobyException
|
Version: 1.1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||