com.ontotext.wsmo4j.parser.xml
Class WsmlXmlParser

java.lang.Object
  extended by com.ontotext.wsmo4j.parser.xml.WsmlXmlParser
All Implemented Interfaces:
org.wsmo.wsml.Parser

public class WsmlXmlParser
extends Object
implements org.wsmo.wsml.Parser

Parse XML file and creates WSMO obkjects (check wsml-xml-syntax.xsd)

Author:
not attributable

Field Summary
 
Fields inherited from interface org.wsmo.wsml.Parser
CACHE_LOGICALEXPRESSION_STRING, CLEAR_MODEL
 
Constructor Summary
WsmlXmlParser(Map map)
          Map properties = new TreeMap(); properties.put(Factory.PROVIDER_CLASS, "com.ontotext.wsmo4j.xmlparser.WsmlXmlParser"); properties.put(Parser.PARSER_WSMO_FACTORY, factory); properties.put(Parser.PARSER_LE_FACTORY, leFactory); parser = Factory.createParser(properties);
 
Method Summary
 List<Object> getErrors()
           
 List<Object> getWarnings()
           
 Set<String> listKeywords()
           
 org.wsmo.common.TopEntity[] parse(Reader src)
          Parses a XML source
 org.wsmo.common.TopEntity[] parse(Reader src, Map options)
          Parses a XML source
 org.wsmo.common.TopEntity[] parse(StringBuffer src)
          Parses a XML source
 org.wsmo.common.TopEntity[] parse(StringBuffer src, Map options)
          Parses a XML source
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WsmlXmlParser

public WsmlXmlParser(Map map)
Map properties = new TreeMap(); properties.put(Factory.PROVIDER_CLASS, "com.ontotext.wsmo4j.xmlparser.WsmlXmlParser"); properties.put(Parser.PARSER_WSMO_FACTORY, factory); properties.put(Parser.PARSER_LE_FACTORY, leFactory); parser = Factory.createParser(properties);

Parameters:
map - Initialization properties, requires Parser.PARSER_LE_FACTORY and Parser.PARSER_WSMO_FACTORY
Method Detail

parse

public org.wsmo.common.TopEntity[] parse(Reader src)
                                  throws IOException,
                                         org.wsmo.wsml.ParserException
Parses a XML source

Specified by:
parse in interface org.wsmo.wsml.Parser
Parameters:
src - Reader to the xml file
Throws:
IOException
org.wsmo.wsml.ParserException

parse

public org.wsmo.common.TopEntity[] parse(Reader src,
                                         Map options)
                                  throws IOException,
                                         org.wsmo.wsml.ParserException
Parses a XML source

Specified by:
parse in interface org.wsmo.wsml.Parser
Parameters:
src - Reader to the xml file
options - Ignored
Throws:
IOException
org.wsmo.wsml.ParserException

parse

public org.wsmo.common.TopEntity[] parse(StringBuffer src)
                                  throws org.wsmo.wsml.ParserException
Parses a XML source

Specified by:
parse in interface org.wsmo.wsml.Parser
Parameters:
src - Source xml
Throws:
org.wsmo.wsml.ParserException

parse

public org.wsmo.common.TopEntity[] parse(StringBuffer src,
                                         Map options)
                                  throws org.wsmo.wsml.ParserException
Parses a XML source

Specified by:
parse in interface org.wsmo.wsml.Parser
Parameters:
src - Source xml
options - Ignored
Throws:
org.wsmo.wsml.ParserException

listKeywords

public Set<String> listKeywords()
Specified by:
listKeywords in interface org.wsmo.wsml.Parser

getWarnings

public List<Object> getWarnings()
Specified by:
getWarnings in interface org.wsmo.wsml.Parser

getErrors

public List<Object> getErrors()
Specified by:
getErrors in interface org.wsmo.wsml.Parser


Copyright © 2004-2008 Ontotext Lab.. All Rights Reserved.