Address review comments
This commit is contained in:
parent
580c0bed80
commit
7f1cfd2db7
@ -27,7 +27,7 @@
|
||||
"label": "Label",
|
||||
"description": "Description",
|
||||
"alias": "Alias",
|
||||
"item-or-reconciled-column": "item or reconciled column",
|
||||
"item-or-reconciled-column": "type item or drag reconciled column here",
|
||||
"amount": "amount",
|
||||
"unit": "unit",
|
||||
"full-url": "full URL including the protocol",
|
||||
|
@ -6,7 +6,6 @@ WarningsRenderer._renderEntity = function(entity) {
|
||||
entity.id = entity.value.id;
|
||||
}
|
||||
var id = entity.id;
|
||||
console.log(entity);
|
||||
var is_new = entity.siteIri == "http://localhost/entity/";
|
||||
if (is_new) {
|
||||
id = $.i18n._('wikidata-preview')['new-id'];
|
||||
|
@ -28,6 +28,8 @@ import java.io.IOException;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.wikidata.wdtk.wikibaseapi.ApiConnection;
|
||||
import org.wikidata.wdtk.wikibaseapi.LoginFailedException;
|
||||
|
||||
@ -48,6 +50,8 @@ import com.google.refine.preference.PreferenceStore;
|
||||
*/
|
||||
|
||||
public class ConnectionManager {
|
||||
|
||||
final static Logger logger = LoggerFactory.getLogger("connection_mananger");
|
||||
|
||||
public static final String PREFERENCE_STORE_KEY = "wikidata_credentials";
|
||||
|
||||
@ -76,7 +80,7 @@ public class ConnectionManager {
|
||||
array.put(obj);
|
||||
prefStore.put(PREFERENCE_STORE_KEY, array);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,7 +112,7 @@ public class ConnectionManager {
|
||||
try {
|
||||
return array.getJSONObject(0);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@ -121,7 +125,7 @@ public class ConnectionManager {
|
||||
connection.logout();
|
||||
connection = null;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -51,9 +51,8 @@ public class QSValuePrinter implements ValueVisitor<String> {
|
||||
|
||||
@Override
|
||||
public String visit(DatatypeIdValue value) {
|
||||
// unsupported according to
|
||||
// https://tools.wmflabs.org/wikidata-todo/quick_statements.php?
|
||||
return null;
|
||||
// impossible case (this is actually a bug in WDTK, DatatypeIdValue should not subclass Value)
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user