@Override public Object copy(Object source, DataType dataType, DataType targetDataType, Operation operation, Operation targetOperation) { if (Node.class.isAssignableFrom(source.getClass())) { Node nodeSource = (Node)source; return nodeSource.cloneNode(true); } return super.copy(source, dataType, targetDataType, operation, targetOperation); }
public DataType introspect(Object value, Operation operation) { if (value == null) { return null; } else { DataType<Class> dataType = new DataTypeImpl<Class>(value.getClass(), value.getClass()); if (introspect(dataType, (Operation) null)) { return dataType; } else { return null; } } }
@SuppressWarnings("unchecked") public boolean introspect(DataType type, Operation operation) { assert type != null; Class cls = type.getPhysical(); if (baseType != null && baseType.isAssignableFrom(cls)) { type.setDataBinding(getName()); if (type.getLogical() == null) { type.setLogical(XMLType.UNKNOWN); } return true; } return false; }
@SuppressWarnings("unchecked") public boolean introspect(DataType type, Operation operation) { assert type != null; Class cls = type.getPhysical(); if (baseType != null && baseType.isAssignableFrom(cls)) { type.setDataBinding(getName()); if (type.getLogical() == null) { type.setLogical(XMLType.UNKNOWN); } return true; } return false; }
@Override public Object copy(Object source, DataType dataType, DataType targetDataType, Operation operation, Operation targetOperation) { if (Node.class.isAssignableFrom(source.getClass())) { Node nodeSource = (Node)source; return nodeSource.cloneNode(true); } return super.copy(source, dataType, targetDataType, operation, targetOperation); }
public DataType introspect(Object value, Operation operation) { if (value == null) { return null; } else { DataType<Class> dataType = new DataTypeImpl<Class>(value.getClass(), value.getClass()); if (introspect(dataType, (Operation) null)) { return dataType; } else { return null; } } }
@Override public Object copy(Object source, DataType sourceDataType, DataType targetDataType, Operation sourceOperation, Operation targetOperation) { if ( OMElement.class.isAssignableFrom(source.getClass()) ) { try { OMElement sourceElement = (OMElement)source; return sourceElement.cloneOMElement(); } catch ( Exception e ) { throw new IllegalArgumentException(e); } } return super.copy(source, sourceDataType, targetDataType, sourceOperation, targetOperation); }
@Override public boolean introspect(DataType type, Operation operation) { if (super.introspect(type, operation)) { type.setLogical(XMLType.UNKNOWN); type.setDataBinding(NAME); return true; } else { return false; } }
@Override public boolean introspect(DataType type, Operation operation) { if (super.introspect(type, operation)) { type.setLogical(XMLType.UNKNOWN); type.setDataBinding(NAME); return true; } else { return false; } }