?? hybridserviceitem.java
字號:
/*
*
* OWL-S Matchmaker
*
* COPYRIGHT NOTICE
*
* Copyright (C) 2005 DFKI GmbH, Germany
* Developed by Benedikt Fries, Matthias Klusch
*
* The code is free for non-commercial use only.
* You can redistribute it and/or modify it under the terms
* of the Mozilla Public License version 1.1 as
* published by the Mozilla Foundation at
* http://www.mozilla.org/MPL/MPL-1.1.txt
*
*/
package owlsmx.gui.data;
import java.net.URI;
public class HybridServiceItem extends ServiceItem implements java.io.Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
protected int dom=-1;
protected double similarity=-1;
public HybridServiceItem(URI uri) {
super(uri);
}
public String toString() {
String result = "(" + dom + ", " + ( (double)Math.round(similarity*100))/100 + ") " + name;
result = result.replaceAll("[\\r\\f]","");
return result;
}
public HybridServiceItem(ServiceItem item) {
this.uri = item.getURI();
this.fileURI = item.fileURI;
this.processed = item.processed;
this.inputs = item.getInputs();
this.outputs = item.getOutputs();
this.name = item.name;
name = name.replaceAll("[\\r\\f]","");
}
public HybridServiceItem(HybridServiceItem item) {
this.uri = item.getURI();
this.fileURI = item.fileURI;
this.processed = item.processed;
this.inputs = item.getInputs();
this.outputs = item.getOutputs();
this.name = item.name;
name = name.replaceAll("[\\r\\f]","");
this.dom = item.getDegreeOfMatch();
this.similarity = item.getSyntacticSimilarity();
}
public int getDegreeOfMatch() {
return dom;
}
public void setDegreeOfMatch(int dom) {
this.dom = dom;
}
public double getSyntacticSimilarity() {
return similarity;
}
public void setSyntacticSimilarity(double similarity) {
this.similarity = similarity;
}
public int compareTo(Object obj) {
if (!this.getClass().equals(obj.getClass()))
return 1;
HybridServiceItem item = (HybridServiceItem) obj;
if ( (dom < item.dom) || ((dom == item.dom) && (similarity<item.similarity)) )
return -1;
if ( ( (dom == item.dom) && (similarity == item.similarity) && (uri.equals(item.uri)) ) &&
(this.uri.equals(item.uri)) && (this.fileURI.equals(item.fileURI)) )
return 0;
return -1;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -