001 /*
002 * (c) Copyright 2009 University of Bristol
003 * All rights reserved.
004 * [See end of file]
005 */
006
007 package net.rootdev.javardfa;
008
009 /**
010 * @author Damian Steer <pldms@mac.com>
011 */
012
013 public interface StatementSink
014 {
015 /**
016 * Begin parsing
017 */
018 public void start();
019
020 /**
021 * Complete parsing
022 */
023 public void end();
024
025 /**
026 * Add statement with non-literal object.
027 * Blank nodes begin with _:, variables with ?, otherwise IRI
028 * @param subject Subject of triple
029 * @param predicate Predicate
030 * @param object Object
031 */
032 public void addObject(String subject, String predicate, String object);
033
034 /**
035 * Add statement with a literal object.
036 * As above, blank nodes begin with _:, variables with ?, otherwise IRI
037 * @param subject Subject of triple
038 * @param predicate Predicate
039 * @param lex Lexical form
040 * @param lang Language (may be null)
041 * @param datatype Datatype IRI (may be null)
042 */
043 public void addLiteral(String subject, String predicate, String lex, String lang, String datatype);
044 }
045
046 /*
047 * (c) Copyright 2009 University of Bristol
048 * All rights reserved.
049 *
050 * Redistribution and use in source and binary forms, with or without
051 * modification, are permitted provided that the following conditions
052 * are met:
053 * 1. Redistributions of source code must retain the above copyright
054 * notice, this list of conditions and the following disclaimer.
055 * 2. Redistributions in binary form must reproduce the above copyright
056 * notice, this list of conditions and the following disclaimer in the
057 * documentation and/or other materials provided with the distribution.
058 * 3. The name of the author may not be used to endorse or promote products
059 * derived from this software without specific prior written permission.
060 *
061 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
062 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
063 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
064 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
065 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
066 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
067 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
068 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
069 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
070 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
071 */