de.fuberlin.wiwiss.d2rq.parser
Class MapParser

java.lang.Object
  extended by de.fuberlin.wiwiss.d2rq.parser.MapParser

public class MapParser
extends Object

Creates a Mapping from a Jena model representation of a D2RQ mapping file.

Version:
$Id: MapParser.java,v 1.21 2006/10/23 15:39:14 cyganiak Exp $
Author:
Richard Cyganiak (richard@cyganiak.de)

Field Summary
static String URI_CHAR_REGEX
          A regular expression that matches zero or more characters that are allowed inside URIs
 
Constructor Summary
MapParser(com.hp.hpl.jena.rdf.model.Model mapModel, String baseURI)
          Constructs a new MapParser from a Jena model containing the RDF statements from a D2RQ mapping file.
 
Method Summary
static String absolutizeURI(String uri)
          Turns a relative URI into an absolute one, by using the current directory's file: URI as a base.
 Mapping parse()
          Starts the parsing process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URI_CHAR_REGEX

public static final String URI_CHAR_REGEX
A regular expression that matches zero or more characters that are allowed inside URIs

See Also:
Constant Field Values
Constructor Detail

MapParser

public MapParser(com.hp.hpl.jena.rdf.model.Model mapModel,
                 String baseURI)
Constructs a new MapParser from a Jena model containing the RDF statements from a D2RQ mapping file.

Parameters:
mapModel - a Jena model containing the RDF statements from a D2RQ mapping file
Method Detail

absolutizeURI

public static String absolutizeURI(String uri)
Turns a relative URI into an absolute one, by using the current directory's file: URI as a base. This uses the same algorithm as Jena's Model class when reading a file.

Parameters:
uri - Any URI
Returns:
An absolute URI corresponding to the input

parse

public Mapping parse()
Starts the parsing process. Must be called before results can be retrieved from the getter methods.