Examples of ShortAttribute


Examples of it.geosolutions.geostore.services.dto.ShortAttribute

    }

    protected static void copyResourceAttribs(Resource resource, RESTResource rr) {
        List<ShortAttribute> list = new ArrayList<ShortAttribute>();
        for (Attribute attribute : resource.getAttribute()) {
            ShortAttribute shatt = new ShortAttribute(attribute);
            list.add(shatt);
        }
        rr.setAttribute(list);
    }
View Full Code Here

Examples of it.geosolutions.geostore.services.dto.ShortAttribute

                dstGeostore.insert(statsData);
               
                // Add attribute Published=true to srcGeostore, usefull for staging admin application
              LOGGER.info("Adding attribute published=true to resource " + srcStatsData.getName());
              RESTResource statsDataTmp = FlowUtil.copyResource(srcStatsData);
              ShortAttribute published = new ShortAttribute(UNREDDLayerUpdate.Attributes.PUBLISHED.getName(), "true", DataType.STRING);
             
              //DamianoG workaround for search in list due to ShortAttribute don't override equals method
              boolean flag = true;
              for(ShortAttribute el : statsDataTmp.getAttribute()){
                if(el.toString().equals(published.toString())){
                  flag = false;
                  break;
                }
              }
             
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.ShortAttribute

    switch (getType()) {
      case BOOLEAN:
        result = new BooleanAttribute((Boolean) value);
        break;
      case SHORT:
        result = new ShortAttribute((Short) value);
        break;
      case INTEGER:
        result = new IntegerAttribute((Integer) value);
        break;
      case LONG:
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.ShortAttribute

    FeatureBean bean = new FeatureBean();
    attributes.put("stringAttr", new StringAttribute("s1"));
    attributes.put("doubleAttr", new DoubleAttribute(1.23));
    attributes.put("longAttr", new LongAttribute(12L));
    attributes.put("floatAttr", new FloatAttribute(1.67F));
    attributes.put("shortAttr", new ShortAttribute((short) 6));
    attributes.put("urlAttr", new UrlAttribute("http://haha"));
    service.setAttributes(bean, layerBeans.getLayerInfo().getFeatureInfo(), new DummyMapper(), attributes);
    Assert.assertEquals("s1", bean.getStringAttr());
    Assert.assertEquals(1.23, bean.getDoubleAttr(), 0.0001);
    Assert.assertEquals(12L, bean.getLongAttr().longValue());
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.ShortAttribute

  private Attribute<?> toPrimitiveDto(Object value, PrimitiveAttributeInfo info) {
    switch (info.getType()) {
      case BOOLEAN:
        return new BooleanAttribute((Boolean) convertToClass(value, Boolean.class));
      case SHORT:
        return new ShortAttribute((Short) convertToClass(value, Short.class));
      case INTEGER:
        return new IntegerAttribute((Integer) convertToClass(value, Integer.class));
      case LONG:
        return new LongAttribute((Long) convertToClass(value, Long.class));
      case FLOAT:
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.ShortAttribute

    switch (info.getType()) {
      case BOOLEAN:
        attribute = new BooleanAttribute();
        break;
      case SHORT:
        attribute = new ShortAttribute();
        break;
      case INTEGER:
        attribute = new IntegerAttribute();
        break;
      case LONG:
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.ShortAttribute

      case INTEGER:
        return new IntegerAttribute();
      case LONG:
        return new LongAttribute();
      case SHORT:
        return new ShortAttribute();
      case STRING:
        return new StringAttribute();
      case URL:
        return new UrlAttribute();
      default:
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.ShortAttribute

    private Attribute attribute;

    private AttributeInfo info;

    AttributeInfoPair(String name, String label, short value) {
      this.attribute = new ShortAttribute(value);
      this.info = new PrimitiveAttributeInfo(name, label, PrimitiveType.SHORT);
    }
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.ShortAttribute

        PrimitiveAttribute<?> p = (PrimitiveAttribute<?>) attribute;
        switch (p.getType()) {
          case BOOLEAN:
            return new BooleanAttribute();
          case SHORT:
            return new ShortAttribute();
          case INTEGER:
            return new IntegerAttribute();
          case LONG:
            return new LongAttribute();
          case FLOAT:
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.