@Override public void eUnset(EStructuralFeature eStructuralFeature) { EAnnotation eAnnotation = eNamedElement.getEAnnotation(ExtendedMetaData.ANNOTATION_URI); if (eAnnotation != null) { eAnnotation.getDetails().removeKey(eStructuralFeature.getName()); } }
public void setLengthFacet(EDataType eDataType, int length) { if (length == -1) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("length"); } } else { EAnnotation eAnnotation = getAnnotation(eDataType, true); eAnnotation.getDetails().put("length", Integer.toString(length)); } getExtendedMetaData(eDataType).setLengthFacet(length); }
public void setMaxLengthFacet(EDataType eDataType, int length) { if (length == -1) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("maxLength"); } } else { EAnnotation eAnnotation = getAnnotation(eDataType, true); eAnnotation.getDetails().put("maxLength", Integer.toString(length)); } getExtendedMetaData(eDataType).setMaxLengthFacet(length); }
public void setTotalDigitsFacet(EDataType eDataType, int digits) { if (digits == -1) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("totalDigits"); } } else { EAnnotation eAnnotation = getAnnotation(eDataType, true); eAnnotation.getDetails().put("totalDigits", Integer.toString(digits)); } getExtendedMetaData(eDataType).setTotalDigitsFacet(digits); }
public void setFractionDigitsFacet(EDataType eDataType, int digits) { if (digits == -1) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("fractionDigits"); } } else { EAnnotation eAnnotation = getAnnotation(eDataType, true); eAnnotation.getDetails().put("fractionDigits", Integer.toString(digits)); } getExtendedMetaData(eDataType).setFractionDigitsFacet(digits); }
public void setMinLengthFacet(EDataType eDataType, int length) { if (length == -1) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("minLength"); } } else { EAnnotation eAnnotation = getAnnotation(eDataType, true); eAnnotation.getDetails().put("minLength", Integer.toString(length)); } getExtendedMetaData(eDataType).setMinLengthFacet(length); }
public void setWildcards(EStructuralFeature eStructuralFeature, List<String> wildcards) { if (wildcards.isEmpty()) { EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("wildcards"); eAnnotation.getDetails().removeKey("name"); } } else { String namespace = getPackageNamespace(eStructuralFeature); EAnnotation eAnnotation = getAnnotation(eStructuralFeature, true); eAnnotation.getDetails().put("wildcards", getEncodedWildcards(namespace, wildcards)); eAnnotation.getDetails().put("name",""); } getExtendedMetaData(eStructuralFeature).setWildcards(wildcards); }
public void setMinInclusiveFacet(EDataType eDataType, String literal) { if (literal == null) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("minInclusive"); } } else { EAnnotation eAnnotation = getAnnotation(eDataType, true); eAnnotation.getDetails().put("minInclusive", literal); } getExtendedMetaData(eDataType).setMinInclusiveFacet(literal); }
public void setFeatureKind(EStructuralFeature eStructuralFeature, int kind) { if (kind > 0 && kind < FEATURE_KINDS.length) { EAnnotation eAnnotation = getAnnotation(eStructuralFeature, true); eAnnotation.getDetails().put("kind", FEATURE_KINDS[kind]); } else { EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("kind"); } } getExtendedMetaData(eStructuralFeature).setFeatureKind(kind); }
public void setProcessingKind(EStructuralFeature eStructuralFeature, int kind) { if (kind > 0 && kind < PROCESSING_KINDS.length) { EAnnotation eAnnotation = getAnnotation(eStructuralFeature, true); eAnnotation.getDetails().put("processing", PROCESSING_KINDS[kind]); } else { EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("processing"); } } getExtendedMetaData(eStructuralFeature).setProcessingKind(kind); }
public void setMinExclusiveFacet(EDataType eDataType, String literal) { if (literal == null) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("minExclusive"); } } else { EAnnotation eAnnotation = getAnnotation(eDataType, true); eAnnotation.getDetails().put("minExclusive", literal); } getExtendedMetaData(eDataType).setMinExclusiveFacet(literal); }
public void setMaxExclusiveFacet(EDataType eDataType, String literal) { if (literal == null) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("maxExclusive"); } } else { EAnnotation eAnnotation = getAnnotation(eDataType, true); eAnnotation.getDetails().put("maxExclusive", literal); } getExtendedMetaData(eDataType).setMaxExclusiveFacet(literal); }
public void setContentKind(EClass eClass, int kind) { if (kind > 0 && kind < CONTENT_KINDS.length) { EAnnotation eAnnotation = getAnnotation(eClass, true); eAnnotation.getDetails().put("kind", CONTENT_KINDS[kind]); } else { EAnnotation eAnnotation = getAnnotation(eClass, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("kind"); } } getExtendedMetaData(eClass).setContentKind(kind); }
public void setWhiteSpaceFacet(EDataType eDataType, int whiteSpace) { if (whiteSpace == UNSPECIFIED_WHITE_SPACE) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("whiteSpace"); } } else { EAnnotation eAnnotation = getAnnotation(eDataType, true); eAnnotation.getDetails().put("whiteSpace", WHITE_SPACE_KINDS[whiteSpace]); } getExtendedMetaData(eDataType).setWhiteSpaceFacet(whiteSpace); }
public void setMaxInclusiveFacet(EDataType eDataType, String literal) { if (literal == null) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("maxInclusive"); } } else { EAnnotation eAnnotation = getAnnotation(eDataType, true); eAnnotation.getDetails().put("maxInclusive", literal); } getExtendedMetaData(eDataType).setMaxInclusiveFacet(literal); }
public void setQualified(EPackage ePackage, boolean isQualified) { if (!isQualified) { EAnnotation eAnnotation = getAnnotation(ePackage, true); eAnnotation.getDetails().put("qualified", "false"); } else { EAnnotation eAnnotation = getAnnotation(ePackage, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("qualified"); } } getExtendedMetaData(ePackage).setQualified(isQualified); }
public void setItemType(EDataType eDataType, EDataType itemType) { if (itemType == null) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("itemType"); } } else { EAnnotation eAnnotation = getAnnotation(eDataType, true); eAnnotation.getDetails().put("itemType", getQualifiedName(getNamespace(eDataType), itemType)); } getExtendedMetaData(eDataType).setItemType(itemType); }
public void setAffiliation(EStructuralFeature eStructuralFeature, EStructuralFeature affiliation) { if (affiliation == null) { EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("affiliation"); } } else { EAnnotation eAnnotation = getAnnotation(eStructuralFeature, true); eAnnotation.getDetails().put ("affiliation", getQualifiedName(getPackageNamespace(eStructuralFeature), affiliation)); } getExtendedMetaData(eStructuralFeature).setAffiliation(affiliation); }
public void setBaseType(EDataType eDataType, EDataType baseType) { if (baseType == null) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("baseType"); } } else { EAnnotation eAnnotation = getAnnotation(eDataType, true); eAnnotation.getDetails().put("baseType", getQualifiedName(getNamespace(eDataType), baseType)); } getExtendedMetaData(eDataType).setBaseType(baseType); }
public void setGroup(EStructuralFeature eStructuralFeature, EStructuralFeature group) { if (group == null) { EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("group"); } } else { EAnnotation eAnnotation = getAnnotation(eStructuralFeature, true); eAnnotation.getDetails().put ("group", getQualifiedName(getPackageNamespace(eStructuralFeature), group)); } getExtendedMetaData(eStructuralFeature).setGroup(group); }