001/*
002 *  Copyright 2010 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 */
016
017package org.ametys.odf.cdmfr;
018
019import org.ametys.plugins.repository.AmetysObject;
020
021/**
022 * Object exportable in CDM-fr format.
023 */
024public interface CDMEntity extends CDMFRTagsConstants, AmetysObject
025{
026    /** Constants for metadata CDM code */
027    public static final String CDM_CODE = "cdmCode";
028    
029    /**
030     * Returns the CDM id.
031     * @return the CDM id.
032     */
033    public String getCDMId();
034    
035    /**
036     * Returns the main language of this object.
037     * @return the main language of this object.
038     */
039    public String getLanguage();
040    
041    /**
042     * Get the CDM code.
043     * This code is not empty only if the CDM entity was imported from a CDMfr file.
044     * @return the CDM code. Can be null;
045     */
046    public String getCdmCode();
047    
048    /**
049     * Set the CDM code.
050     * This code should be setted only when the CDM entity was imported from a CDMfr file.
051     * @param cdmCode the CDM code to set
052     */
053    public void setCdmCode(String cdmCode);
054}