|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface for objects that can write Triples into a file or other stream. This can be used as a uniform way of generating OWL files.
The usual contract to use TripleWriters isinit()
writePrefix()
*addImport()
*write()
*close()
Method Summary | |
void |
addImport(String uri)
Adds an owl:imports statement to the default ontology in this writer. |
void |
close()
Tells the writer that we're finished. |
void |
init(String baseURI)
Initializes this writer to work with a given base URI. |
void |
write(RDFResource resource,
RDFProperty property,
Object object)
Writes a given Triples into this writer. |
void |
writePrefix(String prefix,
String namespace)
Writes a prefix declaration into this writer. |
Method Detail |
public void addImport(String uri)
uri
- the URI to addpublic void close() throws Exception
Exception
public void init(String baseURI)
addImport
will add to this ontology.
baseURI
- the base URI, such as http://www.a.com/ontology.owl
public void write(RDFResource resource, RDFProperty property, Object object) throws Exception
Exception
public void writePrefix(String prefix, String namespace) throws Exception
prefix
- the prefix to define ("" for the default namespace)namespace
- the namespace to assign to the prefix
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |