tx.setService("WFS"); tx.setHandle(request.getHandle()); tx.setVersion(getVersion()); List<AbstractTransactionActionType> actions = tx.getAbstractTransactionAction();
@Override public Map getExtendedProperties() { return ((net.opengis.wfs20.TransactionType) adaptee).getExtendedProperties(); } }
@Override public boolean isReleaseActionAll() { return ((net.opengis.wfs20.TransactionType) adaptee).getReleaseAction() == net.opengis.wfs20.AllSomeType.ALL; }
@Override public void setElements(List<TransactionElement> elements) { net.opengis.wfs20.TransactionType tx = (net.opengis.wfs20.TransactionType) adaptee; EList<AbstractTransactionActionType> transactionElements = tx.getAbstractTransactionAction(); transactionElements.clear(); elements.stream() .map(e -> (AbstractTransactionActionType) e.getAdaptee()) .forEach(e -> transactionElements.add(e)); }
@Override public void setReleaseActionSome() { ((net.opengis.wfs20.TransactionType) adaptee) .setReleaseAction(net.opengis.wfs20.AllSomeType.SOME); }
@Override public List<TransactionElement> getElements() { List<TransactionElement> list = new ArrayList(); Iterator it = ((net.opengis.wfs20.TransactionType) adaptee) .getAbstractTransactionAction() .iterator(); while (it.hasNext()) { EObject el = (EObject) it.next(); if (el instanceof DeleteType) { list.add(new Delete.WFS20(el)); } else if (el instanceof InsertType) { list.add(new Insert.WFS20(el)); } else if (el instanceof UpdateType) { list.add(new Update.WFS20(el)); } else if (el instanceof ReplaceType) { list.add(new Replace.WFS20(el)); } else if (el instanceof net.opengis.wfs20.NativeType) { list.add(new Native.WFS20(el)); } else { throw new IllegalArgumentException("Unrecognized transaction element: " + el); } } return list; }
@Override public void setReleaseActionAll() { ((net.opengis.wfs20.TransactionType) adaptee) .setReleaseAction(net.opengis.wfs20.AllSomeType.ALL); }
tx.setService("WFS"); tx.setHandle(request.getHandle()); tx.setVersion(getVersion()); List<AbstractTransactionActionType> actions = tx.getAbstractTransactionAction();
private void invokeQualifyRequest() { TransactionType transactionType = Wfs20Factory.eINSTANCE.createTransactionType(); ReplaceType replaceType = Wfs20Factory.eINSTANCE.createReplaceType(); EList<AbstractTransactionActionType> action = transactionType.getAbstractTransactionAction(); action.add(replaceType); replaceType.getAny().add(mockFeature); Version version = new Version("2.0.0"); Service service = new Service("id", "service", version, Collections.singletonList("Transaction")); Operation operation = new Operation("id", service, null, new Object[] {transactionType}); replay( mockCatalog, mockFeature, mockFeatureType, mockName, mockNamespaceInfo, mockWorkspaceInfo); sut.qualifyRequest(mockWorkspaceInfo, null, operation, null); } }
@Override public boolean isReleaseActionSome() { return ((net.opengis.wfs20.TransactionType) adaptee).getReleaseAction() == net.opengis.wfs20.AllSomeType.SOME; }