Examples of Band


Examples of de.linwave.music.Band

    IndexUtils.addIndex(Artist.class, "name");
  }

  private void loadArtist()
  {
    Band theBeatles = new Band("THE BEATLES");
    Artist ringo = new Artist("Ringo Starr");
    Artist paul = new Artist("Paul Mc.Cartney");

    Artist john = new Artist("John Lennon");
    Adress adress = new Adress("Kings Road 1", "London", 12345);
    john.setAdress(adress);

    Artist george = new Artist("George Harrison");
    theBeatles.getAritsts().addAll(Arrays.asList(ringo, paul, john, george));
    //
    Band stones = new Band("Rolling Stones");
    stones.getAritsts().add(new Artist("Mick Jagger"));

    //
    Album album = new Album("Seargent Peppers lonely hearts club", 1969, theBeatles);
    album.getTracks().add(new Track("Yellow submarine", 120, rock, paul));
    album.getTracks().add(new Track("Abbey road", 96, classic, john));
View Full Code Here

Examples of org.gdal.gdal.Band

        /*
         * Create working band
         */

        Band WorkProximityBand = ProximityBand;
        Dataset WorkProximityDS = null;

        int ProxType = ProximityBand.getDataType();

        String tempFilename = null;

        if (ProxType == gdalconstConstants.GDT_Byte
                || ProxType == gdalconstConstants.GDT_UInt16
                || ProxType == gdalconstConstants.GDT_UInt32) {
            tempFilename = "/vsimem/proximity_" + String.valueOf(System.currentTimeMillis()) + ".tif";
            WorkProximityDS = gdal.GetDriverByName("GTiff").Create(tempFilename,
                    ProximityBand.getXSize(), ProximityBand.getYSize(), 1,
                    gdalconstConstants.GDT_Float32);
            WorkProximityBand = WorkProximityDS.GetRasterBand(1);
        }

        int xSize = WorkProximityBand.getXSize();
        int ySize = WorkProximityBand.getYSize();

        /*
         * Allocate buffers
         */

        short nearXBuffer[] = new short[xSize];
        short nearYBuffer[] = new short[xSize];
        int scanline[] = new int[xSize];
        float proximityBuffer[] = new float[xSize];

        /*
         * Loop from top to bottom of the image
         */

        for (int i = 0; i < xSize; i++) {
            nearXBuffer[i] = -1;
            nearYBuffer[i] = -1;
        }

        for (int iLine = 0; iLine < ySize; iLine++) {

            SrcBand.ReadRaster(0, iLine, xSize, 1, xSize, 1,
                    gdalconstConstants.GDT_Int32, scanline);

            for (int i = 0; i < xSize; i++) {
                proximityBuffer[i] = -1F;
            }

            /*
             * Left to Right
             */

            ProcessProximityLine(scanline, nearXBuffer, nearYBuffer,
                    true, iLine, xSize, MaxDistance, proximityBuffer,
                    TargetValues);

            /*
             * Right to Left
             */

            ProcessProximityLine(scanline, nearXBuffer, nearYBuffer,
                    false, iLine, xSize, MaxDistance, proximityBuffer,
                    TargetValues);

            /*
             * Write to Proximity Band
             */

            WorkProximityBand.WriteRaster(0, iLine, xSize, 1, xSize, 1,
                    gdalconstConstants.GDT_Float32, proximityBuffer);
        }

        /*
         * Loop from bottom to top of the image
         */

        for (int i = 0; i < xSize; i++) {
            nearXBuffer[i] = -1;
            nearYBuffer[i] = -1;
        }

        for (int iLine = ySize - 1; iLine >= 0; iLine--) {

            WorkProximityBand.ReadRaster(0, iLine, xSize, 1, xSize, 1,
                    gdalconstConstants.GDT_Float32, proximityBuffer);

            SrcBand.ReadRaster(0, iLine, xSize, 1, xSize, 1,
                    gdalconstConstants.GDT_Int32, scanline);

View Full Code Here

Examples of org.geotools.imageio.metadataold.Band

    @Override
    protected void setBandsElement(SpatioTemporalImageReader reader) {
        init(reader);
        final HDF4ImageReader hdf4Reader = ((HDF4ImageReader) reader);
        final Band band = addBand();
        final int imageIndex = getImageIndex();
    String imageMetadataFormat=null;
    String unitAttributeName=null;
   
    // //
    //
    // Setting format specific fields and metadata format names
    //
    // //
    switch (hdf4_type){
      case TeraScan:
        imageMetadataFormat=HDF4TeraScanImageMetadata.nativeMetadataFormatName;
          unitAttributeName=HDF4TeraScanProperties.DatasetAttribs.UNITS;
          break;
      case APS:
        imageMetadataFormat=HDF4APSImageMetadata.nativeMetadataFormatName;
          unitAttributeName="productUnits";
          break;
    }
   
      try
        // //
        //
        // Setting band element metadata
        //
        // //
        final IIOMetadata metadata = hdf4Reader.getImageMetadata(imageIndex,imageMetadataFormat);
            if (metadata instanceof UnidataImageMetadata) {
                final UnidataImageMetadata commonMetadata = (UnidataImageMetadata) metadata;
                setBandFromCommonMetadata(band, commonMetadata);
                Node node = commonMetadata.getAsTree(imageMetadataFormat);
                node = node.getFirstChild();
                if (node != null) {
                 
                  //Handling units
                    final NamedNodeMap attributesMap = node.getAttributes();
                    if (attributesMap != null) {
                      final Node units = attributesMap.getNamedItem(unitAttributeName);
                        if (units != null) {
                            String unit = units.getNodeValue();
                            if (unit != null) {
                                band.setUoM(unit);
                            }
                        }
                    }
                }
            }
View Full Code Here

Examples of org.jboss.seam.example.seamdiscs.model.Band

            {
                assert ((Integer) 1).equals(getValue("#{artistHome.id}"));
                Object object = null;
                object = getValue("#{artist}");
                assert object instanceof Band;
                Band artist1 = (Band) object;
                assert ARTIST1_NAME.equals(artist1.getName());
                assert artist1.getBandMembers().size() == 3;
            }
        }.run();
    }
View Full Code Here

Examples of org.librebiz.pureport.definition.Band

    private void endPageLayout() {
       
    }

    private void startBand(Attributes attrs) {
        band = new Band();
        setBoxAttributes(band, attrs);
        row = 0;
        column = 0;
    }
View Full Code Here

Examples of org.opengis.metadata.content.Band

                            " xmlns:gco=\"" + Namespaces.GCO + "\">\n" +
                "  <gmd:minValue gco:nilReason=\"unknown\"/>\n" +
                "  <gmd:peakResponse gco:nilReason=\"missing\"/>\n" +
                "</gmd:MD_Band>";

        final Band result = (Band) XML.unmarshal(expected);

        final Double minValue = result.getMinValue();
        assertNotNull("Expected a sentinel value.", minValue);
        assertTrue("Nil value shall be NaN.", minValue.isNaN());
        assertSame("nilReason", NilReason.UNKNOWN, NilReason.forObject(minValue));

        final Double peakResponse = result.getMinValue();
        assertNotNull("Expected a sentinel value.", peakResponse);
        assertTrue("Nil value shall be NaN.", peakResponse.isNaN());
        assertSame("nilReason", NilReason.UNKNOWN, NilReason.forObject(peakResponse));

        final String actual = XML.marshal(result);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.Band

    group.getFooter().getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(15));

    report.addGroup(group);

    final Band b = new Band();
    b.setName("variables");
    b.getStyle().setStyleProperty(TextStyleKeys.BOLD, Boolean.FALSE);
    b.getStyle().setStyleProperty(TextStyleKeys.FONT, "SansSerif");
    b.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(10));
//    b.setLayoutCacheable(false);

    for (int i = 3, max = tableModel.getColumnCount(); i < max; ++i)
    {
      TextFieldElementFactory tFF = new TextFieldElementFactory();
      tFF.setFieldname(tableModel.getColumnName(i));
      tFF.setAbsolutePosition(new Point2D.Float(200 * (i - 3), 0));
      tFF.setMinimumSize(new FloatDimension(200, 12));
      b.addElement(tFF.createElement());
    }
    report.getItemBand().addElement(b);

    assertTrue(FunctionalityTestLib.execGraphics2D(report));
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.Band

      final URL url = ObjectUtilities.getResourceRelative
          ("resources/subband.xml", SubBandParsingTest.class);
      assertNotNull(url);
      final MasterReport report = ReportGenerator.getInstance().parseReport(url);

      final Band band = report.getReportHeader();
      assertEquals(2, band.getElementCount());
      for (int i = 0; i < 2; i++)
      {
        final Band subband = (Band) band.getElement(i);
        assertEquals(2, subband.getElementCount());
        for (int x = 0; x < 2; x++)
        {
          final Band bandLowest = (Band) subband.getElement(x);
          assertTrue(bandLowest.getElementCount() > 0);
        }
      }
    }
    catch (Exception e)
    {
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.Band

      elementHandlers.add(readHandler);
      return readHandler;
    }
    else if ("band".equals(tagName))
    {
      final XmlReadHandler readHandler = new BandReadHandler(new Band());
      elementHandlers.add(readHandler);
      return readHandler;
    }
    return null;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.Band

   */
  protected void doneParsing()
      throws SAXException
  {
    super.doneParsing();
    final Band band = (Band) getElement();
    for (int i = 0; i < elementHandlers.size(); i++)
    {
      final ElementReadHandler readHandler = (ElementReadHandler) elementHandlers.get(i);
      band.addElement(readHandler.getElement());
    }
    for (int i = 0; i < styleExpressionHandlers.size(); i++)
    {
      final StyleExpressionHandler handler =
          (StyleExpressionHandler) styleExpressionHandlers.get(i);
      final StyleKey key = handler.getKey();
      if (handler.getKey() != null)
      {
        final Expression expression = handler.getExpression();
        band.setStyleExpression(key, expression);
      }
    }
  }
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.