Package org.geotools.util

Examples of org.geotools.util.SimpleInternationalString


    private Set<FieldType> fieldTypes;

    private Set<Name> fieldTypesNames;

    public DefaultRangeType(final String name, final String description, final FieldType fieldType) {
        this(new NameImpl(name), new SimpleInternationalString(description), Collections.singleton(fieldType));
    }
View Full Code Here


    public DefaultRangeType(final String name, final String description, final FieldType fieldType) {
        this(new NameImpl(name), new SimpleInternationalString(description), Collections.singleton(fieldType));
    }

    public DefaultRangeType(final String name, final String description, final Set<FieldType> fieldTypes) {
        this(new NameImpl(name), new SimpleInternationalString(description), fieldTypes);
    }
View Full Code Here

  private List<Measure<V,Q>> keys;
  private Name name;
  private Unit<Q> unit;
 
  public DefaultAxis( String name, Measure<V,Q> key, Unit<Q> unit){
    this( new NameImpl( name ), new SimpleInternationalString( name ), Collections.singletonList(key), unit, null );
  }
View Full Code Here

  public DefaultAxis( String name, Measure<V,Q> key, Unit<Q> unit){
    this( new NameImpl( name ), new SimpleInternationalString( name ), Collections.singletonList(key), unit, null );
  }
 
  public DefaultAxis( String name, List<Measure<V,Q>> keys, Unit<Q> unit){
    this( new NameImpl( name ), new SimpleInternationalString( name ), keys, unit, null );
  }
View Full Code Here

    {
      if(sm.getNumBands()==3)
        return new DimensionlessAxis(
            Arrays.asList("CYAN","MAGENTA","YELLOW"),
            new NameImpl("CMY-AXIS"),
            new SimpleInternationalString("Axis for CMY bands"));
      else
        return new DimensionlessAxis(
            Arrays.asList("CYAN","MAGENTA","YELLOW","BLACK"),
            new NameImpl("CMYK-AXIS"),
            new SimpleInternationalString("Axis for CMYK bands"));       
    }
   
    // HSV
    if(firstBandCI==ColorInterpretation.HUE_BAND)
    {
      return new DimensionlessAxis(
          Arrays.asList("HUE","SATURATION","VALUE"),
          new NameImpl("HSV-AXIS"),
          new SimpleInternationalString("Axis for HSV bands"));
    }
   
    //RGBA
    if(firstBandCI==ColorInterpretation.RED_BAND)
    {
      return new DimensionlessAxis(
          Arrays.asList("RED","GREEN","BLUE","ALPHA"),
          new NameImpl("RGBA-AXIS"),
          new SimpleInternationalString("Axis for RGBA bands"));
    }
   
    //PALETTE
    if(firstBandCI==ColorInterpretation.PALETTE_INDEX)
      return new DimensionlessAxis(
          Arrays.asList("PALETTE_INDEX"),
          new NameImpl("PALETTE_INDEX-AXIS"),
          new SimpleInternationalString("Axis for PALETTE INDEX bands"));     
   
    // GRAY, GRAY+ALPHA
    if(firstBandCI==ColorInterpretation.GRAY_INDEX)
    {
      if(sm.getNumBands()==2)
        return new DimensionlessAxis(
            Arrays.asList("GRAY","ALPHA"),
            new NameImpl("GA-AXIS"),
            new SimpleInternationalString("Axis for GRAY-ALPHA bands"));
      else
        return new DimensionlessAxis(
            Arrays.asList("GRAY"),
            new NameImpl("GRAY-AXIS"),
            new SimpleInternationalString("Axis for GRAY bands"));
       
    }
   
   
    final ColorSpace cs = cm.getColorSpace();
    //IHS
    if(cs instanceof IHSColorSpace)
      return new DimensionlessAxis(
          Arrays.asList("INTENSITY","HUE","SATURATION"),
          new NameImpl("IHS-AXIS"),
          new SimpleInternationalString("Axis for IHS bands"));

    //YCbCr, LUV, LAB, HLS, IEXYZ
    switch(cs.getType()){
    case ColorSpace.TYPE_YCbCr:
      return new DimensionlessAxis(
          Arrays.asList("LUMA","CHROMA-A","CHROMA-B"),
          new NameImpl("YCbCr-AXIS"),
          new SimpleInternationalString("Axis for YCbCr bands"));   
    case ColorSpace.TYPE_Luv:
      return new DimensionlessAxis(
          Arrays.asList("LIGHTNESS","U","V"),
          new NameImpl("LUV-AXIS"),
          new SimpleInternationalString("Axis for LUV bands"));       
    case ColorSpace.TYPE_Lab:
      return new DimensionlessAxis(
          Arrays.asList("LIGHTNESS","A","B"),
          new NameImpl("LAB-AXIS"),
          new SimpleInternationalString("Axis for LAB bands"));       
    case ColorSpace.TYPE_HLS:
      return new DimensionlessAxis(
          Arrays.asList("HUE","LIGHTNESS","SATURATION"),
          new NameImpl("HLS-AXIS"),
          new SimpleInternationalString("Axis for HLS bands"));     
    case ColorSpace.CS_CIEXYZ:
      return new DimensionlessAxis(
          Arrays.asList("X","Y","Z"),
          new NameImpl("XYZ-AXIS"),
          new SimpleInternationalString("Axis for XYZ bands"));       
     
    default:
      return null;
   
     
View Full Code Here

        Number[] clockTime2 = {12, 0, 0.0};
        ClockTime clocktime1 = new DefaultClockTime(frame1, null, clockTime1);
        ClockTime clocktime2 = new DefaultClockTime(frame2, null, clockTime2);
        ClockTime utcReference1 = new DefaultClockTime(frame1, null, clockTime1);
        ClockTime utcReference2 = new DefaultClockTime(frame2, null, clockTime2);
        clock1 = new DefaultClock(name1, null, new SimpleInternationalString("reference event"), clocktime1, utcReference1);
        clock2 = new DefaultClock(name2, null, new SimpleInternationalString("description"), clocktime2, utcReference2);
    }
View Full Code Here

     * Test of setReferenceEvent method, of class DefaultClock.
     */
    @Test
    public void testSetReferenceEvent() {
        InternationalString result = clock1.getReferenceEvent();
        ((DefaultClock) clock1).setReferenceEvent(new SimpleInternationalString(""));
        assertFalse(clock1.getReferenceEvent().equals(result));
    }
View Full Code Here

     * Test of dateTrans method, of class DefaultCalendar.
     */
    @Test
    public void testDateTrans_CalendarDate_ClockTime() {
        int[] cal = {2012, 9, 10};
        CalendarDate calendarDate = new DefaultCalendarDate(calendar1, IndeterminateValue.NOW, new SimpleInternationalString("new Era"), cal);
        Number[] clock = {12, 10, 5.488};
        ClockTime clockTime = new DefaultClockTime(calendar1, IndeterminateValue.NOW, clock);
        JulianDate result = calendar1.dateTrans(calendarDate, clockTime);
        assertTrue(calendar2.dateTrans(calendarDate, clockTime).equals(result));
    }
View Full Code Here

     */
    @Test
    public void testSetBasis() throws ParseException {
        Collection<CalendarEra> result = calendar1.getBasis();
        int[] calendarDate = {1, 1, 1};
        CalendarEra calendarEra = new DefaultCalendarEra(new SimpleInternationalString("Babylonian calendar"),
                new SimpleInternationalString("Ascension of Nebuchadnezzar II to the throne of Babylon"),
                new DefaultCalendarDate(calendar1, null, null, calendarDate),
                new DefaultJulianDate(calendar1, null, 1721423.25),
                new DefaultPeriod(new DefaultInstant(new DefaultPosition(new DefaultJulianDate(calendar1, null, 2087769))),
                new DefaultInstant(new DefaultPosition(new DefaultJulianDate(calendar1, null, 2299160)))));
        Collection<CalendarEra> collection = new ArrayList<CalendarEra>();
View Full Code Here

        NamedIdentifier name2 = new NamedIdentifier(Citations.CRS, "Babylonian calendar");
        TemporalReferenceSystem frame1 = new DefaultTemporalReferenceSystem(name1, null);
        TemporalReferenceSystem frame2 = new DefaultTemporalReferenceSystem(name2, null);
        int[] calendarDate1 = {1900, 1, 1};
        int[] calendarDate2 = {400, 1, 1};
        CalendarDate referenceDate1 = new DefaultCalendarDate(frame1, IndeterminateValue.BEFORE, new SimpleInternationalString("Gregorian calendar"), calendarDate1);
        CalendarDate referenceDate2 = new DefaultCalendarDate(frame2, IndeterminateValue.NOW, new SimpleInternationalString("Babylonian calendar"), calendarDate2);
        JulianDate julianReference = new DefaultJulianDate(frame1, IndeterminateValue.NOW, 123456789);
       
        cal.set(1900, 0, 1);
        Instant begining1 = new DefaultInstant(new DefaultPosition(cal.getTime()));
        cal.set(2000, 9, 17);
        Instant ending1 = new DefaultInstant(new DefaultPosition(cal.getTime()));
        cal.set(2000, 1, 1);
        Instant begining2 = new DefaultInstant(new DefaultPosition(cal.getTime()));
        cal.set(2012, 1, 1);
        Instant ending2 = new DefaultInstant(new DefaultPosition(cal.getTime()));

        Period epochOfUse1 = new DefaultPeriod(begining1, ending1);
        Period epochOfUse2 = new DefaultPeriod(begining2, ending2);

        calendarEra1 = new DefaultCalendarEra(new SimpleInternationalString("Cenozoic"),
                new SimpleInternationalString("no description"),
                referenceDate1, julianReference, epochOfUse1);
        calendarEra2 = new DefaultCalendarEra(new SimpleInternationalString("Mesozoic"),
                new SimpleInternationalString(""),
                referenceDate2, julianReference, epochOfUse2);
    }
View Full Code Here

TOP

Related Classes of org.geotools.util.SimpleInternationalString

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.