001/** 002 * Licensed under the Apache License, Version 2.0 (the "License"); 003 * you may not use this file except in compliance with the License. 004 * You may obtain a copy of the License at 005 * 006 * http://www.apache.org/licenses/LICENSE-2.0 007 * 008 * Unless required by applicable law or agreed to in writing, software 009 * distributed under the License is distributed on an "AS IS" BASIS, 010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 011 * See the License for the specific language governing permissions and 012 * limitations under the License. 013 */ 014package com.github.commonsrdf.api; 015 016/** 017 * An <a href= "http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-triple" >RDF-1.1 018 * Triple</a>, as defined by <a href= "http://www.w3.org/TR/rdf11-concepts/" 019 * >RDF-1.1 Concepts and Abstract Syntax</a>, a W3C Recommendation published on 020 * 25 February 2014.<br> 021 * 022 * @see <a href= "http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-triple" >RDF-1.1 023 * Triple</a> 024 */ 025public interface Triple { 026 027 /** 028 * The subject of this triple, which may be either a {@link BlankNode} or an 029 * {@link IRI}, which are represented in Commons RDF by the interface 030 * {@link BlankNodeOrIRI}. 031 * 032 * @return The subject {@link BlankNodeOrIRI} of this triple. 033 * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-subject">RDF-1.1 034 * Triple subject</a> 035 */ 036 BlankNodeOrIRI getSubject(); 037 038 /** 039 * The predicate {@link IRI} of this triple. 040 * 041 * @return The predicate {@link IRI} of this triple. 042 * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-predicate">RDF-1.1 043 * Triple predicate</a> 044 */ 045 IRI getPredicate(); 046 047 /** 048 * The object of this triple, which may be either a {@link BlankNode}, an 049 * {@link IRI}, or a {@link Literal}, which are represented in Commons RDF 050 * by the interface {@link RDFTerm}. 051 * 052 * @return The object {@link RDFTerm} of this triple. 053 * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-object">RDF-1.1 054 * Triple object</a> 055 */ 056 RDFTerm getObject(); 057 058}