Using the SPiD API: Working examples for Java