1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.project.management;
14 import org.eclipse.equinox.p2.metadata.IVersionedId;
15 import org.eclipse.equinox.p2.metadata.Version;
18 * Project Feature is a end-user installable unit.
21 * @author Toni Kalajainen <toni.kalajainen@vtt.fi>
23 public class FeatureInfo implements IVersionedId {
28 /** ID to the transferable graph */
29 public IVersionedId vid;
31 public FeatureInfo(String name, String URI, IVersionedId vid) {
37 public String getName() {
41 public void setName(String name) {
45 public String getURI() {
49 public void setURI(String uRI) {
53 public IVersionedId getVid() {
57 public void setVid(IVersionedId vid) {
62 public int hashCode() {
63 return vid.getId().hashCode() * 31 + vid.getVersion().hashCode();
67 public boolean equals(Object obj) {
71 if (!(obj instanceof IVersionedId))
74 IVersionedId vname = (IVersionedId) obj;
75 return vid.getId().equals(vname.getId()) && vid.getVersion().equals(vname.getVersion());
79 public String getId() {
84 public Version getVersion() {
85 return vid.getVersion();