}
private int _mdId;
public void setSchemaFilters(boolean withHeld, boolean keepMarkedElement) {
MetadataSchema mds = _dataManager.getSchema(metadata.getDataInfo().getSchemaId());
Map<String, Pair<String, Element>> filters = new HashMap<String, Pair<String, Element>>();
if (withHeld) {
if (keepMarkedElement) {
Element mark = new Element("keepMarkedElement");
mark.setAttribute("nilReason", "withheld", Geonet.Namespaces.GCO);
filters.put("editing",
Pair.read(XPATH_WITHHELD, mark));
} else {
filters.put("editing",
Pair.<String, Element>read(XPATH_WITHHELD, null));
}
}
filters.put("download",
Pair.<String, Element>read(XPATH_DOWNLOAD, null));
filters.put("dynamic",
Pair.<String, Element>read(XPATH_DYNAMIC, null));
mds.setOperationFilters(filters);
}