|
Protégé-OWL 3.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TripleWriter
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 |
---|
void addImport(String uri)
uri
- the URI to addvoid close() throws Exception
Exception
void init(String baseURI)
addImport
will add to this ontology.
baseURI
- the base URI, such as http://www.a.com/ontology.owl
void write(RDFResource resource, RDFProperty property, Object object) throws Exception
Exception
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
|
Protégé-OWL 3.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |