Package jpl.eda.profile

Examples of jpl.eda.profile.Profile


      Track t = (Track) i.next();
      String id = t.getID().toString();
      String trackName = t.getName();
      String albumName = t.getAlbum().getName();
      String artistName = t.getArtist().getName();
      Profile p = createProfile(id, trackName,
        albumName, artistName);
      profiles.add(p);
    }
    return profiles;
  }
View Full Code Here


  }

  private static Profile createProfile(String id,
    String trackName, String albumName,
    String artistName) {
    Profile p = new Profile();
    ProfileAttributes pa=new ProfileAttributes(id, "1.0", "profile", "active", "unclassified", /*parent*/null,
      /*children*/EL, "1.3.6.1.4.1.7655", /*revNotes*/EL);
    p.setProfileAttributes(pa);
    ResourceAttributes ra=new ResourceAttributes(p, id, trackName, Collections.singletonList("audio/mpeg"), /*desc*/null,
      Collections.singletonList(artistName), /*subjects*/EL, /*pubs*/EL, /*contrib*/EL, /*dates*/EL, /*types*/EL,
      /*sources*/EL, /*langs*/EL, /*relations*/EL, /*covs*/EL, /*rights*/EL,
      Collections.singletonList("Tutorial.Music"), "granule", "system.productServer",
      Collections.singletonList("urn:eda:rmi:MyProductServer"));
    p.setResourceAttributes(ra);
    EnumeratedProfileElement artistElem =
      new EnumeratedProfileElement(p, "artist", "artist", "Name of the artist of a work", "string", "name",
        /*syns*/EL, /*ob*/true, /*maxOccur*/1, /*comment*/null, Collections.singletonList(artistName));
    p.getProfileElements().put("artist",
      artistElem);
    EnumeratedProfileElement albumElem = new EnumeratedProfileElement(p, "album", "album",
      "Name of album where track occurs", "string", "name", /*syns*/EL, /*ob*/true, /*maxOccur*/1, /*comment*/null,
      Collections.singletonList(albumName));
    p.getProfileElements().put("album", albumElem);
    return p;
  }
View Full Code Here

TOP

Related Classes of jpl.eda.profile.Profile

Copyright © 2018 www.massapicom. 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.