private BasicBulkDataDescriptor loadBulkDataDescriptor(SearchResult sr) throws NamingException { Attributes attrs = sr.getAttributes(); BasicBulkDataDescriptor descriptor = new BasicBulkDataDescriptor( LdapUtils.stringValue(attrs.get("dcmBulkDataDescriptorID"), null)); descriptor.excludeDefaults(LdapUtils.booleanValue(attrs.get("dcmBulkDataExcludeDefaults"), false)); descriptor.setAttributeSelectorsFromStrings(LdapUtils.stringArray(attrs.get("dcmAttributeSelector"))); descriptor.setLengthsThresholdsFromStrings(LdapUtils.stringArray(attrs.get("dcmBulkDataVRLengthThreshold"))); return descriptor ; }
private BasicBulkDataDescriptor loadBulkDataDescriptor(SearchResult sr) throws NamingException { Attributes attrs = sr.getAttributes(); BasicBulkDataDescriptor descriptor = new BasicBulkDataDescriptor( LdapUtils.stringValue(attrs.get("dcmBulkDataDescriptorID"), null)); descriptor.excludeDefaults(LdapUtils.booleanValue(attrs.get("dcmBulkDataExcludeDefaults"), false)); descriptor.setAttributeSelectorsFromStrings(LdapUtils.stringArray(attrs.get("dcmAttributeSelector"))); descriptor.setLengthsThresholdsFromStrings(LdapUtils.stringArray(attrs.get("dcmBulkDataVRLengthThreshold"))); return descriptor ; }
private void loadFrom(BasicBulkDataDescriptor descriptor, JsonReader reader) { while (reader.next() == JsonParser.Event.KEY_NAME) { switch (reader.getString()) { case "dcmBulkDataDescriptorID": descriptor.setBulkDataDescriptorID(reader.stringValue()); break; case "dcmBulkDataExcludeDefaults": descriptor.excludeDefaults(reader.booleanValue()); break; case "dcmAttributeSelector": descriptor.setAttributeSelectorsFromStrings(reader.stringArray()); break; case "dcmBulkDataVRLengthThreshold": descriptor.setLengthsThresholdsFromStrings(reader.stringArray()); break; default: reader.skipUnknownProperty(); } } reader.expect(JsonParser.Event.END_OBJECT); if (descriptor.getBulkDataDescriptorID() == null) throw new JsonParsingException("Missing property: dcmBulkDataDescriptorID", reader.getLocation()); } }
private void loadFrom(BasicBulkDataDescriptor descriptor, JsonReader reader) { while (reader.next() == JsonParser.Event.KEY_NAME) { switch (reader.getString()) { case "dcmBulkDataDescriptorID": descriptor.setBulkDataDescriptorID(reader.stringValue()); break; case "dcmBulkDataExcludeDefaults": descriptor.excludeDefaults(reader.booleanValue()); break; case "dcmAttributeSelector": descriptor.setAttributeSelectorsFromStrings(reader.stringArray()); break; case "dcmBulkDataVRLengthThreshold": descriptor.setLengthsThresholdsFromStrings(reader.stringArray()); break; default: reader.skipUnknownProperty(); } } reader.expect(JsonParser.Event.END_OBJECT); if (descriptor.getBulkDataDescriptorID() == null) throw new JsonParsingException("Missing property: dcmBulkDataDescriptorID", reader.getLocation()); } }