{"warnings":{"main":{"*":"Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."},"expandtemplates":{"*":"Because \"prop\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."}},"expandtemplates":{"*":"\n{| style=\"background-color: transparent; border:1px dotted #000000;padding:2px;margin:2px;\"\n| ''Welcome to the '''Apertium Sandbox'''! This page allows you to carry out experiments. To edit, click '''[//wiki.apertium.org/w/index.php?title=API&action=edit here]''' or '''edit this page''' above (or the views section for obscure browsers), make your changes and click the '''Save page''' button when finished. Content will '''not''' stay permanently; this page is '''automatically cleaned''' every hour.''\n\n''Please do not place copyrighted, offensive, or libelous content in the sandbox(es). If you have any questions regarding [[Apertium]], please see [[Apertium:Questions]]. Thanks!''\n\n:''This page is a virtual sandbox on Apertium Wiki. For uses of sandboxes, see the article [[sandbox]].\n|\n{| style=\"background-color: transparent;\"\n|-\n|<div style=\"border: 1px solid black; text-align: center; padding:5px; font-size: small; background: #eeeeee; white-space: nowrap;\">\nMore info:<br>\n[[Apertium:Introduction|Introduction to Apertium]]<br>\n[[Apertium:About the Sandbox|About the Sandbox]]<br>\n[[Apertium:Tutorial|Editing tutorial]]</div>\n|}\n|}\n\n\n<pre>\nimport org.freedesktop.DBus;\nimport org.freedesktop.dbus.DBusConnection;\nimport org.freedesktop.dbus.exceptions.DBusException;\n\nimport org.apertium.Info; // The interface we use to access org.apertium.info/\n\nclass TestDBus {\n\n        public static void main(String[] args) throws org.freedesktop.dbus.exceptions.DBusException {\n                DBusConnection bus = null;\n                Info info = null;\n\n                bus = DBusConnection.getConnection(DBusConnection.SESSION);\n                info = bus.getRemoteObject(\"org.apertium.info\", \"/\", Info.class);\n\n                for (String s : info.modes()) {\n                        System.out.println(s);\n                }\n\n                bus.disconnect();\n        }\n}\n</pre>"}}