Examples of SimpleProperty


Examples of com.vercer.engine.persist.util.SimpleProperty

          Object value = values.get(index);

          // null values are place holders for missing properties
          if (value != null)
          {
            result.add(new SimpleProperty(itemPath, value, true));
          }
          // at least one property has items so we are not done yet
          complete = false;
        }
      }
View Full Code Here

Examples of com.vercer.engine.persist.util.SimpleProperty

              }

              public Property next()
              {
                Entry<Path, List<Object>> next = iterator.next();
                return new SimpleProperty(next.getKey(), next.getValue(), indexed);
              }

              public void remove()
              {
                throw new UnsupportedOperationException();
View Full Code Here

Examples of com.vercer.engine.persist.util.SimpleProperty

  {
    Set<Property> properties = chained.typesafeToProperties(object, prefix, indexed);

    String className = object.getClass().getName();
    Path classNamePath = new Path.Builder(prefix).meta(CLASS_NAME).build();
    Property property = new SimpleProperty(classNamePath, className, true);

    return new PrependSet<Property>(property, properties);
  }
View Full Code Here

Examples of com.vercer.engine.persist.util.SimpleProperty

    try
    {
      if (object instanceof Serializable)
      {
        Blob blob = serializableToBlob.convert((Serializable) object);
        return Collections.singleton((Property) new SimpleProperty(path, blob, indexed));
      }
      else
      {
        return null;
      }
View Full Code Here

Examples of com.vercer.engine.persist.util.SimpleProperty

    PropertyTranslator chained = new PropertyTranslator()
    {
      public Set<Property> typesafeToProperties(Object object, Path path, boolean indexed)
      {
        HashSet<Property> properties = new HashSet<Property>();
        properties.add(new SimpleProperty(new Path.Builder(path).field("first").build(), object, indexed));
        properties.add(new SimpleProperty(new Path.Builder(path).field("second").build(), object, indexed));
        return properties;
      }

      public Object propertiesToTypesafe(Set<Property> properties, Path path, Type type)
      {
View Full Code Here

Examples of gov.nasa.arc.mct.services.config.impl.properties.SimpleProperty

 
  @Test
  public void testBadPropertyTypeConversion() {
    service = new Service();
    List<SimpleProperty> expected = new ArrayList<SimpleProperty> ();
    SimpleProperty sp = new SimpleProperty("Integer","aaaa");
    sp.setTypeName("Integer");
    expected.add(sp);   
    service.setSimpleProps(expected);
    List<SimpleProperty> actual = service.getSimpleProps();
    Assert.assertEquals(actual, expected);
   
View Full Code Here

Examples of gov.nasa.arc.mct.services.config.impl.properties.SimpleProperty

public class MarshallingTest {
 
  @Test
  public void testPropertyMarshalling() throws JAXBException {
    SimpleProperty prop = new SimpleProperty("x", "y");
   
    String s = marshalObject(prop);
    assertTrue(s.contains("<property"));
    assertTrue(s.contains("name=\"x\""));
    assertTrue(s.contains("value=\"y\""));
View Full Code Here

Examples of gov.nasa.arc.mct.services.config.impl.properties.SimpleProperty

 
  @Test
  public void testServiceMarshalling() throws JAXBException {
    Service service = new Service();
    service.setServiceID("myPID");
    service.getSimpleProps().add(new SimpleProperty("x", "y"));
    ArrayProperty array = new ArrayProperty("people");
    array.addEntry("john");
    array.addEntry("martha");
    service.getArrayProps().add(array);
   
View Full Code Here

Examples of gov.nasa.arc.mct.services.config.impl.properties.SimpleProperty

    assertEquals(value.getValue(), "red");
  }

  @Test
  public void testSimplePropertyUnmarshalling() throws JAXBException {
    SimpleProperty prop;
   
    prop = (SimpleProperty) unmarshalString("<property name='color' value='red' />");
    assertEquals(prop.getName(), "color");
    assertEquals(prop.getValue(), "red");
  }
View Full Code Here

Examples of gov.nasa.arc.mct.services.config.impl.properties.SimpleProperty

        "<service-configuration>" +
        "  <service pid='servicePID' />" +
        "</service-configuration>"
    );

    s.getSimpleProps().add(new SimpleProperty("host", "localhost"));
    s.getSimpleProps().add(new SimpleProperty("port", "7654", "Integer"));
    xml = toXML(config);
    assertEqualsXML(
        xml,
        "<service-configuration>\n" +
        "  <service pid='servicePID'>\n" +
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.