001    /*
002     *  Licensed to the Apache Software Foundation (ASF) under one
003     *  or more contributor license agreements.  See the NOTICE file
004     *  distributed with this work for additional information
005     *  regarding copyright ownership.  The ASF licenses this file
006     *  to you under the Apache License, Version 2.0 (the
007     *  "License"); you may not use this file except in compliance
008     *  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,
013     *  software distributed under the License is distributed on an
014     *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015     *  KIND, either express or implied.  See the License for the
016     *  specific language governing permissions and limitations
017     *  under the License. 
018     *  
019     */
020    
021    package org.apache.directory.shared.ldap.schema.parsers;
022    
023    
024    import java.util.ArrayList;
025    import java.util.List;
026    
027    import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
028    
029    
030    /**
031     * RFC 4512 - 4.1.1. Object Class Description
032     * 
033     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
034     * @version $Rev$, $Date$
035     */
036    public class ObjectClassDescription extends AbstractSchemaDescription
037    {
038        private List<String> superiorObjectClasses;
039    
040        private ObjectClassTypeEnum kind;
041    
042        private List<String> mustAttributeTypes;
043    
044        private List<String> mayAttributeTypes;
045    
046    
047        public ObjectClassDescription()
048        {
049            superiorObjectClasses = new ArrayList<String>();
050            kind = ObjectClassTypeEnum.STRUCTURAL;
051            mustAttributeTypes = new ArrayList<String>();
052            mayAttributeTypes = new ArrayList<String>();
053        }
054    
055    
056        public List<String> getMayAttributeTypes()
057        {
058            return mayAttributeTypes;
059        }
060    
061    
062        public void setMayAttributeTypes( List<String> mayAttributeTypes )
063        {
064            this.mayAttributeTypes = mayAttributeTypes;
065        }
066    
067    
068        public List<String> getMustAttributeTypes()
069        {
070            return mustAttributeTypes;
071        }
072    
073    
074        public void setMustAttributeTypes( List<String> mustAttributeTypes )
075        {
076            this.mustAttributeTypes = mustAttributeTypes;
077        }
078    
079    
080        public List<String> getSuperiorObjectClasses()
081        {
082            return superiorObjectClasses;
083        }
084    
085    
086        public void setSuperiorObjectClasses( List<String> superiorObjectClasses )
087        {
088            this.superiorObjectClasses = superiorObjectClasses;
089        }
090    
091    
092        public ObjectClassTypeEnum getKind()
093        {
094            return kind;
095        }
096    
097    
098        public void setKind( ObjectClassTypeEnum kind )
099        {
100            this.kind = kind;
101        }
102    
103    
104        public void addSuperiorObjectClass( String oid )
105        {
106            superiorObjectClasses.add( oid );
107        }
108    
109    
110        public void addMustAttributeType( String oid )
111        {
112            mustAttributeTypes.add( oid );
113        }
114    
115    
116        public void addMayAttributeType( String oid )
117        {
118            mayAttributeTypes.add( oid );
119        }
120    
121    }