public Item(Item other) { super(other); setRefID(other.getRefID()); }
protected Item createItem(Attributes attributes) { Item item = new Item(); item.setId(attributes.getValue("id")); item.setParentID(attributes.getValue("parentID")); try { Boolean value = (Boolean)Datatype.Builtin.BOOLEAN.getDatatype().valueOf( attributes.getValue("restricted") ); if (value != null) item.setRestricted(value); } catch (Exception ex) { // Ignore } if ((attributes.getValue("refID") != null)) item.setRefID(attributes.getValue("refID")); return item; }
public Item(Item other) { super(other); setRefID(other.getRefID()); }
protected Item createItem(Attributes attributes) { Item item = new Item(); item.setId(attributes.getValue("id")); item.setParentID(attributes.getValue("parentID")); try { Boolean value = (Boolean)Datatype.Builtin.BOOLEAN.getDatatype().valueOf( attributes.getValue("restricted") ); if (value != null) item.setRestricted(value); } catch (Exception ex) { // Ignore } if ((attributes.getValue("refID") != null)) item.setRefID(attributes.getValue("refID")); return item; }
public Item(Item other) { super(other); setRefID(other.getRefID()); }
protected Item createItem(Attributes attributes) { Item item = new Item(); item.setId(attributes.getValue("id")); item.setParentID(attributes.getValue("parentID")); try { Boolean value = (Boolean)Datatype.Builtin.BOOLEAN.getDatatype().valueOf( attributes.getValue("restricted") ); if (value != null) item.setRestricted(value); } catch (Exception ex) { // Ignore } if ((attributes.getValue("refID") != null)) item.setRefID(attributes.getValue("refID")); return item; }
@Override @Nonnull public final DIDLObject toObject() throws Exception { log.debug("toObject() - {}", datum); final DIDLObject item = datum.getDelegate().as(DIDLAdapter).toObject(); if (item instanceof Item) { ((Item)item).setRefID(item.getId()); // don't externalize this } item.setId(externalized(datum.getPath().toString())); datum.getParent().ifPresent(parent -> item.setParentID(externalized(parent.getPath().toString()))); return item; } }