01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.core.ischema;
11:
12: /**
13: * Objects that implement this interface are carrying metadata about XML schema
14: * attributes. This data is stored as schema attribute annotations.
15: */
16: public interface IMetaAttribute {
17: /**
18: * Indicates that the value of the associated attribute is a regular string.
19: */
20: public static final int STRING = 0;
21:
22: /**
23: * Indicates that the value of the associated attribute is a name of a fully
24: * qualified Java class.
25: */
26: public static final int JAVA = 1;
27:
28: /**
29: * Indicates that the value of the associated attribute is a workspace
30: * resource.
31: */
32: public static final int RESOURCE = 2;
33:
34: /**
35: * Property that indicates if an attribute is translatable
36: */
37: public static final String P_TRANSLATABLE = "translatable"; //$NON-NLS-1$
38:
39: /**
40: * Property that indicates if an attribute is deprecated
41: */
42: public static final String P_DEPRECATED = "deprecated"; //$NON-NLS-1$
43:
44: /*
45: * non-Javadoc
46: */
47: public static final String[] kindTable = {
48: "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 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: * Returns the kind of this attribute's value (STRING, JAVA or RESOURCE).
68: */
69: public int getKind();
70: }
|