|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.jmi.JmiDependencyMappedTransform
public class JmiDependencyMappedTransform
JmiDependencyMappedTransform implements JmiDependencyTransform
by
keeping a map from JmiAssocEdge
to JmiAssocMapping
.
Nested Class Summary | |
---|---|
private static class |
JmiDependencyMappedTransform.AssocRule
|
Field Summary | |
---|---|
private Map<JmiAssocEdge,List<JmiDependencyMappedTransform.AssocRule>> |
map
|
private JmiModelView |
modelView
|
private boolean |
produceSelfLoops
|
private Comparator<RefBaseObject> |
tieBreaker
|
Constructor Summary | |
---|---|
JmiDependencyMappedTransform(JmiModelView modelView,
boolean produceSelfLoops)
Creates a new mapped transform. |
Method Summary | |
---|---|
private void |
applyRefinedRules(List<JmiDependencyMappedTransform.AssocRule> rules,
RefObject source,
RefObject target,
Collection result,
JmiAssocMapping mapping)
|
private MofClass |
convertRefClassToMof(RefClass c)
|
Collection<RefObject> |
getSourceNeighbors(RefObject target,
Collection<RefObject> candidates,
JmiAssocMapping mapping)
Searches a collection of candidate objects, returning only those which are reachable via links corresponding to mapped incoming model edges to a target object. |
Comparator<RefBaseObject> |
getTieBreaker()
|
void |
setAllByAggregation(AggregationKind requestedKind,
JmiAssocMapping mapping)
Sets mappings for all associations with a given aggregation kind, discarding any existing mappings for those associations. |
void |
setByRefAssoc(RefAssociation assoc,
JmiAssocMapping mapping)
Sets mapping for a specific association, discarding any existing mappings for that association. |
void |
setByRefAssocRefined(RefAssociation assoc,
JmiAssocMapping mapping,
RefClass sourceClass,
RefClass targetClass)
Sets mapping for a specific association, refining the rule to only apply in the context of specific end classes. |
void |
setTieBreaker(Comparator<RefBaseObject> tieBreaker)
Sets a new tie-breaker. |
boolean |
shouldProduceSelfLoops()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Map<JmiAssocEdge,List<JmiDependencyMappedTransform.AssocRule>> map
private final JmiModelView modelView
private final boolean produceSelfLoops
private Comparator<RefBaseObject> tieBreaker
Constructor Detail |
---|
public JmiDependencyMappedTransform(JmiModelView modelView, boolean produceSelfLoops)
modelView
- the model for which dependencies are being definedproduceSelfLoops
- see JmiDependencyTransform.shouldProduceSelfLoops()
Method Detail |
---|
public Comparator<RefBaseObject> getTieBreaker()
getTieBreaker
in interface JmiDependencyTransform
public void setTieBreaker(Comparator<RefBaseObject> tieBreaker)
JmiMofIdComparator.instance
.)
tieBreaker
- new tie-breaker, or null to disable tie-breakingpublic Collection<RefObject> getSourceNeighbors(RefObject target, Collection<RefObject> candidates, JmiAssocMapping mapping)
JmiDependencyTransform
getSourceNeighbors
in interface JmiDependencyTransform
target
- object to which incoming links are to be foundcandidates
- candidate source objectsmapping
- mapping filter for links
private void applyRefinedRules(List<JmiDependencyMappedTransform.AssocRule> rules, RefObject source, RefObject target, Collection result, JmiAssocMapping mapping)
public boolean shouldProduceSelfLoops()
shouldProduceSelfLoops
in interface JmiDependencyTransform
public void setAllByAggregation(AggregationKind requestedKind, JmiAssocMapping mapping)
requestedKind
- association filtermapping
- mapping to use for matching associationspublic void setByRefAssoc(RefAssociation assoc, JmiAssocMapping mapping)
assoc
- association to mapmapping
- mapping to usepublic void setByRefAssocRefined(RefAssociation assoc, JmiAssocMapping mapping, RefClass sourceClass, RefClass targetClass)
assoc
- association to mapmapping
- mapping to usesourceClass
- source class required for match, or null for wildcardtargetClass
- target class required for match, or null for wildcardprivate MofClass convertRefClassToMof(RefClass c)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |