public void init(PropertyDescriptor descriptor) { init(); namespace = descriptor.getName().getNamespaceURI(); name = descriptor.getName().getLocalPart(); minOccurs = descriptor.getMinOccurs(); maxOccurs = descriptor.getMaxOccurs(); if (descriptor instanceof AttributeDescriptor) { AttributeDescriptor attribute = (AttributeDescriptor) descriptor; isNillable = attribute.isNillable(); propertyType = attribute.getType(); } if (descriptor instanceof AssociationDescriptor) { AssociationDescriptor association = (AssociationDescriptor) descriptor; propertyType = association.getType(); } }
public void init(PropertyDescriptor descriptor) { init(); namespace = descriptor.getName().getNamespaceURI(); name = descriptor.getName().getLocalPart(); minOccurs = descriptor.getMinOccurs(); maxOccurs = descriptor.getMaxOccurs(); if (descriptor instanceof AttributeDescriptor) { AttributeDescriptor attribute = (AttributeDescriptor) descriptor; isNillable = attribute.isNillable(); propertyType = attribute.getType(); } if (descriptor instanceof AssociationDescriptor) { AssociationDescriptor association = (AssociationDescriptor) descriptor; propertyType = association.getType(); } }