org.opencyc.cycobject
Class CycListParser

java.lang.Object
  |
  +--org.opencyc.cycobject.CycListParser

public class CycListParser
extends java.lang.Object

Provides a parser that reads a String representation and constructs the corresponding CycList. Has a weakness in that quoted strings must not contain embedded newlines.

Author:
Stephen L. Reed

Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.

the license

www.opencyc.org

OpenCyc at SourceForge

THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Field Summary
static int verbosity
          Verbosity indicator 0 indicates quiet on a range of 0 ...
 
Constructor Summary
CycListParser(CycAccess cycAccess)
          Constructs a new CycListParser object.
 
Method Summary
protected static java.io.StreamTokenizer makeStreamTokenizer(java.lang.String string)
          Returns a configured StreamTokenizer.
 CycList read(java.io.StreamTokenizer st)
          Parses a CycList string representation.
 CycList read(java.lang.String string)
          Parses a CycList string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

verbosity

public static int verbosity
Verbosity indicator 0 indicates quiet on a range of 0 ... 10
Constructor Detail

CycListParser

public CycListParser(CycAccess cycAccess)
Constructs a new CycListParser object.
Method Detail

read

public CycList read(java.lang.String string)
             throws CycApiException
Parses a CycList string representation.
Parameters:
st - a StreamTokenizer whose source is the CycList string representation.
Returns:
the corresponding CycList

makeStreamTokenizer

protected static java.io.StreamTokenizer makeStreamTokenizer(java.lang.String string)
Returns a configured StreamTokenizer.
Parameters:
string - the string to be parsed
Returns:
a configured StreamTokenizer

read

public CycList read(java.io.StreamTokenizer st)
             throws CycApiException
Parses a CycList string representation.
Parameters:
st - a StreamTokenizer whose source is the CycList string representation.
Returns:
the corresponding CycList