public class ReservationSet extends Object
Mapping from model elements to their features.
| Constructor and Description |
|---|
ReservationSet()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addContainerReservation(String modelElementId)
Adds an full reservation.
|
void |
addExistenceReservation(String modelElementId)
Adds an existence reservation.
|
void |
addExistenceReservation(String modelElementId,
ConflictBucketCandidate conflictBucketCandidate)
Adds an existence reservation.
|
void |
addFeatureReservation(String modelElementId,
String featureName)
Adds a feature reservation for the given model element an one of its feature.
|
void |
addFeatureReservation(String modelElementId,
String featureName,
ConflictBucketCandidate conflictBucketCandidate)
Adds a feature reservation for the given feature.
|
void |
addFullReservation(String modelElementId)
Adds an full reservation.
|
void |
addFullReservation(String modelElementId,
ConflictBucketCandidate conflictBucketCandidate)
Adds a full reservation for the given model element.
|
void |
addMapKeyReservation(String modelElementId,
String featureName,
String key)
Adds a reservation for a map entry that is contained in a map feature.
|
void |
addMultiReferenceWithOppositeReservation(String modelElementId,
String featureName,
String oppositeModelElementId)
Adds a multi-reference feature reservation together with an opposite model element.
|
void |
addMultiReferenceWithOppositeReservation(String modelElementID,
String featureName,
String oppositeModelElementId,
ConflictBucketCandidate conflictBucketCandidate)
Performs an opposite reservation for multi-reference features.
|
Set<String> |
getAllModelElements()
Returns all model elements in the reservation set.
|
Set<ConflictBucketCandidate> |
getConflictBucketCandidates(String modelElementId)
Returns all conflict bucket candidates for the given model element.
|
Set<ConflictBucketCandidate> |
getConflictBucketCandidates(String modelElementId,
String featureName)
Returns all conflict bucket candidates for the given model element and a feature.
|
Set<ConflictBucketCandidate> |
getConflictBucketCandidates(String modelElementId,
String featureName,
String oppositeModelElement)
Returns all conflict bucket candidates for the given model element and its feature, together with
an opposite model element.
|
Set<String> |
getFeatureNames(String modelElementId)
Returns all reserved features for the given model element.
|
Set<String> |
getOpposites(String modelElementID,
String featureName)
Returns all opposites for the given model element ID and a feature.
|
boolean |
hasExistenceReservation(String modelElementId)
Whether the given model element has an existence reservation.
|
boolean |
hasFeatureReservation(String modelElementId,
String featureName)
Whether the given model element has a reservation for the given feature.
|
boolean |
hasFullReservation(String modelElementId)
Whether the given model element has a full reservation.
|
boolean |
hasOppositeReservation(String modelElementID,
String featureName,
String oppositeModelElementID)
Whether the given model element has a feature reservation with the given opposite model element.
|
boolean |
hasOppositeReservations(String modelElementId,
String featureName)
Whether the given model element has a opposite reservation for the given feature.
|
public void addFullReservation(String modelElementId)
modelElementId - the ID of a model elementpublic void addExistenceReservation(String modelElementId)
modelElementId - the ID of a model elementpublic void addContainerReservation(String modelElementId)
modelElementId - the ID of a model elementpublic void addFeatureReservation(String modelElementId, String featureName)
modelElementId - the ID of a model elementfeatureName - the name of a featurepublic void addMultiReferenceWithOppositeReservation(String modelElementId, String featureName, String oppositeModelElementId)
modelElementId - the ID of a model elementfeatureName - the name of a featureoppositeModelElementId - the ID of a model elementpublic void addMapKeyReservation(String modelElementId, String featureName, String key)
modelElementId - the ID of a model elementfeatureName - the name of a featurekey - the key of the map entrypublic void addFullReservation(String modelElementId, ConflictBucketCandidate conflictBucketCandidate)
modelElementId - the ID of a model elementconflictBucketCandidate - the conflict bucket into which the reservation is putpublic void addExistenceReservation(String modelElementId, ConflictBucketCandidate conflictBucketCandidate)
modelElementId - the ID of a model elementconflictBucketCandidate - the conflict bucket candidate into which the reservation is putpublic void addFeatureReservation(String modelElementId, String featureName, ConflictBucketCandidate conflictBucketCandidate)
modelElementId - the ID of a model elementfeatureName - the name of a featureconflictBucketCandidate - the conflict bucket candidate into which the reservation is putpublic void addMultiReferenceWithOppositeReservation(String modelElementID, String featureName, String oppositeModelElementId, ConflictBucketCandidate conflictBucketCandidate)
modelElementID - the ID of a model elementfeatureName - the name of a multi-reference featureoppositeModelElementId - the opposite model element IDconflictBucketCandidate - the conflict bucket candidate into which the reservation is putpublic Set<String> getAllModelElements()
public boolean hasExistenceReservation(String modelElementId)
modelElementId - the ID of a model elementtrue, if there is an existence reservation for the given model element, false otherwisepublic boolean hasFullReservation(String modelElementId)
modelElementId - the ID of a model elementtrue, if there is a full reservation for the given model element, false otherwisepublic Set<String> getFeatureNames(String modelElementId)
modelElementId - the ID of a mode elementpublic boolean hasFeatureReservation(String modelElementId, String featureName)
modelElementId - the ID of a model elementfeatureName - a feature nametrue, if the model element has a feature reservation for the given feature, false
otherwisepublic boolean hasOppositeReservations(String modelElementId, String featureName)
modelElementId - the ID of a model elementfeatureName - the name of a featuretrue, if the model element has a opposite reservation for the given feature, false
otherwisepublic Set<String> getOpposites(String modelElementID, String featureName)
modelElementID - the ID of a model elementfeatureName - the name of a featurepublic Set<ConflictBucketCandidate> getConflictBucketCandidates(String modelElementId)
modelElementId - the ID of a model elementConflictBucketCandidatespublic Set<ConflictBucketCandidate> getConflictBucketCandidates(String modelElementId, String featureName)
modelElementId - the ID of a model elementfeatureName - the feature nameConflictBucketCandidatespublic Set<ConflictBucketCandidate> getConflictBucketCandidates(String modelElementId, String featureName, String oppositeModelElement)
modelElementId - the ID of a model elementfeatureName - the feature nameoppositeModelElement - the ID of the opposite model elementConflictBucketCandidatespublic boolean hasOppositeReservation(String modelElementID, String featureName, String oppositeModelElementID)
modelElementID - the ID of the model elementfeatureName - a feature of the model elementoppositeModelElementID - the ID of the opposite model elementtrue, if there exists a opposite reservation, false otherwiseCopyright © 2017. All rights reserved.