private static void checkSlots(IdentifiableType obj, List<String> requiredSlotNames) throws XDSException { for (SlotType1 s : obj.getSlot()) { requiredSlotNames.remove(s.getName()); } if (requiredSlotNames.size() > 0) throw new XDSException(XDSException.XDS_ERR_REGISTRY_METADATA_ERROR, "Missing attributes in '"+obj.getId()+"'!:"+requiredSlotNames, null); }
public String getSlotValue(IdentifiableType idType, String slotName) { List<SlotType1> list = idType.getSlot(); if (list != null) { for (SlotType1 slotType : list) { if (slotName.equals(slotType.getName())) return slotType.getValueList().getValue().get(0); } } return null; }
public void toPersistenceIdentifiable(IdentifiableType roType, Identifiable ro) { String id = roType.getId(); ro.setId(id.startsWith("urn:") ? id : "urn:uuid:"+UUID.randomUUID().toString()); uuidMapping.put(id, ro); ro.setHome(roType.getHome()); copySlots(roType.getSlot(), ro); }