public final void setInformationModel(InformationModel model, String[] tss, boolean relational) { this.model = model; rq.addPresentationContext(new PresentationContext(1, model.cuid, tss)); if (relational) rq.addExtendedNegotiation(new ExtendedNegotiation(model.cuid, QueryOption.toExtendedNegotiationInformation(EnumSet.of(QueryOption.RELATIONAL)))); if (model.level != null) addLevel(model.level); }
public final void setInformationModel(InformationModel model, String[] tss, EnumSet<QueryOption> queryOptions) { this.model = model; rq.addPresentationContext(new PresentationContext(1, model.cuid, tss)); if (!queryOptions.isEmpty()) { model.adjustQueryOptions(queryOptions); rq.addExtendedNegotiation(new ExtendedNegotiation(model.cuid, QueryOption.toExtendedNegotiationInformation(queryOptions))); } if (model.level != null) addLevel(model.level); }
public final void setInformationModel(InformationModel model, String[] tss, EnumSet<QueryOption> queryOptions) { this.model = model; rq.addPresentationContext(new PresentationContext(1, model.cuid, tss)); if (!queryOptions.isEmpty()) { model.adjustQueryOptions(queryOptions); rq.addExtendedNegotiation(new ExtendedNegotiation(model.cuid, QueryOption.toExtendedNegotiationInformation(queryOptions))); } if (model.level != null) addLevel(model.level); }
private byte[] negotiate(ExtendedNegotiation exneg, TransferCapability tc) { if (exneg == null) return null; StorageOptions storageOptions = tc.getStorageOptions(); if (storageOptions != null) return storageOptions.toExtendedNegotiationInformation(); EnumSet<QueryOption> queryOptions = tc.getQueryOptions(); if (queryOptions != null) { EnumSet<QueryOption> commonOpts = QueryOption.toOptions(exneg); commonOpts.retainAll(queryOptions); return QueryOption.toExtendedNegotiationInformation(commonOpts); } return null; }
private byte[] negotiate(ExtendedNegotiation exneg, TransferCapability tc) { if (exneg == null) return null; StorageOptions storageOptions = tc.getStorageOptions(); if (storageOptions != null) return storageOptions.toExtendedNegotiationInformation(); EnumSet<QueryOption> queryOptions = tc.getQueryOptions(); if (queryOptions != null) { EnumSet<QueryOption> commonOpts = QueryOption.toOptions(exneg); commonOpts.retainAll(queryOptions); return QueryOption.toExtendedNegotiationInformation(commonOpts); } return null; }