01: /*******************************************************************************
02: * Copyright (c) 2005 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.text.bundle;
11:
12: import org.eclipse.osgi.service.resolver.VersionRange;
13: import org.eclipse.pde.internal.core.ibundle.IBundle;
14: import org.osgi.framework.Constants;
15:
16: public class FragmentHostHeader extends SingleManifestHeader {
17:
18: private static final long serialVersionUID = 1L;
19:
20: public FragmentHostHeader(String name, String value,
21: IBundle bundle, String lineDelimiter) {
22: super (name, value, bundle, lineDelimiter);
23: }
24:
25: public void setHostId(String id) {
26: setMainComponent(id);
27: }
28:
29: public String getHostId() {
30: return getMainComponent();
31: }
32:
33: public void setHostRange(String range) {
34: setAttribute(Constants.BUNDLE_VERSION_ATTRIBUTE, range);
35: }
36:
37: public VersionRange getHostRange() {
38: return new VersionRange(
39: getAttribute(Constants.BUNDLE_VERSION_ATTRIBUTE));
40: }
41:
42: }
|