Examples of GlobalIdentity


Examples of org.socialmusicdiscovery.server.business.model.GlobalIdentity

            } else {
                assert false;
            }
        }

        GlobalIdentity identity = globalIdentityRepository.findBySourceAndEntity(GlobalIdentity.SOURCE_MUSICBRAINZ, release);
        assert identity != null;
        assert identity.getUri().equals("11cafb9e-5fbc-49c7-b920-4ff754e03e93");

        identity = globalIdentityRepository.findBySourceAndEntity(GlobalIdentity.SOURCE_DISCOGS, release);
        assert identity != null;
        assert identity.getUri().equals("1794218");

        identity = globalIdentityRepository.findBySourceAndEntity(GlobalIdentity.SOURCE_MUSICBRAINZ, release.getContributors().iterator().next().getArtist());
        assert identity != null;
        assert identity.getUri().equals("0307edfc-437c-4b48-8700-80680e66a228");

        for (Track track : release.getTracks()) {
            if (track.getNumber().equals(1)) {
                identity = globalIdentityRepository.findBySourceAndEntity(GlobalIdentity.SOURCE_MUSICBRAINZ, track);
                assert identity != null;
                assert identity.getUri().equals("86cf33ac-5b7b-401b-9188-608bb2752063");
            } else if (track.getNumber().equals(5)) {
                identity = globalIdentityRepository.findBySourceAndEntity(GlobalIdentity.SOURCE_MUSICBRAINZ, track);
                assert identity != null;
                assert identity.getUri().equals("bdd8624a-d0ac-480f-8fe5-253bd99b7d3f");
            } else if (track.getNumber().equals(9)) {
                identity = globalIdentityRepository.findBySourceAndEntity(GlobalIdentity.SOURCE_MUSICBRAINZ, track);
                assert identity != null;
                assert identity.getUri().equals("f2ba4ef6-7017-4b93-9176-c079ed0a97e9");
                identity = globalIdentityRepository.findBySourceAndEntity(GlobalIdentity.SOURCE_MUSICBRAINZ, track.getRecording().getContributors().iterator().next().getArtist());
                assert identity != null;
                assert identity.getUri().equals("95eeac68-0305-41b1-b4f6-ab6594ee21c6");
            } else if (track.getNumber().equals(13)) {
                identity = globalIdentityRepository.findBySourceAndEntity(GlobalIdentity.SOURCE_MUSICBRAINZ, track);
                assert identity != null;
                assert identity.getUri().equals("c3af5bb7-5711-495e-8fae-af8d730497cd");
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.