| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.apache.ws.scout.registry.infomodel; |
| 17 | |
|
| 18 | |
import java.util.Collection; |
| 19 | |
import java.util.HashMap; |
| 20 | |
import java.util.Map; |
| 21 | |
|
| 22 | |
import javax.xml.registry.JAXRException; |
| 23 | |
import javax.xml.registry.infomodel.ExtensibleObject; |
| 24 | |
import javax.xml.registry.infomodel.Slot; |
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | 1115 | public class ExtensibleObjectImpl implements ExtensibleObject |
| 33 | |
{ |
| 34 | 1115 | private Map<String,Slot> slots = new HashMap<String,Slot>(); |
| 35 | |
|
| 36 | |
public void addSlot(Slot slot) throws JAXRException |
| 37 | |
{ |
| 38 | 26 | slots.put(slot.getName(), slot); |
| 39 | 26 | } |
| 40 | |
|
| 41 | |
public void addSlots(Collection slots) throws JAXRException |
| 42 | |
{ |
| 43 | 2 | for (Object slot : slots) { |
| 44 | 4 | addSlot((Slot) slot); |
| 45 | 4 | } |
| 46 | 2 | } |
| 47 | |
|
| 48 | |
public Slot getSlot(String slotName) |
| 49 | |
{ |
| 50 | 74 | return (Slot) slots.get(slotName); |
| 51 | |
} |
| 52 | |
|
| 53 | |
public Collection<Slot> getSlots() |
| 54 | |
{ |
| 55 | 16 | return slots.values(); |
| 56 | |
} |
| 57 | |
|
| 58 | |
public void removeSlot(String slotName) |
| 59 | |
{ |
| 60 | 4 | slots.remove(slotName); |
| 61 | 4 | } |
| 62 | |
|
| 63 | |
public void removeSlots(Collection slotNames) |
| 64 | |
{ |
| 65 | 2 | slots.keySet().removeAll(slotNames); |
| 66 | 2 | } |
| 67 | |
} |