/** * Adds a new dimension. * * @param name * the name of the dimension, never <code>null</code> * @param values * the values of the dimension, never <code>null</code> */ public void addDimensionValue( String name, List<?> values ) { dimensions.add( new Pair<String, List<?>>( name, values ) ); }
private static final void maybeAddPair( int num, Geometry g, boolean withGeometry, boolean exact, List<Pair<Integer, Geometry>> list, Envelope bbox ) { if ( exact ) { if ( bbox.intersects( g ) ) { list.add( new Pair<Integer, Geometry>( num, withGeometry ? g : null ) ); } } else { list.add( new Pair<Integer, Geometry>( num, g ) ); } }
private static void addBooleanProp( String propNs, String propName, DatabaseTables table, String column ) { QName qName = new QName( propNs, propName ); Triple<Pair<String, String>, Boolean, BaseType> mapping = new Triple<Pair<String, String>, Boolean, BaseType>( new Pair<String, String>( table.name(), column ), false, BOOLEAN ); propToTableAndCol.put( qName, mapping ); }
private static void addGeometryProp( String propNs, String propName, DatabaseTables table, String column, boolean concatenated ) { QName qName = new QName( propNs, propName ); Triple<Pair<String, String>, Boolean, BaseType> mapping = new Triple<Pair<String, String>, Boolean, BaseType>( new Pair<String, String>( table.name(), column ), concatenated, null ); propToTableAndCol.put( qName, mapping ); }
private static void addDateProp( String propNs, String propName, DatabaseTables table, String column ) { QName qName = new QName( propNs, propName ); Triple<Pair<String, String>, Boolean, BaseType> mapping = new Triple<Pair<String, String>, Boolean, BaseType>( new Pair<String, String>( table.name(), column ), false, DATE_TIME ); propToTableAndCol.put( qName, mapping ); }
private static void addIntProp( String propNs, String propName, DatabaseTables table, String column ) { QName qName = new QName( propNs, propName ); Triple<Pair<String, String>, Boolean, BaseType> mapping = new Triple<Pair<String, String>, Boolean, BaseType>( new Pair<String, String>( table.name(), column ), false, INTEGER ); propToTableAndCol.put( qName, mapping ); }
private static void addDecimalProp( String propNs, String propName, DatabaseTables table, String column ) { QName qName = new QName( propNs, propName ); Triple<Pair<String, String>, Boolean, BaseType> mapping = new Triple<Pair<String, String>, Boolean, BaseType>( new Pair<String, String>( table.name(), column ), false, DECIMAL ); propToTableAndCol.put( qName, mapping ); }
private static void addStringProp( String propNs, String propName, DatabaseTables table, String column, boolean concatenated ) { QName qName = new QName( propNs, propName ); Triple<Pair<String, String>, Boolean, BaseType> mapping = new Triple<Pair<String, String>, Boolean, BaseType>( new Pair<String, String>( table.name(), column ), concatenated, STRING ); propToTableAndCol.put( qName, mapping ); }
public void push( SimpleRaster filteredResult ) { if ( filteredResult != null ) { try { outputStack.put( new Pair<String, SimpleRaster>( Thread.currentThread().getName(), filteredResult ) ); } catch ( InterruptedException e ) { LOG.error( "Could not add the filtered result to the writer because: " + e.getLocalizedMessage(), e ); } } }
/** * @return the loaded buffer and the rectangle for which the buffer has data. */ public Pair<ByteBuffer, RasterRect> getDataRect() { return new Pair<ByteBuffer, RasterRect>( getByteBuffer(), dataAccess.getDataRectangle() ); } }
@Override public Pair<Point, Point> getBoundary() { return new Pair<Point, Point>( getStartPoint(), getEndPoint() ); }
public Pair<Integer, String> apply( LODStatement u ) { return new Pair<Integer, String>( u.getAboveScale(), u.getValue() ); } };
private List<Pair<String, String>> parseIdentifiers( OMElement lay ) { List<Pair<String, String>> identifiers = new ArrayList<Pair<String, String>>(); List<OMElement> identiferElements = getElements( lay, new XPath( getPrefix() + "Identifier", nsContext ) ); for ( OMElement identifierElement : identiferElements ) { String id = identifierElement.getText(); if ( id != null && id.length() > 0 ) { String authority = getNodeAsString( identifierElement, new XPath( "@authority" ), null ); identifiers.add( new Pair<String, String>( id, authority ) ); } } return identifiers; }
private Pair<XSElementDeclaration, Boolean> getTargetElement( Pair<XSElementDeclaration, Boolean> context, QName elName, int num ) { XSTypeDefinition typeDef = context.getFirst().getTypeDefinition(); if ( !( typeDef instanceof XSComplexTypeDefinition ) ) { throw new IllegalArgumentException( "XPath refers to a simple type definition." ); } XSParticle particle = ( (XSComplexTypeDefinition) typeDef ).getParticle(); if ( particle == null ) { throw new IllegalArgumentException( "XPath refers to an empty type definition." ); } return getTargetElementTerm( new Pair<XSTerm, Boolean>( particle.getTerm(), null ), elName, num ); }
@Override public Pair<List<LanguageString>, CodeType> apply( KeywordsType u ) { return new Pair<List<LanguageString>, CodeType>( map( u.getKeyword(), LANG_LANG_MAPPER ), CODETYPE_MAPPER.apply( u.getType() ) ); } };
public static Pair<ServiceIdentification, ServiceProvider> convertFromJAXB( DeegreeServicesMetadataType md ) { ServiceIdentification si = convertFromJAXB( md.getServiceIdentification() ); ServiceProvider sp = convertFromJAXB( md.getServiceProvider() ); return new Pair<ServiceIdentification, ServiceProvider>( si, sp ); }
private List<Pair<String, String>> parseAuthorities( OMElement lay ) { List<Pair<String, String>> authorities = new ArrayList<Pair<String, String>>(); List<OMElement> authorityElements = getElements( lay, new XPath( getPrefix() + "AuthorityURL", nsContext ) ); for ( OMElement authorityElement : authorityElements ) { String authority = getNodeAsString( authorityElement, new XPath( "@name" ), null ); String authorityUrl = getNodeAsString( authorityElement, new XPath( getPrefix() + "OnlineResource/@xlink:href", nsContext ), null ); authorities.add( new Pair<String, String>( authority, authorityUrl ) ); } return authorities; }
@Override public Pair<List<LanguageString>, CodeType> apply( KeywordsType u ) { Pair<List<LanguageString>, CodeType> p = new Pair<List<LanguageString>, CodeType>(); p.first = map( u.getKeyword(), LANG_LANG_MAPPER ); if ( u.getType() != null ) { p.second = CODE_TYPE_MAPPER.apply( u.getType() ); } return p; } };
private Pair<List<LanguageString>, CodeType> fromJaxb( final KeywordsType jaxbEl ) { final CodeType type = jaxbEl.getType() == null ? null : new CodeType( jaxbEl.getType().getValue(), jaxbEl.getType().getCodeSpace() ); final List<LanguageString> languageStrings = fromJaxb( jaxbEl.getKeyword() ); return new Pair<List<LanguageString>, CodeType>( languageStrings, type ); } }
private Pair<BlobMapping, BBoxTableMapping> buildBlobMapping( BLOBMapping blobMappingConf, GMLVersion gmlVersion ) { String ftTable = blobMappingConf.getFeatureTypeTable() == null ? FEATURE_TYPE_TABLE : blobMappingConf.getFeatureTypeTable(); BBoxTableMapping bboxMapping = new BBoxTableMapping( ftTable, geometryParams.getCrs() ); String blobTable = blobMappingConf.getBlobTable() == null ? GML_OBJECTS_TABLE : blobMappingConf.getBlobTable(); BlobMapping blobMapping = new BlobMapping( blobTable, geometryParams.getCrs(), new BlobCodec( gmlVersion, NONE ) ); return new Pair<BlobMapping, BBoxTableMapping>( blobMapping, bboxMapping ); }