KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > directory > ldapstudio > browser > core > internal > model > DirectoryMetadataEntry


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  *
19  */

20
21 package org.apache.directory.ldapstudio.browser.core.internal.model;
22
23
24 import org.apache.directory.ldapstudio.browser.core.model.DN;
25 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
26 import org.apache.directory.ldapstudio.browser.core.model.ModelModificationException;
27
28
29 public class DirectoryMetadataEntry extends BaseDNEntry
30 {
31
32     private static final long serialVersionUID = 1340597532850853276L;
33
34     private boolean schemaEntry;
35
36
37     protected DirectoryMetadataEntry()
38     {
39     }
40
41
42     public DirectoryMetadataEntry( DN dn, IConnection connection )
43         throws ModelModificationException
44     {
45         super();
46         this.baseDn = dn;
47         // this.connectionName = connection.getName();
48
this.connection = connection;
49         this.schemaEntry = false;
50     }
51
52
53     public boolean hasChildren()
54     {
55         if ( getDn().equals( getConnection().getSchema().getDn() ) )
56         {
57             return false;
58         }
59         else
60         {
61             return super.hasChildren();
62         }
63     }
64
65
66     public boolean isSchemaEntry()
67     {
68         return schemaEntry;
69     }
70
71
72     public void setSchemaEntry( boolean schemaEntry )
73     {
74         this.schemaEntry = schemaEntry;
75     }
76
77 }
78
Popular Tags