Examples of Property


Examples of org.palo.viewapi.Property

    }
    Property<?> aliasProperty = axisHierarchy.getProperty(AxisHierarchy.USE_ALIAS);   
    updateAlias(axisHierarchy, alias);
    HashMap <String, String> allElems = new HashMap<String, String>();
    traverse(axisHierarchy.getRootNodes(), allElems);
    Property prop = axisHierarchy.getProperty("aliasFormat");
    String aliasFormat = null;
    if (prop != null && prop.getValue() != null) {
      aliasFormat = prop.getValue().toString();
    }
    for (XElementNode node: allNodes) {
      String newName = allElems.get(node.getElement().getId());
      if (newName != null) {
        if (aliasFormat == null) {
          node.setName(newName);
          node.getElement().setName(newName);
        } else {
          String name = getAliasForElement(newName, node.getElement().getName(), aliasFormat);
          node.setName(name);
          node.getElement().setName(name);         
        }
      }
    }
    if (aliasProperty != null) {
      axisHierarchy.addProperty(aliasProperty);
    } else {
      axisHierarchy.removeProperty(new Property(AxisHierarchy.USE_ALIAS, ""));
    }
    return allNodes;
  }
View Full Code Here

Examples of org.pau.assetmanager.entities.Property

    Client client = ClientsBusiness.addClientByClientName(user,
        "new_client");
    Assert.assertEquals("new_client", client.getName());

    // create property (premise)
    Property property = new Property();
    property.setActualValue(10000.0);
    property.setClient(client);
    property.setName("new_property");
    property.setOfficialValue(10000.0);
    property.setType(PropertyType.PREMISE);
    property = PropertiesBusiness.createProperty(property);

    // create property book
    PropertyBook propertyBook = new PropertyBook();
    propertyBook.setClient(client);
View Full Code Here

Examples of org.qi4j.api.property.Property

        {
            Object initialValue = propertyModel.initialValue( module );
            if (propertyModel.accessor().equals(identityMethod))
                initialValue = identity;

            Property property = new PropertyInstance<Object>(propertyModel, initialValue );
            properties.put( propertyModel.accessor(), property );
        }

        TransientStateInstance state = new TransientStateInstance( properties );
        ServiceInstance compositeInstance = new ServiceInstance( this, module, mixins, state );
View Full Code Here

Examples of org.restlet.ext.odata.internal.edm.Property

            try {
                Representation rep = resource.get();

                try {
                    String value = getSimpleValue(rep, propertyName);
                    Property property = metadata.getProperty(entity,
                            propertyName);
                    ReflectUtils.setProperty(entity, property, value);
                } catch (Exception e) {
                    getLogger().log(
                            Level.WARNING,
View Full Code Here

Examples of org.rhq.core.domain.configuration.Property

    public void populateMetaValueFromProperty(PropertyMap propMap, MetaValue metaValue, PropertyDefinitionMap propDefMap)
    {
        PropertiesMetaValue propertiesValue = (PropertiesMetaValue)metaValue;
        for (String mapMemberPropName : propMap.getMap().keySet())
        {
            Property mapMemberProp = propMap.get(mapMemberPropName);
            propertiesValue.setProperty(mapMemberProp.getName(), ((PropertySimple)mapMemberProp).getStringValue());
        }
    }
View Full Code Here

Examples of org.scf4j.Property

    }
    return propertyMapping;
  }

  private void mapProperty(Map<Method, Object> propertyMapping, Properties properties, String path, Method method) throws ConfigurationException {
    Property property = defendMethod(method);

    String separator = path.equals("") ? "" : ".";
    String propertyPath = path + separator + property.id();
    String value = properties.getProperty(propertyPath);

    logger.debug(Messages.getString("try.to.map.and.coerce.property.pstr"), propertyPath);

    Object nested = checkNested(properties, method.getReturnType(), propertyPath);
    if (nested != null) {
      propertyMapping.put(method, nested);
    } else  if (value != null) {
      propertyMapping.put(method, getCoercer().coerce(value, method.getReturnType()));
    } else if (property.optional()) {
      propertyMapping.put(method, getCoercer().coerce(property.value(), method.getReturnType()));
    } else {
      throw new ConfigurationException(Messages.getString("required.property.0.is.missing", propertyPath));
    }
  }
View Full Code Here

Examples of org.securegraph.Property

        if (vertex == null) {
            respondWithNotFound(response, String.format("vertex %s not found", graphVertexId));
            return;
        }

        Property property = vertex.getProperty(propertyKey, propertyName);
        if (property == null) {
            respondWithNotFound(response, String.format("property %s:%s not found on vertex %s", propertyKey, propertyName, vertex.getId()));
            return;
        }
View Full Code Here

Examples of org.sonar.api.Property

    if (annotations != null) {
      for (Property property : annotations.value()) {
        addProperty(property, defaultCategory);
      }
    }
    Property annotation = AnnotationUtils.getAnnotation(component, Property.class);
    if (annotation != null) {
      addProperty(annotation, defaultCategory);
    }
    return this;
  }
View Full Code Here

Examples of org.sonar.api.database.configuration.Property

public class PropertyTest {

  @Test
  public void encodeBlob() {
    Property prop = new Property("key1", "value1");
    assertThat(prop.getValue(), is("value1"));

    prop.setValue(null);
    assertThat(prop.getValue(), nullValue());
  }
View Full Code Here

Examples of org.sonar.wsclient.services.Property

import static org.junit.Assert.assertThat;

public class PropertyUnmarshallerTest extends UnmarshallerTestCase {
  @Test
  public void toModel() {
    Property property = new PropertyUnmarshaller().toModel("[]");
    assertThat(property, nullValue());

    property = new PropertyUnmarshaller().toModel(loadFile("/properties/single.json"));
    assertThat(property.getKey(), is("myprop"));
    assertThat(property.getValue(), is("myvalue"));
  }
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.