public class LsOperationResult implements OperationResult { @ElementList(name = "fileList", required = false, entry = "fileVersion") private ArrayList<FileVersion> fileList; @ElementMap(name = "fileVersions", required = false, key = "fileHistoryId", value = "partialFileHistory") private HashMap<FileHistoryId, PartialFileHistory> fileVersions; public LsOperationResult() { // Nothing } public LsOperationResult(List<FileVersion> fileList, Map<FileHistoryId, PartialFileHistory> fileVersions) { this.fileList = (fileList != null) ? new ArrayList<>(fileList) : null; this.fileVersions = (fileVersions != null) ? new HashMap<>(fileVersions) : null; } public List<FileVersion> getFileList() { return fileList; } public Map<FileHistoryId, PartialFileHistory> getFileVersions() { return fileVersions; } }
private String type; @ElementMap(entry="property", key="name", required=false, attribute=true, inline=true) protected Map<String, String> settings;
@ElementMap(name = "systemProperties", entry = "property", key = "name", required = false, attribute = true) private TreeMap<String, String> systemProperties;
private long minSecondsBetweenCleanups = 3 * 60 * 60; // 3 hours @ElementMap(entry = "fromTime", key = "truncateDateFormat", required = false, attribute = true, inline = true) private SortedMap<Long, TimeUnit> purgeFileVersionSettings;
public static class OffsetTransform implements AxisTransform { @ElementMap(required=false) HashMap<String, Double> offsetsByHeadMountableId = new HashMap<>(); public OffsetTransform() { offsetsByHeadMountableId.put("N1", 1.); } @Override public double toTransformed(Axis axis, HeadMountable hm, double rawCoordinate) { Double offset = offsetsByHeadMountableId.get(hm.getId()); if (offset != null) { return rawCoordinate + offset; } return rawCoordinate; } @Override public double toRaw(Axis axis, HeadMountable hm, double transformedCoordinate) { Double offset = offsetsByHeadMountableId.get(hm.getId()); if (offset != null) { return transformedCoordinate - offset; } return transformedCoordinate; } } }
@ElementMap(entry = "typeDef", key = "pattern", attribute = true, inline = true, value = "Definition", valueType = TypeDef.class, required = false) Map<String, TypeDef> registeredPatterns;
@ElementMap(entry = "field", key = "key", attribute = true, inline = true, required = false) private void setOtherFieldsXml( HashMap<String, SimpleXmlWrapperValue> otherFieldsForSerialization) { if (otherFieldsForSerialization != null) { // No need to synchronize here, the object is being deserialized, // so it can't yet be seen by other threads. fields.putAll(SimpleXmlWrappers.unwrap(otherFieldsForSerialization)); } }
@ElementMap(inline = true, attribute=true, entry = "attribute", key = "name", keyType = String.class, value = "details", valueType = Boolean.class, required=false) LinkedHashMap<String, Boolean> attributes;
@ElementMap(entry = "field", key = "key", attribute = true, inline = true, required = false) private HashMap<String, SimpleXmlWrapperValue> getOtherFieldsXml() { final HashMap<String, SimpleXmlWrapperValue> otherFieldsForSerialization; synchronized (this) { otherFieldsForSerialization = MapUtils.asHashMap(SimpleXmlWrappers .wrap(fields)); } otherFieldsForSerialization.remove(TITLE); otherFieldsForSerialization.remove(SUMMARY); otherFieldsForSerialization.remove(CONTENT_URL); otherFieldsForSerialization.remove(SOURCES); otherFieldsForSerialization.remove(LANGUAGE); otherFieldsForSerialization.remove(SCORE); fireSerializationListeners(otherFieldsForSerialization); return otherFieldsForSerialization.isEmpty() ? null : otherFieldsForSerialization; }
@ElementMap(name = "map", attribute = true) private HashMap<String, SimpleXmlWrapperValue> forSerialization;
@ElementMap(entry = "hash", key = "file", attribute = true, inline = true) private HashMap<String, String> map;
public class BindableMetadata extends CommonMetadata @ElementMap(name = "attributes", entry = "attribute", key = "field-name", inline = false, attribute = true) private Map<String, AttributeMetadata> attributeMetadataInternal;
@ElementMap(name = "fields", keyType = String.class, valueType = Field.class, entry = "item", required = false) @JsonIgnore private Map<String, Field> fieldSet = new HashMap<>();
@ElementMap(entry = "member", attribute = true, inline = true, required = false, empty = true, keyType = String.class, key = "name") private LinkedHashMap<String, Object> members;
@Root class TestSuite { @ElementList(inline=true, type=TestCase.class, required=false) private List<TestCase> testCases; @Path("./properties") @ElementMap(required = false, entry = "property", key = "name", value = "value", attribute = true, inline = true) private Map<String, String> properties; public List<TestCase> getTestCase() { return testCases; } public Map<String, String> getProperties() { return properties; } }
protected ComponentType componentType; @ElementMap (name = "fields", keyType = String.class, valueType = Field.class, entry = "item", required = false) @JsonProperty ("Fields") @JsonDeserialize (contentAs = BaseField.class)
public class ConfigXmlFile { @ElementMap(entry = "parameter", key = "name", attribute = true, inline = true) private Map<String, String> parameters;
protected int version; @ElementMap (name = "metadata", keyType = String.class, valueType = Field.class, entry = "item", required = false) @JsonProperty ("MetadataFields") @JsonDeserialize (contentAs = BaseField.class)
public class Report { @ElementMap(attribute=true, key="name") private Map<String, String> header;
@ElementMap(entry="parameter", key="name", attribute=true, inline=true, required=false) private Map<String, String> parameters;