@Test public void testCreateMetadataElement() { MetadataElement elem; String suffix; suffix = "suffix"; elem = BaseRecord.createMetadataElement("name", suffix); assertNotNull(elem); assertEquals("name suffix", elem.getName()); suffix = " "; elem = BaseRecord.createMetadataElement("name", suffix); assertNotNull(elem); assertEquals("name", elem.getName()); suffix = ""; elem = BaseRecord.createMetadataElement("name", suffix); assertNotNull(elem); assertEquals("name", elem.getName()); suffix = null; elem = BaseRecord.createMetadataElement("name", suffix); assertNotNull(elem); assertEquals("name", elem.getName()); }
protected static MetadataElement createMetadataElement(String name, String suffix) { final MetadataElement elem; if (suffix != null && suffix.trim().length() > 0) { elem = new MetadataElement(name + " " + suffix.trim()); } else { elem = new MetadataElement(name); } return elem; }
BaseRecord { protected static MetadataElement createMetadataElement(String name, String suffix) { final MetadataElement elem; if (suffix != null && suffix.trim().length() > 0) { elem = new MetadataElement(name + " " + suffix.trim()); } else { elem = new MetadataElement(name); } return elem; } }
BaseRecord { protected static MetadataElement createMetadataElement(String name, String suffix) { final MetadataElement elem; if (suffix != null && suffix.trim().length() > 0) { elem = new MetadataElement(name + " " + suffix.trim()); } else { elem = new MetadataElement(name); } return elem; } BaseRecord(final CeosFileReader reader, final long startPos); }
BaseRecord { protected static MetadataElement createMetadataElement(String name, String suffix) { final MetadataElement elem; if (suffix != null && suffix.trim().length() > 0) { elem = new MetadataElement(name + " " + suffix.trim()); } else { elem = new MetadataElement(name); } return elem; } BaseRecord(final CeosFileReader reader, final long startPos); int getRecordNumber(); int getFirstRecordSubtype(); int getRecordTypeCode(); int getSecondRecordSubtype(); int getThirdRecordSubtype(); int getRecordLength(); long getStartPos(); CeosFileReader getReader(); long getAbsolutPosition(final long relativePosition); void assignMetadataTo(final MetadataElement elem, final String suffix); static void addIntAttributte(final MetadataElement elem, final String name, final int value); }
BaseRecord { protected static MetadataElement createMetadataElement(String name, String suffix) { final MetadataElement elem; if (suffix != null && suffix.trim().length() > 0) { elem = new MetadataElement(name + " " + suffix.trim()); } else { elem = new MetadataElement(name); } return elem; } BaseRecord(final CeosFileReader reader, final long startPos); int getRecordNumber(); int getFirstRecordSubtype(); int getRecordTypeCode(); int getSecondRecordSubtype(); int getThirdRecordSubtype(); int getRecordLength(); long getStartPos(); CeosFileReader getReader(); long getAbsolutPosition(final long relativePosition); void assignMetadataTo(final MetadataElement elem, final String suffix); static void addIntAttributte(final MetadataElement elem, final String name, final int value);  }