001/* 002 * The contents of this file are subject to the license and copyright 003 * detailed in the LICENSE and NOTICE files at the root of the source 004 * tree. 005 */ 006package org.fcrepo.kernel.impl.operations; 007 008import org.fcrepo.kernel.api.RdfStream; 009import org.fcrepo.kernel.api.Transaction; 010import org.fcrepo.kernel.api.identifiers.FedoraId; 011import org.fcrepo.kernel.api.operations.CreateRdfSourceOperation; 012 013/** 014 * Operation to create an RDF source. 015 * 016 * @author bbpennel 017 */ 018public class CreateRdfSourceOperationImpl extends AbstractRdfSourceOperation implements CreateRdfSourceOperation { 019 020 private FedoraId parentId; 021 022 /** 023 * The interaction model 024 */ 025 private String interactionModel; 026 027 private boolean archivalGroup = false; 028 029 /** 030 * Constructor for creation operation 031 * 032 * @param transaction the transaction 033 * @param rescId the internal identifier. 034 * @param interactionModel interaction model for the resource 035 * @param triples triples stream for the resource 036 */ 037 protected CreateRdfSourceOperationImpl(final Transaction transaction, final FedoraId rescId, 038 final String interactionModel, final RdfStream triples) { 039 super(transaction, rescId, triples); 040 this.interactionModel = interactionModel; 041 } 042 043 @Override 044 public String getInteractionModel() { 045 return interactionModel; 046 } 047 048 @Override 049 public boolean isArchivalGroup() { 050 return this.archivalGroup; 051 } 052 053 @Override 054 public FedoraId getParentId() { 055 return parentId; 056 } 057 058 /** 059 * @param parentId the parentId to set 060 */ 061 public void setParentId(final FedoraId parentId) { 062 this.parentId = parentId; 063 } 064 065 /** 066 * 067 * @param flag flag indicating whether resource is an Archival Group 068 */ 069 public void setArchivalGroup(final boolean flag) { 070 this.archivalGroup = flag; 071 } 072 073 074}