|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.compare.match.statistic.similarity.NameSimilarity
public final class NameSimilarity
This class provides services to work on strings and to compare EObjects.
| Method Summary | |
|---|---|
static java.lang.String |
contentValue(org.eclipse.emf.ecore.EObject current,
MetamodelFilter filter)
Returns a string representation of all the features' values for a given EObject. |
static java.lang.String |
findName(org.eclipse.emf.ecore.EObject current)
Finds the property which is the best candidate to be the name of an EObject. |
static org.eclipse.emf.ecore.EAttribute |
findNameFeature(org.eclipse.emf.ecore.EObject current)
Returns the feature which seems to be the name of the given EObject. |
static double |
nameSimilarityMetric(java.lang.String str1,
java.lang.String str2)
Return a metric result about name similarity. |
static java.util.List<java.lang.String> |
pairs(java.lang.String source)
This method returns a List of Strings called "pairs". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String contentValue(org.eclipse.emf.ecore.EObject current,
MetamodelFilter filter)
throws FactoryException
EObject.
current - Object for which we need String representation.filter - Allows filtering of pertinent features.
EObject.
FactoryException - Thrown if one of the operation on EObject fails.
public static java.lang.String findName(org.eclipse.emf.ecore.EObject current)
throws FactoryException
EObject.
current - EObject we seek the name for.
FactoryException - Thrown if an operation on current fails.public static org.eclipse.emf.ecore.EAttribute findNameFeature(org.eclipse.emf.ecore.EObject current)
EObject.
current - EObject we seek the name feature of.
EObject.
public static double nameSimilarityMetric(java.lang.String str1,
java.lang.String str2)
str1 - First of the two Strings to compare.str2 - Second of the two Strings to compare.
public static java.util.List<java.lang.String> pairs(java.lang.String source)
List of Strings called "pairs". For example,
pairs("MyString")
returns ["My","yS","St","tr","ri","in","ng"]
source - The String to process.
List of String corresponding to the possibles pairs of the source one.
|
Copyright 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||