001/*
002 *  Copyright 2012 Anyware Services
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.ametys.odf.program;
017
018import java.util.Collections;
019import java.util.List;
020import java.util.Set;
021
022import javax.jcr.Node;
023
024import org.ametys.odf.cdmfr.CDMFRTagsConstants;
025
026/**
027 * This class represent the root element of a program
028 */
029public class Program extends AbstractProgram<ProgramFactory>
030{
031    /**
032     * Constructor.
033     * @param node the JCR Node backing this Content.
034     * @param parentPath the parent path in the Ametys hierarchy.
035     * @param factory the corresponding {@link ProgramFactory}.
036     */
037    public Program(Node node, String parentPath, ProgramFactory factory)
038    {
039        super(node, parentPath, factory);
040    }
041    
042    @Override
043    public Set<Program> getRootPrograms()
044    {
045        return Collections.EMPTY_SET;
046    }
047    
048    @Override
049    public List<ProgramPart> getProgramPartParents()
050    {
051        return Collections.EMPTY_LIST;
052    }
053    
054    // --------------------------------------------------------------------------------------//
055    // CDMfr
056    // --------------------------------------------------------------------------------------//
057    @Override
058    public String getCDMTagName()
059    {
060        return CDMFRTagsConstants.TAG_PROGRAM;
061    }
062}