001/* 002 * Licensed to DuraSpace under one or more contributor license agreements. 003 * See the NOTICE file distributed with this work for additional information 004 * regarding copyright ownership. 005 * 006 * DuraSpace licenses this file to you under the Apache License, 007 * Version 2.0 (the "License"); you may not use this file except in 008 * compliance with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package org.fcrepo.kernel.impl.operations; 019 020import org.fcrepo.kernel.api.RdfStream; 021import org.fcrepo.kernel.api.identifiers.FedoraId; 022import org.fcrepo.kernel.api.operations.CreateRdfSourceOperation; 023 024/** 025 * Operation to create an RDF source. 026 * 027 * @author bbpennel 028 */ 029public class CreateRdfSourceOperationImpl extends AbstractRdfSourceOperation implements CreateRdfSourceOperation { 030 031 private FedoraId parentId; 032 033 /** 034 * The interaction model 035 */ 036 private String interactionModel; 037 038 private boolean archivalGroup = false; 039 040 /** 041 * Constructor for creation operation 042 * 043 * @param rescId the internal identifier. 044 * @param interactionModel interaction model for the resource 045 * @param triples triples stream for the resource 046 */ 047 protected CreateRdfSourceOperationImpl(final FedoraId rescId, final String interactionModel, 048 final RdfStream triples) { 049 super(rescId, triples); 050 this.interactionModel = interactionModel; 051 } 052 053 @Override 054 public String getInteractionModel() { 055 return interactionModel; 056 } 057 058 @Override 059 public boolean isArchivalGroup() { 060 return this.archivalGroup; 061 } 062 063 @Override 064 public FedoraId getParentId() { 065 return parentId; 066 } 067 068 /** 069 * @param parentId the parentId to set 070 */ 071 public void setParentId(final FedoraId parentId) { 072 this.parentId = parentId; 073 } 074 075 /** 076 * 077 * @param flag flag indicating whether resource is an Archival Group 078 */ 079 public void setArchivalGroup(final boolean flag) { 080 this.archivalGroup = flag; 081 } 082 083 084}