link.type = type;
link.domainElement = domainElement;
domain.put(domainElement, link);
- type.createDomain(g, new RangeToDomain(g), domainElement, link.rangeElement);
+ type.createDomain(g, new RangeToDomain(), domainElement, link.rangeElement);
// TODO Should we do this only if the mapping is listening?
domainModified(link);
link.type = type;
link.rangeElement = rangeElement;
range.put(rangeElement, link);
- type.createRange(g, new DomainToRange(g), link.domainElement, rangeElement);
+ type.createRange(g, new DomainToRange(), link.domainElement, rangeElement);
}
Set<Domain> domainSet = new AbstractSet<Domain>() {
class DomainToRange implements IForwardMapping<Domain, Range> {
- ReadGraph g;
-
- public DomainToRange(ReadGraph g) {
- this.g = g;
+ public DomainToRange() {
}
@Override
link.domainModified = true;
modifiedDomainLinks.add(link);
domain.put(element, link);
- createRange(g, link);
+ createRange(graph, link);
}
else if(link.type == null)
- createRange(g, link);
+ createRange(graph, link);
return link.rangeElement;
}
class RangeToDomain extends DomainToRange implements IBackwardMapping<Domain, Range> {
- WriteGraph g;
-
- public RangeToDomain(WriteGraph g) {
- super(g);
- this.g = g;
+ public RangeToDomain() {
+ super();
}
+
@Override
public Domain inverseGet(Range element) {
link.rangeModified = true;
modifiedRangeLinks.add(link);
range.put(element, link);
- createDomain(g, link);
+ createDomain(graph, link);
}
else if(link.type == null)
- createDomain(g, link);
+ createDomain(graph, link);
return link.domainElement;
}
@Override
public synchronized Collection<Domain> updateDomain(WriteGraph g) throws MappingException {
LOGGER.trace("Mapping.updateDomain");
- RangeToDomain map = new RangeToDomain(g);
+ RangeToDomain map = new RangeToDomain();
ArrayList<Domain> updated = new ArrayList<Domain>();
while(!modifiedRangeLinks.isEmpty()) {
LOGGER.trace(" modifiedRangeLinks.size() = " + modifiedRangeLinks.size());
@Override
public synchronized Collection<Range> updateRange(ReadGraph g) throws MappingException {
LOGGER.trace("Mapping.updateRange");
- DomainToRange map = new DomainToRange(g);
+ DomainToRange map = new DomainToRange();
ArrayList<Range> updated = new ArrayList<Range>();
while(!modifiedDomainLinks.isEmpty()) {
LOGGER.trace(" modifiedDomainLinks.size() = " + modifiedDomainLinks.size());