KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > build > site > BuildTimeFeature


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 - Initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.build.site;
12
13 import org.eclipse.update.core.*;
14
15 public class BuildTimeFeature extends Feature {
16     private boolean binary = false;
17     private int contextQualifierLength = -1;
18
19     public IIncludedFeatureReference[] getRawIncludedFeatureReferences() {
20         return getFeatureIncluded();
21     }
22
23     public boolean isBinary() {
24         return binary;
25     }
26
27     public void setBinary(boolean isCompiled) {
28         this.binary = isCompiled;
29     }
30
31     private VersionedIdentifier versionId;
32     
33     public VersionedIdentifier getVersionedIdentifier() {
34         if (versionId != null)
35             return versionId;
36
37         String JavaDoc id = getFeatureIdentifier();
38         String JavaDoc ver = getFeatureVersion();
39         if (id != null && ver != null) {
40             try {
41                 versionId = new VersionedIdentifier(id, ver);
42                 return versionId;
43             } catch (Exception JavaDoc e) {
44                 //UpdateCore.warn("Unable to create versioned identifier:" + id + ":" + ver); //$NON-NLS-1$ //$NON-NLS-2$
45
}
46         }
47
48         versionId = new VersionedIdentifier(getURL().toExternalForm(), null);
49         return versionId;
50     }
51     
52     public void setFeatureVersion(String JavaDoc featureVersion) {
53         super.setFeatureVersion(featureVersion);
54         versionId = null;
55     }
56
57     public void setContextQualifierLength(int l) {
58         contextQualifierLength = l;
59     }
60     
61     public int getContextQualifierLength(){
62         return contextQualifierLength;
63     }
64 }
65
Popular Tags