KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > ischema > IMetaAttribute


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.core.ischema;
12
13 /**
14  * Objects that implement this interface are carrying metadata about XML schema
15  * attributes. This data is stored as schema attribute annotations.
16  */

17 public interface IMetaAttribute {
18     /**
19      * Indicates that the value of the associated attribute is a regular string.
20      */

21     public static final int STRING = 0;
22
23     /**
24      * Indicates that the value of the associated attribute is a name of a fully
25      * qualified Java class.
26      */

27     public static final int JAVA = 1;
28
29     /**
30      * Indicates that the value of the associated attribute is a workspace
31      * resource.
32      */

33     public static final int RESOURCE = 2;
34     
35     /**
36      * Property that indicates if an attribute is translatable
37      */

38     public static final String JavaDoc P_TRANSLATABLE = "translatable"; //$NON-NLS-1$
39

40     /**
41      * Property that indicates if an attribute is deprecated
42      */

43     public static final String JavaDoc P_DEPRECATED = "deprecated"; //$NON-NLS-1$
44

45     /*
46      * non-Javadoc
47      */

48     public static final String JavaDoc[] kindTable = { "string", "java", "resource" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
49

50     /**
51      * Returns optional name of the Java type this type must be based on (only
52      * for JAVA kind).
53      */

54     public String JavaDoc getBasedOn();
55     
56     /**
57      * Returns <samp>true</samp> if the attribute is translatable; <samp>false</samp> otherwise.
58      */

59     public boolean isTranslatable();
60     
61     /**
62      * Returns <samp>true</samp> if the attribute is deprecated; <samp>false</samp> otherwise.
63      */

64     public boolean isDeprecated();
65
66
67     /**
68      * Returns the kind of this attribute's value (STRING, JAVA or RESOURCE).
69      */

70     public int getKind();
71 }
72
Popular Tags