Examples of REST


Examples of com.aetrion.flickr.REST

    {
      // TODO: Missing properties error handle.
      return null;
    }

    REST rest = null;
    try
    {
      rest = new REST();
    }
    catch (ParserConfigurationException e)
    {
      e.printStackTrace();
      return null;
    }
   
      Properties systemSettings = System.getProperties();
     
      //
      // Look for a proxy setting
      //       
      String proxyHost = Program.getProperty("general.proxyHost");
      String proxyPortString = "";
     
      if( proxyHost != null && proxyHost != "" )
      {
        proxyPortString = Program.getProperty("general.proxyPort");
      }
      else
      {
        proxyHost = (String) systemSettings.get("http.proxyHost" );
        proxyPortString = (String) systemSettings.get("http.proxyPort");
      }
     
      if( proxyHost != null && proxyHost != "" )
      {
      int proxyPort;
      try
      {
        proxyPort = Integer.parseInt(proxyPortString);
      }
      catch (NumberFormatException e1)
      {
        proxyPort = 8080; // Try a default.
      }
       
        rest.setProxy(proxyHost, proxyPort);
    }
     
    String sPhotoCount = Program.getProperty( "flickr.photoCount" );
    int photoCount = 25;
    try
View Full Code Here

Examples of com.aetrion.flickr.REST

  public FlickrLoader(PApplet pa, String flickrKey, String flickrSecret, SearchParameters sp, long sleepTime) {
    super(sleepTime);
    this.pa = pa;
   
    try {
      f = new Flickr(flickrKey, flickrSecret, new REST());
    } catch (ParserConfigurationException e) {
      e.printStackTrace();
    }
    authInterface  = f.getAuthInterface();
    requestContext   = RequestContext.getRequestContext();
View Full Code Here

Examples of eu.admire.dispel.types.Rest

        if (result == null) result = caseCommentable(any);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TypesPackage.REST: {
        Rest rest = (Rest)theEObject;
        T result = caseRest(rest);
        if (result == null) result = caseParameter(rest);
        if (result == null) result = caseVariable(rest);
        if (result == null) result = caseAnnotableAndModifiable(rest);
        if (result == null) result = caseTypedElement(rest);
View Full Code Here

Examples of info.textgrid.lab.noteeditor.mei2013.Rest

    cpd.setDescription(MusicMessages.MEI_documentation_generic_dur);
    descriptors.add(cpd);
  }

  private void createDefaultRest() {
    Rest rest = new Rest();
    rest.setDur(GraphicalConstants.DEFAULT_REST_DURATION);
    setMeiNode(rest);
  }
View Full Code Here

Examples of info.textgrid.lab.noteeditor.mei2013.Rest

      if (contentNode.getArtics().isEmpty())
        contentNode.unsetArtics();
      return contentNode;
    } else if (childForm instanceof RestForm) {
      RestForm contentForm = (RestForm) childForm;
      Rest contentNode = (Rest) contentForm.getMeiNode();
      return contentNode;
    } else if (childForm instanceof MRestForm) {
      MRestForm contentForm = (MRestForm) childForm;
      MRest contentNode = (MRest) contentForm.getMeiNode();
      return contentNode;
    } else if (childForm instanceof SpaceForm) {
      SpaceForm contentForm = (SpaceForm) childForm;
      Space contentNode = (Space) contentForm.getMeiNode();
      return contentNode;
    } else if (childForm instanceof DynamForm) {
      DynamForm contentForm = (DynamForm) childForm;
      Dynam contentNode = (Dynam) contentForm.getMeiNode();
      for (BasicElement contentChildForm : contentForm.getChildren()) {
        contentNode.getContent().add(
            handleScoreChild(contentChildForm, saveAllVariants));
      }
      return contentNode;
    } else if (childForm instanceof TieForm) {
      TieForm contentForm = (TieForm) childForm;
View Full Code Here

Examples of jm.music.data.Rest

                Note note = NoteFactory.createNote(getRandomPitch(ctx, scale), holdFor * ctx.getNormalizedMeasureSize());
                note.setDynamic(InstrumentGroups.getInstrumentSpecificDynamics(60, phrase.getInstrument()));
                phrase.addNote(note);
                return nextContinuationChangeMeasure + holdFor;
            } else {
                phrase.addRest(new Rest(ctx.getNormalizedMeasureSize()));
                return nextContinuationChangeMeasure + 1;
            }
        } else {
            return nextContinuationChangeMeasure;
        }
View Full Code Here

Examples of jm.music.data.Rest

                                    restLength = chordLength / 2;
                                }
                                addChord(chordPitches, chordLength - restLength, dynamics,
                                        accompanimentPhrase, specialNoteType, preferChordNotesOffset,
                                        measureOffset);
                                accompanimentPhrase.addRest(new Rest(restLength));
                            }
                        } else {
                            addChord(chordPitches, chordLength / 2, dynamics, accompanimentPhrase,
                                    specialNoteType, preferChordNotesOffset, measureOffset);
                            addChord(chordPitches, chordLength / 2, dynamics, accompanimentPhrase,
                                    specialNoteType, preferChordNotesOffset, measureOffset);
                        }
                    } else {
                        accompanimentPhrase.addRest(new Rest(chordLength));
                    }

                    measureChordLength += chordLength;
                }

                if (currentNote.isRest() && (currentMeasureSize == 0 || (interMeasureChord && isHalfMeasure))) {
                    accompanimentPhrase.addRest(new Rest(chordLength));
                    measureChordLength += chordLength;
                }

                currentMeasureSize += currentNote.getRhythmValue();
                if (currentMeasureSize >= normalizedMeasureSize) {
                    // when there's a long note and so no inter-measure chord is possible, fill the measure with a rest
                    if (measureChordLength != currentMeasureSize) {
                        double fillingSize = normalizedMeasureSize - measureChordLength;
                        accompanimentPhrase.addRest(new Rest(fillingSize));
                    }
                    currentMeasureSize = 0;
                    measureChordLength = 0;
                }
            }
View Full Code Here

Examples of jm.music.data.Rest

                phrase.add(getNote(ctx, ToneType.TONIC));
                phrase.add(getNote(ctx, ToneType.MEDIANT));
                if (Chance.test(20)) {
                    phrase.add(getNote(ctx, ToneType.TONIC));
                } else {
                    phrase.addRest(new Rest(ctx.getNormalizedMeasureSize() / 4));
                }
                phrase.addRest(new Rest(ctx.getNormalizedMeasureSize() / 4));
            } else {
                phrase.addRest(new Rest(ctx.getNormalizedMeasureSize()));
            }
        }
        phrase.setDynamic(100);
        timpaniPart.add(phrase);
    }
View Full Code Here

Examples of jm.music.data.Rest

                                .test(70))
                    || (lCtx.getCurrentPhraseMeasuresCounter() == lCtx.getPhraseMeasures() && Chance
                            .test(75));

            if (usePause) {
                lCtx.getCurrentPhrase().addRest(new Rest(length));
                structureItem.append("-R-");
            } else {
                Note note = createNote(lCtx, downBeat, length);

                if (lCtx.isAllowOrnaments() && Chance.test(6)) {
View Full Code Here

Examples of jm.music.data.Rest

            ExtendedPhrase phrase = new ExtendedPhrase();
            phrase.setScale(lCtx.getScoreContext().getScale());
            phrase.setMeasures(2 + random.nextInt(3));
            phrase.add(note);
            if (restLength > 0) {
                phrase.add(new Rest(restLength));
            }
            for (int i = 0; i < phrase.getMeasures() - 1; i++) {
                phrase.addRest(new Rest(lCtx.getScoreContext().getNormalizedMeasureSize()));
            }
            lCtx.setTotalMeasures(lCtx.getTotalMeasures() + phrase.getMeasures());
            part.add(phrase);
        }
    }
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.