001/** 002 * Copyright 2015 DuraSpace, Inc. 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 */ 016package org.fcrepo.kernel.services; 017 018import java.io.IOException; 019import java.io.InputStream; 020 021import javax.jcr.Session; 022 023import org.fcrepo.kernel.models.FedoraResource; 024import org.fcrepo.kernel.utils.iterators.RdfStream; 025 026/** 027 * @author bbpennel 028 * @since Feb 20, 2014 029 */ 030public interface NodeService extends Service<FedoraResource> { 031 /** 032 * Copy an existing object from the source path to the destination path 033 * @param session the session 034 * @param source the source 035 * @param destination the destination 036 */ 037 void copyObject(Session session, String source, String destination); 038 039 /** 040 * Move an existing object from the source path to the destination path 041 * @param session the session 042 * @param source the source 043 * @param destination the destination 044 */ 045 void moveObject(Session session, String source, String destination); 046 047 /** 048 * @param session the session 049 * @return RDFStream of node types 050 */ 051 RdfStream getNodeTypes(final Session session); 052 053 /** 054 * @param session the session 055 * @param cndStream the cnd stream 056 * @throws IOException if IO exception occurred 057 */ 058 void registerNodeTypes(final Session session, final InputStream cndStream) throws IOException; 059}