org.w3c.rdfpic.core
Class SchemaTxtDrv

java.lang.Object
  |
  +--org.w3c.rdfpic.core.SchemaTxtDrv

public class SchemaTxtDrv
extends java.lang.Object
implements SchemaFileDrv

A class to store/load schemas. SchemaTxtDrv uses a simple format for storing schema definitions. the following is an example:

name = "ThisSchemasname"
URI = "http://thisschema.com/thisschema.def"
builtin = "0"
add(NAME,EXPLANATION,DEFAULTVAL)

Where the parameters of add are all strings. DEFAULTVAL is optional. See the actual schemas used by RdfPic for more examples.


Field Summary
(package private)  java.net.URL active
           
 
Constructor Summary
SchemaTxtDrv()
           
 
Method Summary
 java.lang.Object clone()
           
 RdfSchema read()
          reads a schema definition from a file
 void setURL(java.net.URL url)
          set the url of the schema definition file
 void write(RdfSchema schema)
          writes (overwrites) a schema definition to a file
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

active

java.net.URL active
Constructor Detail

SchemaTxtDrv

public SchemaTxtDrv()
Method Detail

setURL

public void setURL(java.net.URL url)
Description copied from interface: SchemaFileDrv
set the url of the schema definition file
Specified by:
setURL in interface SchemaFileDrv

clone

public java.lang.Object clone()
Specified by:
clone in interface SchemaFileDrv
Overrides:
clone in class java.lang.Object

write

public void write(RdfSchema schema)
           throws java.io.IOException
Description copied from interface: SchemaFileDrv
writes (overwrites) a schema definition to a file
Specified by:
write in interface SchemaFileDrv

read

public RdfSchema read()
               throws java.io.IOException
Description copied from interface: SchemaFileDrv
reads a schema definition from a file
Specified by:
read in interface SchemaFileDrv