Examples of Property


Examples of com.thedeadpixelsociety.twodee.core.properties.Property

                    break;
                case stringValue: // Fall through
                case doubleValue: // Fall through
                case longValue: // Fall through
                case booleanValue:
                    propertySet.put(valueMap.name(), new Property(valueMap.name(), valueMap.asString()));
                    break;
                case nullValue:
                    propertySet.put(valueMap.name(), null);
                    break;
            }
View Full Code Here

Examples of com.tinkerpop.frames.Property

                Map map = new HashMap();

                Method[] methods = clazz.getMethods();
                for (Method method : methods) {
                    // assumes that the properties are unique within a frame
                    Property property = method.getAnnotation(Property.class);
                    if (property != null && method.getName().startsWith("get")) {
                        map.put(property.value(), method.invoke(obj, null));
                    }
                }

                extensionResponse = ExtensionResponse.ok(map);
            } catch (Exception x) {
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.Property

        }
    }

    @Test
    public void shouldFailPropertyAreEqualTestBecauseSecondArgumentIsNotProperty() {
        final Property mockProperty = mock(Property.class);
        assertFalse(ElementHelper.areEqual(mockProperty, "i'm a string"));
    }
View Full Code Here

Examples of com.totsp.gwittir.client.beans.Property

     */
    public static void sortOnProperty(List list, String propertyName,
        boolean ascending) throws Exception {
        Class currentClass = null;
       
        Property p = null;
        HashMap<Class, Property> cache = new HashMap<Class, Property>();

        for(int i = 0; i < (list.size() - 1); i++) {
            for(int j = i + 1; j < list.size(); j++) {
                Object o1 = list.get(i);
                Class o1Class = INTRO.resolveClass(o1);
                if(currentClass != o1Class) {
                    p = cache.get(o1Class);

                    if(p == null) {
                        p = INTRO.getDescriptor(o1).getProperty(propertyName);
                        cache.put( o1Class, p);
                    }
                    currentClass = o1Class;
                }

                Comparable oc1 = (Comparable) p.getAccessorMethod()
                                               .invoke(o1, null);

                Object o2 = list.get(j);
                Class o2Class = INTRO.resolveClass(o2);
                if(currentClass != o2Class) {
                    p = cache.get(o2Class);

                    if(p == null) {
                        p = INTRO.getDescriptor(o2).getProperty(propertyName);
                        cache.put( o2Class, p);
                    }
                    currentClass = o2Class;
                }

                Comparable oc2 = (Comparable) p.getAccessorMethod()
                                               .invoke(o2, null);

                if(ascending) {
                    if((oc1 != oc2)
                            && (
View Full Code Here

Examples of com.vaadin.client.metadata.Property

        try {
            JsArrayObject<Property> properties = AbstractConnector
                    .getStateType(connector).getPropertiesAsArray();
            for (int i = 0; i < properties.size(); i++) {
                Property property = properties.get(i);
                String name = property.getName();
                if (!ignoreProperties.contains(name)) {
                    html += getRowHTML(property.getDisplayName(),
                            property.getValue(state));
                }
            }
        } catch (NoDataException e) {
            html += "<div>Could not read state, error has been logged to the console</div>";
            VConsole.error(e);
View Full Code Here

Examples of com.vaadin.data.Property

            throw new BindException(
                    "The given field is not part of this FieldBinder");
        }

        TransactionalPropertyWrapper<?> wrapper = null;
        Property fieldDataSource = field.getPropertyDataSource();
        if (fieldDataSource instanceof TransactionalPropertyWrapper) {
            wrapper = (TransactionalPropertyWrapper<?>) fieldDataSource;
            fieldDataSource = ((TransactionalPropertyWrapper<?>) fieldDataSource)
                    .getWrappedProperty();
View Full Code Here

Examples of com.vercer.engine.persist.Property

      return (T) ((SinglePropertySet) properties).getValue();
    }
    else
    {
      Iterator<Property> iterator = properties.iterator();
      Property property = iterator.next();
      if (property == null)
      {
        return null;
      }
      else
      {
        return (T) property.getValue();
      }
    }
  }
View Full Code Here

Examples of com.volantis.mcs.build.themes.definitions.Property

     * @param propertyName The name of thr property to find.
     * @return The property with the specified name, or null if it could not
     * be found.
     */
    public Property getProperty(String propertyName) {
        Property property = (Property) properties.get(propertyName);
        return property;
    }
View Full Code Here

Examples of com.zenesis.qx.remote.annotations.Property

        if (event != null)
          events.put(event.getName(), event);
      }
    }
    for (Field field : clazz.getDeclaredFields()) {
      Property anno = field.getAnnotation(Property.class);
      if (anno != null) {
        ProxyProperty property = new ProxyPropertyImpl(clazz, anno.value().length() > 0 ? anno.value() : field.getName(), anno, annoProperties);
        properties.put(property.getName(), property);
        ProxyEvent event = property.getEvent();
        if (event != null)
          events.put(event.getName(), event);
      }
    }
   
    for (Method method : clazz.getDeclaredMethods()) {
      String name = method.getName();
      if (name.length() < 4 || !name.startsWith("get") || !Character.isUpperCase(name.charAt(3)))
        continue;
      Property anno = method.getAnnotation(Property.class);
      if (anno == null)
        continue;

      name = Character.toLowerCase(name.charAt(3)) + name.substring(4);
      if (properties.containsKey(name))
        continue;
     
      ProxyProperty property = new ProxyPropertyImpl(clazz, anno.value().length() > 0 ? anno.value() : name, anno, annoProperties);
      properties.put(property.getName(), property);
      ProxyEvent event = property.getEvent();
      if (event != null)
        events.put(event.getName(), event);
    }
View Full Code Here

Examples of commonj.sdo.Property

    while ( i.hasNext()) {
      System.out.println();
      DataObject obj = (DataObject) i.next();
      Iterator props = obj.getType().getProperties().iterator();
      while ( props.hasNext()) {
        Property p = (Property) props.next();
        if ( p.isMany() ) {
          System.out.print("[ " + p.getName() + " ] ");
          Iterator children = obj.getList(p).iterator();
          while ( children.hasNext()) {
            DataObject child = (DataObject) children.next();
            System.out.print("[ " + child.get("ID") + " ]");
          }
          System.out.println();
        } else if ( !p.getType().isDataType()) {
          DataObject child = obj.getDataObject(p);
          if ( child != null )
            System.out.println("[ " + p.getName() + " ] " + "[ " + child.get("ID") + " ]");
        } else {
          System.out.println("[ " + p.getName() + " ] " + obj.get(p));
        }
      } 
    }
  }
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.