Package org.opengis.feature

Examples of org.opengis.feature.ComplexAttribute


        records.accepts(new FeatureVisitor() {
           
            @Override
            public void visit(Feature feature) {
                // has the id
                ComplexAttribute id = (ComplexAttribute) feature.getProperty("identifier");
                assertNotNull(id);
                String value = (String) id.getProperty("value").getValue();
                values.add(value);
               
                // only has the id
                assertEquals(1, feature.getProperties().size());
            }
View Full Code Here


                        + " in record " + f);
            }
        }

        private void encodeSimpleLiteral(Property p) {
            ComplexAttribute sl = (ComplexAttribute) p;
            String scheme = sl.getProperty("scheme") == null ? null : (String) sl.getProperty("scheme").getValue();
            String value = sl.getProperty("value") == null? "" : (String) sl.getProperty("value").getValue();
            Name dn = p.getDescriptor().getName();
            String name = dn.getLocalPart();
            String prefix = CSWRecordDescriptor.NAMESPACES.getPrefix(dn.getNamespaceURI());
            if (scheme == null) {
                element(prefix + ":" + name, value);
View Full Code Here

      }
    });
   
    for (Property p : sortedProperties) {
      if (p instanceof ComplexAttribute) {
        ComplexAttribute complex = (ComplexAttribute) p;
        sha1Properties(complex.getProperties());
      } else {
        sha1Property(p);
      }
    }
  }
View Full Code Here

        AttributeDescriptor identifierDescriptor = CSWRecordDescriptor.getDescriptor(elementName);
        Collection<Property> propertyList = f.getProperties(identifierDescriptor.getName());
        Property[] properties = (Property[]) propertyList.toArray(new Property[propertyList.size()]);
        assertEquals(properties.length, values.length);
        for (int i = 0; i < properties.length; i++) {
            ComplexAttribute cad = (ComplexAttribute) properties[i];
            assertEquals(identifierDescriptor, cad.getDescriptor());
            assertEquals(values[i], cad.getProperty(CSWRecordDescriptor.SIMPLE_LITERAL_VALUE).getValue());
        }
    }
View Full Code Here

TOP

Related Classes of org.opengis.feature.ComplexAttribute

Copyright © 2018 www.massapicom. 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.