Package com.sos.scheduler.model.xmldoc

Examples of com.sos.scheduler.model.xmldoc.Settings$Profile$Section


  public void createBeanCreateCloneThenCloneShouldHaveSameStructureAndValuesButEveryElementOfDifferentReference() {
   
    // create some data
    // use a.b.m2.Book which has 1:N relations (collection) to other beans
    Book book = new Book("History of Britain", "John O'Farrel", ImmutableList.copyOf(new Section[] {
      new Section("Section1", "no description", ImmutableSet.copyOf(new Paragraph[] {
          new Paragraph(1, "Bla bla bla"),
          new Paragraph(1, "Bla bla bla"),
      })),
      new Section("Section2", "no description", ImmutableSet.copyOf(new Paragraph[] {
          new Paragraph(1066, "Bla bla bla"),
      })),
      new Section("Section3", "no description", ImmutableSet.copyOf(new Paragraph[] {
          new Paragraph(1, "Bla bla bla"),
          new Paragraph(2, "Bla bla bla"),
          new Paragraph(3, "Bla bla bla"),
      })),
    }));
View Full Code Here


public class SimpleApp {
  public static void main(String[] args) {
    // create some data
    // use a.b.m2.Book which has 1:N relations (collection) to other beans
    Book book = new Book("History of Britain", "John O'Farrel", ImmutableList.copyOf(new Section[] {
      new Section("Section1", "no description", ImmutableSet.copyOf(new Paragraph[] {
          new Paragraph(1, "Bla bla bla"),
          new Paragraph(1, "Bla bla bla"),
      })),
      new Section("Section2", "no description", ImmutableSet.copyOf(new Paragraph[] {
          new Paragraph(1066, "Bla bla bla"),
      })),
      new Section("Section3", "no description", ImmutableSet.copyOf(new Paragraph[] {
          new Paragraph(1, "Bla bla bla"),
          new Paragraph(2, "Bla bla bla"),
          new Paragraph(3, "Bla bla bla"),
      })),
    }));
View Full Code Here

    Body body = new Body();
    Mdiv mdiv = new Mdiv();
    Score score = new Score();
    ScoreDef scoreDef = createScoreDef(stavesCount);
    score.getGapsAndSbsAndCorrs().add(scoreDef);
    Section section = new Section();
    Measure measureFirst = new Measure();
    Staff staffFirst = new Staff();
    Layer layerFirst = new Layer();
    staffFirst.getSbsAndSymbolsAndOrigs().add(layerFirst);
    measureFirst.getAnnotsAndSlursAndTupletSpen().add(staffFirst);
    for (int stavesIter = 1; stavesIter < stavesCount; stavesIter++) {
      Staff staff = new Staff();
      Layer layer = new Layer();
      staff.getSbsAndSymbolsAndOrigs().add(layer);
      measureFirst.getAnnotsAndSlursAndTupletSpen().add(staff);
    }
    section.getUnclearsAndSbsAndApps().add(measureFirst);

    for (int measureIter = 1; measureIter < measureCount; measureIter++) {
      Measure measure = new Measure();
      for (int stavesIter = 0; stavesIter < stavesCount; stavesIter++) {
        Staff staff = new Staff();
        Layer layer = new Layer();
        staff.getSbsAndSymbolsAndOrigs().add(layer);
        measure.getAnnotsAndSlursAndTupletSpen().add(staff);
      }
      section.getUnclearsAndSbsAndApps().add(measure);
    }
    score.getGapsAndSbsAndCorrs().add(section);
    mdiv.setScore(score);
    body.getMdivs().add(mdiv);
    music.setBody(body);
View Full Code Here

    tpd.setDescription(MusicMessages.MEI_documentation_generic_n);
    descriptors.add(tpd);
  }
 
  private void createDefaultSection() {
    setMeiNode(new Section());
  }
View Full Code Here

  private static MeiNode handleScoreChild(BasicElement childForm,
      boolean saveAllVariants) {
    if (childForm instanceof SectionForm) {
      SectionForm sectionForm = (SectionForm) childForm;
      Section section = (Section) sectionForm.getMeiNode();
      section.getUnclearsAndSbsAndApps().clear();
      for (BasicElement sectionChildForm : sectionForm.getChildren()) {
        section.getUnclearsAndSbsAndApps().add(
            handleScoreChild(sectionChildForm, saveAllVariants));
      }
      return section;
    } else if (childForm instanceof EndingForm) {
      EndingForm endingForm = (EndingForm) childForm;
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public Section createSectionFromString(EDataType eDataType, String initialValue) {
        Section result = Section.get(initialValue);
        if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
        return result;
    }
View Full Code Here

        SectionsType owsSections = (SectionsType) kvp.get("sections");
        if(owsSections != null) {
            Sections sections = Wcs20Factory.eINSTANCE.createSections();
            for(Object o : owsSections.getSection()) {
                String sectionName = (String) o;
                Section section = Section.get(sectionName);
                if(section == null) {
                    throw new WCS20Exception("Invalid sections value " + sectionName + ", supported values are " + Arrays.asList(Section.values()),
                            OWSExceptionCode.InvalidParameterValue, "sections");
                }
                sections.getSection().add(section);
View Full Code Here

        result.setError(PacketError.Condition.bad_request);
        return result;
      }
     
      // We fetch the profile of the target user
      Profile profile = ProfileManager.getInstance().getProfile(sender.toBareJID(), target.toBareJID());
     
      // Prepare the result packet
      VCard4DomWriter writer = new DefaultVCard4DomWriter();
      DOMDocument domDocument = new DOMDocument();
      IQ result = IQ.createResultIQ(packet);
View Full Code Here

        return result;
      }

      // Parse the profile
      VCard4DomReader reader = new PersistentVCard4DomReader();
      Profile profile = reader.readProfile(new ElementAdapter(e_profile));
     
      // Commit the profile (this will also trigger the messages)
      try {
        ProfileManager.getInstance().publishProfile(sender.toBareJID(), profile);
      } catch (UserNotFoundException e) {
View Full Code Here

      public void onClick(ClickEvent event) {

        final VCard4Factory profileFactory = OswServiceFactory
            .getService().getProfileFactory();
        final Profile profile = profileFactory.profile();

        try {
          // prepare for updating and check for empty values
          if (avatarF.getAvatarUri().length() > 0)
            profile.addField(profileFactory.photo(avatarF.getAvatarUri()));
          if (displaynameF.getText().length() > 0)
            profile.addField(profileFactory.fullname(displaynameF.getText()));
          if (nameF.getFirstName().length() > 0 || nameF.getLastName().length() > 0)
            profile.addField(profileFactory.name(null, nameF.getFirstName(), nameF.getLastName(), null));
          if (birthdayF.getDate() != null)
            profile.addField(profileFactory.birthday(birthdayF.getDate()));
          if (genderF.getGenderText().length() > 0) {
            if (genderF.getGenderValue().equals(GenderField.Type.MALE.toString())) {
              profile.addField(profileFactory.gender(GenderField.Type.MALE));
            } else if (genderF.getGenderValue().equals(GenderField.Type.FEMALE.toString())) {
              profile.addField(profileFactory.gender(GenderField.Type.FEMALE));
            } else if (genderF.getGenderValue().equals(GenderField.Type.NOTKNOWN.toString())) {
              profile.addField(profileFactory.gender(GenderField.Type.NOTKNOWN));
            } else if (genderF.getGenderValue().equals(GenderField.Type.NOTAPPLICABLE.toString())) {
              profile.addField(profileFactory.gender(GenderField.Type.NOTAPPLICABLE));
            }
          }
          if (bioF.getText().length() > 0)
            profile.addField(profileFactory.note(bioF.getText()));
          if (emailF.getText().length() > 0)
            profile.addField(profileFactory.email(emailF.getText()));
          if (telF.getText().length() > 0)
            profile.addField(profileFactory.tel(telF.getText()));
          if (urlF.getText().length() > 0)
            profile.addField(profileFactory.url(urlF.getText()));
        } catch (CardinalityException e) {

        } catch (UnsupportedFieldException e) {

        }
View Full Code Here

TOP

Related Classes of com.sos.scheduler.model.xmldoc.Settings$Profile$Section

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.