Examples of Location


Examples of com.linkedin.restli.examples.groups.api.Location

  @Test
  public void testDiffFromNullNested() throws Exception
  {
    Group g1 = new Group();
    Group g2 = new Group(g1.data().copy());
    Location loc = new Location();
    loc.setLatitude(42.0f);
    loc.setLongitude(17.0f);
    g2.setLocation(loc);
    PatchTree update = PatchCreator.diff(g1, g2);
    assertEquals(update.toString(), "{$set={location={longitude=17.0, latitude=42.0}}}");
  }
View Full Code Here

Examples of com.linkedin.restli.server.twitter.TwitterTestDataModels.Location

                         buildPathKeys("followerID", 1L, "followeeID", 2L, followsAssociationResourceModel.getKeyName(), rawKey));

    // #3 Update on simple resource
    methodDescriptor = locationResourceModel.findMethod(ResourceMethod.UPDATE);
    locationResource = getMockResource(AsyncLocationResource.class);
    Location location  =(Location)EasyMock.anyObject();
    locationResource.update(location, EasyMock.<Callback<UpdateResponse>> anyObject());
    EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
      @Override
      public Object answer() throws Throwable {
        @SuppressWarnings("unchecked")
View Full Code Here

Examples of com.luckycatlabs.sunrisesunset.dto.Location

        computeSunriseSunset(locationResource, city, visitedCity);
        em.persist(visitedCity);
    }

    private void computeSunriseSunset(final LocationFacet locationFacet, final City city, final VisitedCity mdFacet) {
        Location location = new Location(String.valueOf(locationFacet.latitude), String.valueOf(locationFacet.longitude));
        final TimeZone timeZone = TimeZone.getTimeZone(city.geo_timezone);
        SunriseSunsetCalculator calc = new SunriseSunsetCalculator(location, timeZone);
        Calendar c = Calendar.getInstance(timeZone);
        c.setTimeInMillis(locationFacet.start);
        Calendar sunrise = calc.getOfficialSunriseCalendarForDate(c);
View Full Code Here

Examples of com.maxmind.geoip.Location

            {
                doc1.addField("topdomain", dnsValue.substring(lastIndexOf));
            }
        }

        Location location = getLocationService().getLocation(ip);
        if (location != null
                && !("--".equals(location.countryCode)
                        && location.latitude == -180 && location.longitude == -180))
        {
View Full Code Here

Examples of com.modestmaps.geo.Location

        switch (ae.getID()) {
        case TapEvent.BUTTON_CLICKED:
          Point[] p = getScreenPoints();
          for (int i = 0; i < p.length; i++) {
            Point point = p[i];
            Location loc = map.pointLocation(point.x ,point.y);
            getPictures(loc, getAccuracyForZoom(map), true);
          }
          getPictures(map.getCenter(), getAccuracyForZoom(map), false);
        }
      }
View Full Code Here

Examples of com.nosester.portlet.eventlisting.model.Location

  public static boolean contains(
      PermissionChecker permissionChecker, long locationId, String actionId)
    throws PortalException, SystemException {

    Location location = LocationLocalServiceUtil.getLocation(locationId);

    return contains(permissionChecker, location, actionId);
  }
View Full Code Here

Examples of com.openbravo.ws.customers.Location

    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof Location)) {
            return false;
        }
        Location other = (Location) obj;
        if (obj == null) {
            return false;
        }
        if (this == obj) {
            return true;
        }
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
                ((this.address1 == null && other.getAddress1() == null) ||
                (this.address1 != null &&
                this.address1.equals(other.getAddress1()))) &&
                ((this.address2 == null && other.getAddress2() == null) ||
                (this.address2 != null &&
                this.address2.equals(other.getAddress2()))) &&
                ((this.businessPartnerId == null && other.getBusinessPartnerId() == null) ||
                (this.businessPartnerId != null &&
                this.businessPartnerId.equals(other.getBusinessPartnerId()))) &&
                ((this.city == null && other.getCity() == null) ||
                (this.city != null &&
                this.city.equals(other.getCity()))) &&
                ((this.clientId == null && other.getClientId() == null) ||
                (this.clientId != null &&
                this.clientId.equals(other.getClientId()))) &&
                ((this.country == null && other.getCountry() == null) ||
                (this.country != null &&
                this.country.equals(other.getCountry()))) &&
                ((this.id == null && other.getId() == null) ||
                (this.id != null &&
                this.id.equals(other.getId()))) &&
                ((this.postal == null && other.getPostal() == null) ||
                (this.postal != null &&
                this.postal.equals(other.getPostal()))) &&
                ((this.region == null && other.getRegion() == null) ||
                (this.region != null &&
                this.region.equals(other.getRegion())));
        __equalsCalc = null;
        return _equals;
    }
View Full Code Here

Examples of com.opensymphony.xwork2.util.location.Location

                                // Force loading of class to detect no class def found exceptions
                                cimpl.getDeclaredClasses();
                                containerBuilder.injectStatics(cimpl);
                            } else {
                                if (containerBuilder.contains(ctype, name)) {
                                    Location loc = LocationUtils.getLocation(loadedBeans.get(ctype.getName() + name));
                                    if (throwExceptionOnDuplicateBeans) {
                                        throw new ConfigurationException("Bean type " + ctype + " with the name " +
                                                name + " has already been loaded by " + loc, child);
                                    }
                                }
View Full Code Here

Examples of com.oti.Location

    //    System.out.println("SAM TO REMOVE createMove firstCel "+ firstCell+" otherCell "+ otherCell);
    //    System.out.println("SAM TO REMOVE createMove firstCellVal "+ firstCellVal+" otherCellVal "+ otherCellVal);
   
   
    Piece currPiece = null;
    Location  currLoc = null;
    if (firstCellVal==0) {
      currPiece = Piece.pieceForNumber(otherCellVal);
      currLoc = Location.locationFor(firstCell%4, firstCell/4, 4);
    } else {
      assert(otherCellVal==0);
View Full Code Here

Examples of com.pre.entity.base.Location

    if(options.get(0).equals("create")){
      manageOption("create");
      return;
    }
    if(!ids.isEmpty()){
      final Location location=locationManager.find(new Long(ids.get(0)));

      nameBox.setText(location.getName());
      warehousesCombo.setText(location.getWarehouse().getName());
     
      sbox.setText(location.getDescription().getShortDescription());
      dbox.setText(location.getDescription().getLongDescription());
      cmbox.setText(location.getDescription().getComment());
      if(options.get(0).equals("show")){
        nameBox.setDisabled(true);
        warehousesCombo.setDisabled(true);
        sbox.setDisabled(true);
        dbox.setDisabled(true);
        cmbox.setDisabled(true);
      }
      if(options.get(0).equals("edit")){
        nameBox.setDisabled(true);

       
        List<Warehouse> replacements=manager.findAll();
        for (Warehouse replacement : replacements) {
          Comboitem item=new Comboitem(replacement.getName());
          warehousesCombo.appendChild(item);
        }


        Button okButton=new Button("OK");
        okButton.addEventListener("onClick", new EventListener(){

          public void onEvent(Event event) throws Exception {
            Warehouse comp=manager.findByName(warehousesCombo.getText()).get(0);
            if(nameBox.getText().equals("")){
              Messagebox.show("Name is empty!", "Error", Messagebox.YES , null);
              nameBox.focus();
              return;
            }
            location.setName(nameBox.getText());
            location.setWarehouse(comp);
            location.getDescription().setShortDescription(sbox.getText());
            location.getDescription().setLongDescription(dbox.getText());
            location.getDescription().setComment(cmbox.getText());
            locationManager.update(location);
            detach();           
          }

        });
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.