Examples of Property


Examples of org.apache.tika.metadata.Property

                // Get, convert and save property value
                Object value = customProperties.get(name);
                if (value instanceof String){
                    set(key, (String)value);
                } else if (value instanceof Date) {
                    Property prop = Property.externalDate(key);
                    metadata.set(prop, (Date)value);
                } else if (value instanceof Boolean) {
                    Property prop = Property.externalBoolean(key);
                    metadata.set(prop, ((Boolean)value).toString());
                } else if (value instanceof Long) {
                    Property prop = Property.externalInteger(key);
                    metadata.set(prop, ((Long)value).intValue());
                } else if (value instanceof Double) {
                    Property prop = Property.externalReal(key);
                    metadata.set(prop, ((Double)value).doubleValue());
                } else if (value instanceof Integer) {
                    Property prop = Property.externalInteger(key);
                    metadata.set(prop, ((Integer)value).intValue());
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Property

            }
        }
    }

    private void loadDeliveryList() {
        Property property = (Property) getProject().createTask("property");
        property.setOwningTarget(getOwningTarget());
        property.init();
        property.setFile(deliveryList);
        property.perform();
    }
View Full Code Here

Examples of org.apache.tuscany.model.assembly.Property

        entryPoint.getBindings().add((Binding)binding);
        return entryPoint;
    }

    public Property createProperty(String name, Class<?> type) {
        Property property = createProperty();
        property.setName(name);
        property.setType(type);
        return property;
    }
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.Property

    private void processProperties(List<?> props, Hashtable<String, Object> propsTable) {
       
        if (props != null) {
            for (Object p : props) {
            
                Property prop = (Property)p;
                Class javaType = SimpleTypeMapperImpl.getJavaType(prop.getXSDType());
                ObjectFactory<?> objFactory = propertyValueFactory.createValueFactory(prop, prop.getValue(), javaType);
                Object value = objFactory.getInstance();         

                propsTable.put(prop.getName(), value);
            }
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sdo.model.Property

   * <!-- end-user-doc -->
   * @generated NOT
   */
  public void setOpposite_(Property newOpposite)
  {
    Property oldOpposite = opposite;
    opposite = newOpposite;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.PROPERTY__OPPOSITE, oldOpposite, opposite));
  }
View Full Code Here

Examples of org.apache.tuscany.spi.model.Property

        boolean many = Boolean.parseBoolean(reader.getAttributeValue(null, PROPERTY_MANY_ATTR));
        String override = reader.getAttributeValue(null, PROPERTY_OVERRIDE_ATTR);
       
        Document value = StAXUtil.createPropertyValue(reader, xmlType, documentBuilder);

        Property<?> property = new Property();
        property.setName(name);
        property.setXmlType(xmlType);
        property.setMany(many);
       
        if (override != null) {
            property.setOverride(OverrideOptions.valueOf(override.toUpperCase()));
        }
        property.setDefaultValue(value);
        return property;
    }
View Full Code Here

Examples of org.apache.webdav.lib.Property

     * <code>org.apache.webdav.lib.properties</code> package.
     */
    protected static Property convertElementToProperty(
        Response response, Element element) {

        Property property = null;
        String namespace = DOMUtils.getElementNamespaceURI(element);

        // handle DAV properties specially
        if (namespace != null && namespace.equals("DAV:")) {

View Full Code Here

Examples of org.apache.whirr.ClusterSpec.Property

   * Load the cluster spec by parsing the command line option set
   */
  protected ClusterSpec getClusterSpec(OptionSet optionSet) throws ConfigurationException {
    Configuration optionsConfig = new PropertiesConfiguration();
    for (Map.Entry<Property, OptionSpec<?>> entry : optionSpecs.entrySet()) {
      Property property = entry.getKey();
      OptionSpec<?> option = entry.getValue();
      Object value;
      if (property.hasMultipleArguments()) {
        value = optionSet.valuesOf(option);
      } else {
        value = optionSet.valueOf(option);
      }
      if (value != null) {
        optionsConfig.setProperty(property.getConfigName(), value);
      }
    }
    CompositeConfiguration config = new CompositeConfiguration();
    config.addConfiguration(optionsConfig);
    if (optionSet.has(configOption)) {
View Full Code Here

Examples of org.apache.whirr.service.ClusterSpec.Property

  }

  protected ClusterSpec getClusterSpec(OptionSet optionSet) throws ConfigurationException {
    Configuration optionsConfig = new PropertiesConfiguration();
    for (Map.Entry<Property, OptionSpec> entry : optionSpecs.entrySet()) {
      Property property = entry.getKey();
      OptionSpec option = entry.getValue();
      if (property.hasMultipleArguments()) {
        optionsConfig.setProperty(property.getConfigName(),
            optionSet.valuesOf(option));
      } else {
        optionsConfig.setProperty(property.getConfigName(),
            optionSet.valueOf(option));
      }
    }
    CompositeConfiguration config = new CompositeConfiguration();
    config.addConfiguration(optionsConfig);
View Full Code Here

Examples of org.apache.ws.resource.discovery.xml.PropertyDocument.Property

      Property[] propArry = agent1Props.getPropertyArray(  );

      Assert.assertNotNull( propArry );
      Assert.assertEquals( propArry.length, 3 );

      Property prop1 = propArry[0];
      Property prop2 = propArry[1];
      Property prop3 = propArry[2];

      Assert.assertNotNull( prop1 );
      Assert.assertNotNull( prop2 );
      Assert.assertNotNull( prop3 );

      Assert.assertEquals( prop1.getId(  ),
                           "Endpoint" );
      Assert.assertEquals( prop2.getId(  ),
                           "ResourceID" );
      Assert.assertEquals( prop3.getId(  ),
                           "ResourceID" );

      Assert.assertEquals( prop1.getStringValue(  ),
                           "http://localhost/stuff" );
      Assert.assertEquals( prop2.getStringValue(  ),
                           "1234" );
      Assert.assertEquals( prop3.getStringValue(  ),
                           "5678" );
   }
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.