|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.biomoby.shared.extended.DataTypeParser
public class DataTypeParser
An example of how to use this class is below:
DataTypeParser p = new DataTypeParser("http://biomoby.org/RESOURCES/MOBY-S/Objects");
MobyDataType[] types = p.getMobyDataTypesFromRDF();
for (int i = 0; i < types.length; i++) {
System.out.println(types[i]);
}
This would output a textual representation of the datatype.
Constructor Summary | |
---|---|
DataTypeParser()
Default constructor - need to set the URL for the RDF document that describes the Data Type ontology using setURL(String url) or setURL(URL url) |
|
DataTypeParser(String url)
Parameterized Constructor that takes in a string argument that is the url for the RDF document that describes the Data Type ontology. |
|
DataTypeParser(URL url)
Parameterized Constructor that takes in a url for the RDF document that describes the Data Type ontology. |
Method Summary | |
---|---|
InputStream |
getInputStream()
|
MobyDataType[] |
getMobyDataTypesFromRDF()
|
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 DataTypeParser()
public DataTypeParser(String url) throws MobyException
url
- a string representation for the URL that resolves to the RDF
document that describes the Data Type ontology
MobyException
- thrown if the url is malformedpublic DataTypeParser(URL url) throws MobyException
url
- the URL that resolves to the RDF document that describes the
Data Type ontology
MobyException
- thrown if the url is malformedMethod Detail |
---|
public void setUrl(URL url) throws MobyException
url
- the URL that resolves to the RDF document that describes the
Data Type ontology
MobyException
- thrown if the url is malformedpublic void setUrl(String url) throws MobyException
url
- the string represention of the URL that resolves to the RDF
document that describes the Data Type ontology.
MobyException
- thrown if the url is malformedpublic URL getUrl()
public void setInputStream(InputStream is)
public InputStream getInputStream()
public MobyDataType[] getMobyDataTypesFromRDF() throws MobyException
MobyException
- thrown if the location of the RDF document describing the
Data Type ontology is invalidpublic 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 |