List of usage examples for javax.xml.registry.infomodel Slot getSlotType
public String getSlotType() throws JAXRException;
From source file:it.cnr.icar.eric.client.ui.thin.RegistryObjectCollectionBean.java
public List<SelectItem> getSlots() throws JAXRException { ArrayList<SelectItem> list = new ArrayList<SelectItem>(); Collection<?> slots = (Collection<?>) getCurrentRegistryObjectBean().getFields().get("slots"); Iterator<?> iter = slots.iterator(); while (iter.hasNext()) { Slot anItem = (Slot) iter.next(); String cstr = "name=" + anItem.getName() + " type=" + anItem.getSlotType() + " values=" + anItem.getValues();// w ww . j a va 2 s. c om list.add(new SelectItem(cstr)); } return list; }
From source file:it.cnr.icar.eric.client.ui.thin.RegistryObjectCollectionBean.java
private List<RegistryObjectBean> getSlotsSearchResultsBeans(RegistryObjectBean roBean) throws ClassNotFoundException, NoSuchMethodException, ExceptionInInitializerError, Exception { List<?> slots = roBean.getSlots(); if (slots == null) { return null; }/*from w ww.j av a 2 s . co m*/ int numSlotObjects = slots.size(); @SuppressWarnings("unused") List<Object> list = new ArrayList<Object>(numSlotObjects); Iterator<?> roItr = slots.iterator(); if (log.isDebugEnabled()) { log.debug("Query results: "); } String objectType = "Slot"; int numCols = 5; // Replace ObjectType with Id. TODO - formalize this convention ArrayList<RegistryObjectBean> roBeans = new ArrayList<RegistryObjectBean>(numSlotObjects); for (@SuppressWarnings("unused") int i = 0; roItr.hasNext(); i++) { Slot slot = (Slot) roItr.next(); String header = null; Object columnValue = null; @SuppressWarnings("unused") ArrayList<Object> srvbHeader = new ArrayList<Object>(numCols); List<SearchResultValueBean> searchResultValueBeans = new ArrayList<SearchResultValueBean>(numCols); header = WebUIResourceBundle.getInstance().getString("Details"); columnValue = roBean.getId() + "." + slot.hashCode(); searchResultValueBeans.add(new SearchResultValueBean(header, columnValue)); header = WebUIResourceBundle.getInstance().getString("Name"); columnValue = slot.getName(); searchResultValueBeans.add(new SearchResultValueBean(header, columnValue)); header = WebUIResourceBundle.getInstance().getString("Slot Type"); columnValue = slot.getSlotType(); searchResultValueBeans.add(new SearchResultValueBean(header, columnValue)); header = WebUIResourceBundle.getInstance().getString("Values"); columnValue = slot.getValues(); searchResultValueBeans.add(new SearchResultValueBean(header, columnValue)); RegistryObjectBean srb = new RegistryObjectBean(searchResultValueBeans, roBean.getRegistryObject(), objectType, slot, false); roBeans.add(srb); } return roBeans; }