public OWSException( List<String> messages, String exceptionCode, String locator ) { super( StringUtils.concat( messages, ";" ) ); this.messages = messages; this.exceptionCode = exceptionCode; this.locator = locator; }
private void createCustomMappedProperties( GeometryType geomType, List<Mapping> mappings, LinkedList<PropertyType> types, String namespace, String prefix ) { types.clear(); for ( Mapping m : mappings ) { if ( m.fieldname == null ) { types.add( new GeometryPropertyType( new QName( namespace, m.propname, prefix ), 0, 1, null, null, geomType, DIM_2_OR_3, BOTH ) ); } else { PropertyType pt = properties.get( m.fieldname ); if ( pt == null ) { List<String> fieldNames = new ArrayList<String>( properties.keySet() ); String msg = "Error in mapping. DBF file does not have a field with name '" + m.fieldname + "'. Defined fields are: " + concat( fieldNames, ", " ); throw new IllegalArgumentException( msg ); } types.add( pt ); } } }
private void writeJoinedTable( XMLStreamWriter writer, TableJoin jc ) throws XMLStreamException { writer.writeStartElement( CONFIG_NS, "Join" ); if ( jc.getToTable() != null ) { writer.writeAttribute( "table", jc.getToTable().toString() ); } writer.writeAttribute( "fromColumns", StringUtils.concat( jc.getFromColumns(), "," ) ); writer.writeAttribute( "toColumns", StringUtils.concat( jc.getToColumns(), "," ) ); if ( jc.getOrderColumns() != null && !jc.getOrderColumns().isEmpty() ) { writer.writeAttribute( "orderColumns", StringUtils.concat( jc.getOrderColumns(), "," ) ); } if ( jc.isNumberedOrder() ) { writer.writeAttribute( "numbered", "true" ); } writer.writeEndElement(); }