intial source from ttp://www.sf.net/projects/wdte
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.css.core / src / net / sourceforge / phpeclipse / css / core / internal / profiles / ProfileDescriptor.java
1 /*
2  * Copyright (c) 2003-2004 Christopher Lenz and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     Christopher Lenz - initial API and implementation
10  * 
11  * $Id: ProfileDescriptor.java,v 1.1 2004-09-02 18:07:11 jsurfer Exp $
12  */
13
14 package net.sourceforge.phpeclipse.css.core.internal.profiles;
15
16 import net.sourceforge.phpeclipse.css.core.profiles.IProfileDescriptor;
17
18 import org.eclipse.core.runtime.IConfigurationElement;
19
20
21 /**
22  * 
23  */
24 public class ProfileDescriptor implements IProfileDescriptor {
25
26         // Constants ---------------------------------------------------------------
27
28         private static final String ATTR_ID = "id"; //$NON-NLS-1$
29         private static final String ATTR_NAME = "name"; //$NON-NLS-1$
30         private static final String ATTR_CLASS = "class"; //$NON-NLS-1$
31         private static final String ATTR_DESCRIPTION = "description"; //$NON-NLS-1$
32
33         // Instance Variables ------------------------------------------------------
34
35         /**
36          * The profile ID.
37          */
38         private String id;
39
40         /**
41          * The name of the profile.
42          */
43         private String name;
44
45         /**
46          * The name of the implementation class.
47          */
48         private String className;
49
50         /**
51          * An optional description.
52          */
53         private String description;
54
55         // Constructors ------------------------------------------------------------
56
57         /**
58          * Constructor.
59          * 
60          * @param element The configuration element corresponding to the declaration
61          *        of the profile
62          */
63         public ProfileDescriptor(IConfigurationElement element) {
64                 this.id = element.getAttribute(ATTR_ID);
65                 this.name = element.getAttribute(ATTR_NAME);
66                 this.className = element.getAttribute(ATTR_CLASS);
67                 this.description = element.getAttribute(ATTR_DESCRIPTION);
68         }
69
70         // IProfileDescriptor Implementation ---------------------------------------
71
72         /**
73          * @see IProfileDescriptor#getId()
74          */
75         public String getId() {
76                 return id;
77         }
78
79         /**
80          * @see IProfileDescriptor#getName()
81          */
82         public String getName() {
83                 return name;
84         }
85
86         /**
87          * @see IProfileDescriptor#getDescription()
88          */
89         public String getDescription() {
90                 return description;
91         }
92
93         /**
94          * @see IProfileDescriptor#getClassName()
95          */
96         public String getClassName() {
97                 return className;
98         }
99
100 }