001/* 002 * (C) Copyright 2006-2007 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Nuxeo - initial API and implementation 018 * 019 * $Id: Statement.java 19480 2007-05-27 10:46:28Z sfermigier $ 020 */ 021 022package org.nuxeo.ecm.platform.relations.api; 023 024import java.io.Serializable; 025import java.util.Map; 026 027/** 028 * Statement interface. 029 * 030 * @author <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> 031 */ 032public interface Statement extends Comparable<Statement>, Serializable, Cloneable { 033 034 Node getObject(); 035 036 void setObject(Node object); 037 038 Resource getPredicate(); 039 040 void setPredicate(Node predicate); 041 042 Subject getSubject(); 043 044 void setSubject(Node subject); 045 046 // property (statement metadata) management 047 048 Map<Resource, Node[]> getProperties(); 049 050 Map<String, Node[]> getStringProperties(); 051 052 Node getProperty(Resource property); 053 054 Node[] getProperties(Resource property); 055 056 void setProperties(Map<Resource, Node[]> properties); 057 058 void setProperty(Resource property, Node value); 059 060 void setProperties(Resource property, Node[] values); 061 062 void deleteProperties(); 063 064 void deleteProperty(Resource property); 065 066 void deleteProperty(Resource property, Node value); 067 068 void deleteProperties(Resource property, Node[] values); 069 070 void addProperties(Map<Resource, Node[]> properties); 071 072 void addProperty(Resource property, Node value); 073 074 void addProperties(Resource property, Node[] values); 075 076 Object clone(); 077 078}