X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.project%2Fsrc%2Forg%2Fsimantics%2Fproject%2Fmanagement%2FFeatureInfo.java;fp=bundles%2Forg.simantics.project%2Fsrc%2Forg%2Fsimantics%2Fproject%2Fmanagement%2FFeatureInfo.java;h=c1abb262d0eb7bfc9c907cc69ec92f4ce4f29704;hp=4d2ba3be1b2b3f833acb9e16e13212815cbb4a37;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.project/src/org/simantics/project/management/FeatureInfo.java b/bundles/org.simantics.project/src/org/simantics/project/management/FeatureInfo.java index 4d2ba3be1..c1abb262d 100644 --- a/bundles/org.simantics.project/src/org/simantics/project/management/FeatureInfo.java +++ b/bundles/org.simantics.project/src/org/simantics/project/management/FeatureInfo.java @@ -1,89 +1,89 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.project.management; - -import org.eclipse.equinox.p2.metadata.IVersionedId; -import org.eclipse.equinox.p2.metadata.Version; - -/** - * Project Feature is a end-user installable unit. - * - * - * @author Toni Kalajainen - */ -public class FeatureInfo implements IVersionedId { - - public String name; - public String URI; - - /** ID to the transferable graph */ - public IVersionedId vid; - - public FeatureInfo(String name, String URI, IVersionedId vid) { - this.name = name; - this.URI = URI; - this.vid = vid; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getURI() { - return URI; - } - - public void setURI(String uRI) { - URI = uRI; - } - - public IVersionedId getVid() { - return vid; - } - - public void setVid(IVersionedId vid) { - this.vid = vid; - } - - @Override - public int hashCode() { - return vid.getId().hashCode() * 31 + vid.getVersion().hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - - if (!(obj instanceof IVersionedId)) - return false; - - IVersionedId vname = (IVersionedId) obj; - return vid.getId().equals(vname.getId()) && vid.getVersion().equals(vname.getVersion()); - } - - @Override - public String getId() { - return vid.getId(); - } - - @Override - public Version getVersion() { - return vid.getVersion(); - } - -} - +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.project.management; + +import org.eclipse.equinox.p2.metadata.IVersionedId; +import org.eclipse.equinox.p2.metadata.Version; + +/** + * Project Feature is a end-user installable unit. + * + * + * @author Toni Kalajainen + */ +public class FeatureInfo implements IVersionedId { + + public String name; + public String URI; + + /** ID to the transferable graph */ + public IVersionedId vid; + + public FeatureInfo(String name, String URI, IVersionedId vid) { + this.name = name; + this.URI = URI; + this.vid = vid; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getURI() { + return URI; + } + + public void setURI(String uRI) { + URI = uRI; + } + + public IVersionedId getVid() { + return vid; + } + + public void setVid(IVersionedId vid) { + this.vid = vid; + } + + @Override + public int hashCode() { + return vid.getId().hashCode() * 31 + vid.getVersion().hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + + if (!(obj instanceof IVersionedId)) + return false; + + IVersionedId vname = (IVersionedId) obj; + return vid.getId().equals(vname.getId()) && vid.getVersion().equals(vname.getVersion()); + } + + @Override + public String getId() { + return vid.getId(); + } + + @Override + public Version getVersion() { + return vid.getVersion(); + } + +} +