org.w3c.rdfpic.core
Class TxtSchemaParser

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

class TxtSchemaParser
extends java.lang.Object

A parser for a simple schema definition language. It closely follow the following:

schema = [main]
main = STR | add | namedef | uridef
namedef = 'name' '=' STR
uridef = 'URI' '=' STR
builtin = 'builtin' '=' INT
add = 'add' '(' STR ',' STR ',' STR')' | 'add' '(' STR ',' STR ')'
INT = STR

The constructor parses the file immediate, and getSchema() can be used to to retrieve the schema after successful parsing.


Field Summary
(package private)  java.lang.String current
           
(package private)  java.util.Vector defs
           
(package private)  java.util.Vector expl
           
(package private)  RdfSchema schema
           
(package private)  SimpleToken tokGen
           
(package private)  java.util.Vector vec
           
 
Constructor Summary
(package private) TxtSchemaParser(SimpleToken tokGen)
           
 
Method Summary
private  void accept(java.lang.String str)
           
private  boolean addP()
           
private  void advance()
           
private  boolean builtinP()
           
private  java.lang.String extract()
           
 RdfSchema getSchema()
           
private  boolean isStr()
           
private  void mainP()
           
private  boolean namedefP()
           
private  boolean strP()
           
private  void test()
           
private  boolean uridefP()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

tokGen

SimpleToken tokGen

current

java.lang.String current

schema

RdfSchema schema

vec

java.util.Vector vec

defs

java.util.Vector defs

expl

java.util.Vector expl
Constructor Detail

TxtSchemaParser

TxtSchemaParser(SimpleToken tokGen)
Method Detail

getSchema

public RdfSchema getSchema()

advance

private void advance()

mainP

private final void mainP()
                  throws SyntaxException

isStr

private final boolean isStr()

accept

private final void accept(java.lang.String str)
                   throws SyntaxException

strP

private final boolean strP()
                    throws SyntaxException

extract

private final java.lang.String extract()
                                throws SyntaxException

test

private final void test()
                 throws SyntaxException

addP

private final boolean addP()
                    throws SyntaxException

namedefP

private final boolean namedefP()
                        throws SyntaxException

builtinP

private final boolean builtinP()
                        throws SyntaxException

uridefP

private final boolean uridefP()
                       throws SyntaxException