protected void setData(String name, String data) throws MasterException { if (name.equals(QUALIFIED_NAME_INFO)) getMaster().setQualifiedName(data); else if (name.equals(INFO_PAGE_INFO)) getMaster().setInfoPagePath(data); else if (name.equals(THUMBNAIL_INFO)) getMaster().setThumbnailPath(data); else if (name.equals(WIDTH_INFO)) getMaster().setWidth(Integer.parseInt(data)); else if (name.equals(HEIGHT_INFO)) getMaster().setHeight(Integer.parseInt(data)); else if (name.equals(CONTENT_TYPE_INFO)) getMaster().setContentType(MediaType.codeFor(data)); else if (name.equals(SOURCE_TYPE_INFO)) getMaster().setSourceType(MediaType.codeFor(data)); else super.setData(name, data); }
protected String getData(String name) throws MasterException { if (name.equals(QUALIFIED_NAME_INFO)) return getMaster().getQualifiedName(); else if (name.equals(INFO_PAGE_INFO)) return getMaster().getInfoPagePath(); else if (name.equals(THUMBNAIL_INFO)) return getMaster().getThumbnailPath(); else if (name.equals(WIDTH_INFO)) return Integer.toString(getMaster().getWidth()); else if (name.equals(HEIGHT_INFO)) return Integer.toString(getMaster().getHeight()); else if (name.equals(CONTENT_TYPE_INFO)) return MediaType.nameFor(getMaster().getContentType()); else if (name.equals(SOURCE_TYPE_INFO)) return MediaType.nameFor(getMaster().getSourceType()); else return super.getData(name); }