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 - Initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.build.site;
11:
12: import org.eclipse.update.core.*;
13:
14: public class BuildTimeFeature extends Feature {
15: private boolean binary = false;
16: private int contextQualifierLength = -1;
17:
18: public IIncludedFeatureReference[] getRawIncludedFeatureReferences() {
19: return getFeatureIncluded();
20: }
21:
22: public boolean isBinary() {
23: return binary;
24: }
25:
26: public void setBinary(boolean isCompiled) {
27: this .binary = isCompiled;
28: }
29:
30: private VersionedIdentifier versionId;
31:
32: public VersionedIdentifier getVersionedIdentifier() {
33: if (versionId != null)
34: return versionId;
35:
36: String id = getFeatureIdentifier();
37: String ver = getFeatureVersion();
38: if (id != null && ver != null) {
39: try {
40: versionId = new VersionedIdentifier(id, ver);
41: return versionId;
42: } catch (Exception e) {
43: //UpdateCore.warn("Unable to create versioned identifier:" + id + ":" + ver); //$NON-NLS-1$ //$NON-NLS-2$
44: }
45: }
46:
47: versionId = new VersionedIdentifier(getURL().toExternalForm(),
48: null);
49: return versionId;
50: }
51:
52: public void setFeatureVersion(String 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: }
|