diva.sketch.recognition
Class SceneParser

java.lang.Object
  extended by diva.sketch.recognition.SceneParser
All Implemented Interfaces:
ModelParser

public class SceneParser
extends Object
implements ModelParser

SceneParser parses an XML file representing a single interpretation of a scene into a Scene data structure. This interpretation can then be used for testing purposes. It currently has the limitation that interprets all typed data as "SimpleData", because it doesn't know how to handle complex data.

Version:
$Revision: 1.9 $
Author:
Michael Shilman (michaels@eecs.berkeley.edu)
See Also:
SceneWriter

Constructor Summary
SceneParser()
          Build a scene parser using the system-specified composite builder for
SceneParser(CompositeBuilder builder)
          Build a scene parser that uses the given builder declarations to parse its typed data.
 
Method Summary
static void main(String[] args)
          Simple test of this class.
 Object parse(Reader in)
          Parse the input stream dictated by the given reader intoa scene.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SceneParser

public SceneParser()
            throws Exception
Build a scene parser using the system-specified composite builder for

Throws:
Exception

SceneParser

public SceneParser(CompositeBuilder builder)
Build a scene parser that uses the given builder declarations to parse its typed data.

Method Detail

parse

public Object parse(Reader in)
             throws Exception
Parse the input stream dictated by the given reader intoa scene.

Specified by:
parse in interface ModelParser
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Simple test of this class.

Throws:
Exception


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.