Merge pull request #2686 from darecoder1999/fix-typos-in-conflicts-with
Fixed typos made in PR #2641
This commit is contained in:
commit
11fbd01a1b
@ -144,7 +144,6 @@ public interface ConstraintFetcher {
|
||||
boolean usableOnItems(PropertyIdValue pid);
|
||||
|
||||
/**
|
||||
<<<<<<< HEAD
|
||||
* Retrieves the lower bound of the range
|
||||
* required in difference-within-range constraint
|
||||
*
|
||||
|
@ -28,7 +28,11 @@ import org.wikidata.wdtk.datamodel.helpers.Datamodel;
|
||||
import org.wikidata.wdtk.datamodel.implementation.QuantityValueImpl;
|
||||
import org.wikidata.wdtk.datamodel.interfaces.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.HashMap;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
@ -6,7 +6,11 @@ import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
|
||||
import org.wikidata.wdtk.datamodel.interfaces.Statement;
|
||||
import org.wikidata.wdtk.datamodel.interfaces.Value;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Set;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
public class ConflictsWithScrutinizer extends EditScrutinizer {
|
||||
|
||||
|
@ -33,9 +33,9 @@ import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import org.wikidata.wdtk.datamodel.interfaces.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class MockConstraintFetcher implements ConstraintFetcher {
|
||||
@ -70,9 +70,9 @@ public class MockConstraintFetcher implements ConstraintFetcher {
|
||||
public static QuantityValue maxValuePid = Datamodel.makeQuantityValue(new BigDecimal(150));
|
||||
|
||||
public static PropertyIdValue conflictsWithPid = Datamodel.makeWikidataPropertyIdValue("P50");
|
||||
public static PropertyIdValue pidConflictingStatement = Datamodel.makeWikidataPropertyIdValue("P31");
|
||||
public static Value conflictsWithStatementValue = Datamodel.makeWikidataItemIdValue("Q36322");
|
||||
public static PropertyIdValue conflictingStatementPid = Datamodel.makeWikidataPropertyIdValue("P31");
|
||||
public static Value conflictingStatementValue = Datamodel.makeWikidataItemIdValue("Q5");
|
||||
public static Value conflictsWithValue = Datamodel.makeWikidataItemIdValue("Q36322");
|
||||
|
||||
@Override
|
||||
public String getFormatRegex(PropertyIdValue pid) {
|
||||
@ -214,7 +214,7 @@ public class MockConstraintFetcher implements ConstraintFetcher {
|
||||
public Map<PropertyIdValue, List<Value>> getParamConflictsWith(PropertyIdValue pid) {
|
||||
Map<PropertyIdValue, List<Value>> propertyIdValueListMap = new HashMap<>();
|
||||
List<Value> items = Arrays.asList(conflictingStatementValue, null);
|
||||
propertyIdValueListMap.put(pidConflictingStatement, items);
|
||||
propertyIdValueListMap.put(conflictingStatementPid, items);
|
||||
return propertyIdValueListMap;
|
||||
}
|
||||
}
|
||||
|
@ -20,9 +20,9 @@ public class ConflictsWithScrutinizerTest extends ScrutinizerTest {
|
||||
ItemIdValue idA = TestingData.existingId;
|
||||
|
||||
PropertyIdValue conflictsWithPid = MockConstraintFetcher.conflictsWithPid;
|
||||
Value conflictsWithValue = MockConstraintFetcher.conflictsWithValue;
|
||||
Value conflictsWithValue = MockConstraintFetcher.conflictsWithStatementValue;
|
||||
|
||||
PropertyIdValue propertyWithConflictsPid = MockConstraintFetcher.pidConflictingStatement;
|
||||
PropertyIdValue propertyWithConflictsPid = MockConstraintFetcher.conflictingStatementPid;
|
||||
Value conflictingValue = MockConstraintFetcher.conflictingStatementValue;
|
||||
|
||||
ValueSnak value1 = Datamodel.makeValueSnak(conflictsWithPid, conflictsWithValue);
|
||||
@ -42,7 +42,7 @@ public class ConflictsWithScrutinizerTest extends ScrutinizerTest {
|
||||
ItemIdValue idA = TestingData.existingId;
|
||||
|
||||
PropertyIdValue conflictsWithPid = MockConstraintFetcher.conflictsWithPid;
|
||||
Value conflictsWithValue = MockConstraintFetcher.conflictsWithValue;
|
||||
Value conflictsWithValue = MockConstraintFetcher.conflictsWithStatementValue;
|
||||
|
||||
ValueSnak value1 = Datamodel.makeValueSnak(conflictsWithPid, conflictsWithValue);
|
||||
|
||||
@ -58,9 +58,9 @@ public class ConflictsWithScrutinizerTest extends ScrutinizerTest {
|
||||
ItemIdValue idA = TestingData.existingId;
|
||||
|
||||
PropertyIdValue conflictsWithPid = MockConstraintFetcher.conflictsWithPid;
|
||||
Value conflictsWithValue = MockConstraintFetcher.conflictsWithValue;
|
||||
Value conflictsWithValue = MockConstraintFetcher.conflictsWithStatementValue;
|
||||
|
||||
PropertyIdValue propertyWithConflictsPid = MockConstraintFetcher.pidConflictingStatement;
|
||||
PropertyIdValue propertyWithConflictsPid = MockConstraintFetcher.conflictingStatementPid;
|
||||
|
||||
ValueSnak value1 = Datamodel.makeValueSnak(conflictsWithPid, conflictsWithValue);
|
||||
NoValueSnak value2 = Datamodel.makeNoValueSnak(propertyWithConflictsPid);
|
||||
|
Loading…
Reference in New Issue
Block a user