/** * Determine whether or not the value is a feature with target descriptor that is of the given * attribute descriptor. If it is, then it is a feature chained feature with only simple * content. * * @param descriptor The attribute descriptor * @param value value to check * @return true if the value is an arraylist containing a feature with the descriptor. */ @SuppressWarnings("unchecked") private boolean isFeatureChainedSimpleContent(AttributeDescriptor descriptor, Object value) { boolean isFeatureChainedSimpleContent = false; if (value != null) { if (value instanceof Collection) { Collection list = (Collection) value; if (!list.isEmpty()) { Object f = list.iterator().next(); if (f instanceof Feature) { Name featureName = ((Feature) f).getDescriptor().getName(); if (((Feature) f).getProperty(featureName) != null) { isFeatureChainedSimpleContent = true; } } } } } return isFeatureChainedSimpleContent; }
if (feature.getDescriptor() == null) { } else { typeName = feature.getDescriptor().getName();
feature.getDescriptor() .getUserData() .get(XSDElementDeclaration.class);
/** * Determine whether or not the value is a feature with target descriptor that is of the given * attribute descriptor. If it is, then it is a feature chained feature with only simple * content. * * @param descriptor * The attribute descriptor * @param value * value to check * @return true if the value is an arraylist containing a feature with the descriptor. */ @SuppressWarnings("unchecked") private boolean isFeatureChainedSimpleContent(AttributeDescriptor descriptor, Object value) { boolean isFeatureChainedSimpleContent = false; if (value != null) { if (value instanceof Collection) { Collection list = (Collection) value; if (!list.isEmpty()) { Object f = list.iterator().next(); if (f instanceof Feature) { Name featureName = ((Feature) f).getDescriptor().getName(); if (descriptor.getName().equals(featureName)) { isFeatureChainedSimpleContent = true; } } } } } return isFeatureChainedSimpleContent; }
if (feature.getDescriptor() == null) { } else { typeName = feature.getDescriptor().getName();