org.deri.wsmo4j.io.parser.rdf
Class RDFParserImpl

java.lang.Object
  extended by org.deri.wsmo4j.io.parser.rdf.RDFParserImpl
All Implemented Interfaces:
org.wsmo.wsml.Parser

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

This class parses RDF files and returns an WSML TopEntity. For parsing, the openrdf rio parser is used.

  Created on May 02, 2006
  Committed by $Author: nathaliest $
  $Source$
 

Version:
$Revision: 2644 $ $Date: 2008-08-08 02:20:48 +0300 (Fri, 08 Aug 2008) $
Author:
nathalie.steinmetz@deri.org
See Also:
org.wsmo.wsml.RDFParser, RdfXmlParser

Field Summary
static String DC_TITLE
           
static String LOCAL_REPOSITORY
           
static String N_TRIPLES_SYNTAX
           
static String RDF_PROP_AS_ATTR
           
static String RDF_PROP_AS_REL
           
static String RDF_PROPERTIES
           
static String RDF_SYNTAX
           
static String RDF_XML_SYNTAX
           
static String RDFS_LABEL
           
static String RDFS_LABEL_CHOICE
           
static String TURTLE_SYNTAX
           
 
Fields inherited from interface org.wsmo.wsml.Parser
CACHE_LOGICALEXPRESSION_STRING, CLEAR_MODEL
 
Constructor Summary
RDFParserImpl(Map map)
           
 
Method Summary
 List<Object> getErrors()
          This method returns a List containing errors that occured during the RDF parsing and the transformation to the WSMO object model.
 List<Object> getWarnings()
          This method returns a List containing warnings that occured during the RDF parsing and the transformation to the WSMO object model.
 Set<String> listKeywords()
           
 org.wsmo.common.TopEntity[] parse(Reader src)
           
 org.wsmo.common.TopEntity[] parse(Reader src, Map options)
           
 org.wsmo.common.TopEntity[] parse(StringBuffer src)
           
 org.wsmo.common.TopEntity[] parse(StringBuffer src, Map options)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RDF_PROPERTIES

public static final String RDF_PROPERTIES
See Also:
Constant Field Values

RDF_PROP_AS_ATTR

public static final String RDF_PROP_AS_ATTR
See Also:
Constant Field Values

RDF_PROP_AS_REL

public static final String RDF_PROP_AS_REL
See Also:
Constant Field Values

RDF_SYNTAX

public static final String RDF_SYNTAX
See Also:
Constant Field Values

RDF_XML_SYNTAX

public static final String RDF_XML_SYNTAX
See Also:
Constant Field Values

N_TRIPLES_SYNTAX

public static final String N_TRIPLES_SYNTAX
See Also:
Constant Field Values

TURTLE_SYNTAX

public static final String TURTLE_SYNTAX
See Also:
Constant Field Values

RDFS_LABEL_CHOICE

public static final String RDFS_LABEL_CHOICE
See Also:
Constant Field Values

RDFS_LABEL

public static final String RDFS_LABEL
See Also:
Constant Field Values

DC_TITLE

public static final String DC_TITLE
See Also:
Constant Field Values

LOCAL_REPOSITORY

public static final String LOCAL_REPOSITORY
See Also:
Constant Field Values
Constructor Detail

RDFParserImpl

public RDFParserImpl(Map map)
Method Detail

parse

public org.wsmo.common.TopEntity[] parse(Reader src)
                                  throws IOException,
                                         org.wsmo.wsml.ParserException,
                                         org.wsmo.common.exception.InvalidModelException
Specified by:
parse in interface org.wsmo.wsml.Parser
Throws:
IOException
org.wsmo.wsml.ParserException
org.openrdf.rio.ParseException
org.wsmo.common.exception.InvalidModelException
See Also:
Parser.parse(java.io.Reader)

parse

public org.wsmo.common.TopEntity[] parse(Reader src,
                                         Map options)
                                  throws IOException,
                                         org.wsmo.wsml.ParserException,
                                         org.wsmo.common.exception.InvalidModelException
Specified by:
parse in interface org.wsmo.wsml.Parser
Throws:
IOException
org.wsmo.wsml.ParserException
org.wsmo.common.exception.InvalidModelException
See Also:
Parser.parse(java.io.Reader, java.util.Map)

parse

public org.wsmo.common.TopEntity[] parse(StringBuffer src)
                                  throws org.wsmo.wsml.ParserException,
                                         org.wsmo.common.exception.InvalidModelException
Specified by:
parse in interface org.wsmo.wsml.Parser
Throws:
org.wsmo.wsml.ParserException
org.wsmo.common.exception.InvalidModelException
See Also:
Parser.parse(java.lang.StringBuffer)

parse

public org.wsmo.common.TopEntity[] parse(StringBuffer src,
                                         Map options)
                                  throws org.wsmo.wsml.ParserException,
                                         org.wsmo.common.exception.InvalidModelException
Specified by:
parse in interface org.wsmo.wsml.Parser
Throws:
org.wsmo.wsml.ParserException
org.wsmo.common.exception.InvalidModelException
See Also:
Parser.parse(java.lang.StringBuffer, java.util.Map)

listKeywords

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

getWarnings

public List<Object> getWarnings()
This method returns a List containing warnings that occured during the RDF parsing and the transformation to the WSMO object model.
Some warnings don't simply refer to one "error", but represent a "kind" of errors. Each warning contains a Set of triples that belong to that warning.

Specified by:
getWarnings in interface org.wsmo.wsml.Parser
Returns:
List of collected warnings

getErrors

public List<Object> getErrors()
This method returns a List containing errors that occured during the RDF parsing and the transformation to the WSMO object model.

Specified by:
getErrors in interface org.wsmo.wsml.Parser
Returns:
List of collected errors


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