/** * Adds a new reference to the specific element class. If no element class is found, then a new element class. will * be created. * * @param className * the class name * @param classReference * the new reference to be added. */ public void addClassReference(final String className, final MetadataElement classReference) { classReference.setRef(getNamespaceValue(classReference.getRef())); for (MetadataItem item : classList) { if (item.getName().equals(className) && item.getNamespace().equals(getCurrentNamespace()) && item.getPackageApi().equals(getCurrentPackageApi())) { item.getReferences().add(classReference); return; } } final MetadataItem newItem = new MetadataItem(className); newItem.getReferences().add(classReference); newItem.setNamespace(getCurrentNamespace()); newItem.setSchemaName(getCurrentSchmema()); newItem.setPackageApi(getCurrentPackageApi()); newItem.setPackageImpl(getCurrentPackageImpl()); classList.add(newItem); }
/** * Adds a new element to the specific group element class. If no group element class is found, then a new group * element class. will be created. * * @param groupName * the group class name of * @param groupElement * the new element to be added. */ public void addGroupElement(final String groupName, final MetadataElement groupElement) { for (MetadataItem item : groupList) { if (item.getName().equals(groupName) && item.getNamespace().equals(getCurrentNamespace())) { item.getElements().add(groupElement); return; } } final MetadataItem newItem = new MetadataItem(groupName); newItem.getElements().add(groupElement); newItem.setNamespace(getCurrentNamespace()); newItem.setSchemaName(getCurrentSchmema()); newItem.setPackageApi(getCurrentPackageApi()); newItem.setPackageImpl(getCurrentPackageImpl()); groupList.add(newItem); }
/** * Adds a new reference to the specific element class. If no element class is found, then a new element class. will * be created. * * @param className * the class name * @param classReference * the new reference to be added. */ public void addClassReference(final String className, final MetadataElement classReference) { classReference.setRef(getNamespaceValue(classReference.getRef())); for (MetadataItem item : classList) { if (item.getName().equals(className) && item.getNamespace().equals(getCurrentNamespace()) && item.getPackageApi().equals(getCurrentPackageApi())) { item.getReferences().add(classReference); return; } } final MetadataItem newItem = new MetadataItem(className); newItem.getReferences().add(classReference); newItem.setNamespace(getCurrentNamespace()); newItem.setSchemaName(getCurrentSchmema()); newItem.setPackageApi(getCurrentPackageApi()); newItem.setPackageImpl(getCurrentPackageImpl()); classList.add(newItem); }
/** * Adds a new element to the specific group element class. If no group element class is found, then a new group * element class. will be created. * * @param groupName * the group class name of * @param groupElement * the new element to be added. */ public void addGroupElement(final String groupName, final MetadataElement groupElement) { for (MetadataItem item : groupList) { if (item.getName().equals(groupName) && item.getNamespace().equals(getCurrentNamespace())) { item.getElements().add(groupElement); return; } } final MetadataItem newItem = new MetadataItem(groupName); newItem.getElements().add(groupElement); newItem.setNamespace(getCurrentNamespace()); newItem.setSchemaName(getCurrentSchmema()); newItem.setPackageApi(getCurrentPackageApi()); newItem.setPackageImpl(getCurrentPackageImpl()); groupList.add(newItem); }
/** * Adds a enumeration value to the specified enumeration name. If no enumeration class is found, then a new * enumeration class will be created. * * @param enumName * the enumeration class name. * @param enumValue * the new enumeration value. */ public void addEnumValue(final String enumName, final String enumValue) { for (MetadataEnum instance : enumList) { if (instance.getName().equals(enumName) && instance.getNamespace().equals(getCurrentNamespace())) { instance.addValue(enumValue); return; } } final MetadataEnum newEnum = new MetadataEnum(enumName); newEnum.addValue(enumValue); newEnum.setNamespace(getCurrentNamespace()); newEnum.setSchemaName(getCurrentSchmema()); newEnum.setPackageApi(getCurrentPackageApi()); enumList.add(newEnum); }
/** * Adds a enumeration value to the specified enumeration name. If no enumeration class is found, then a new * enumeration class will be created. * * @param enumName * the enumeration class name. * @param enumValue * the new enumeration value. */ public void addEnumValue(final String enumName, final String enumValue) { for (MetadataEnum instance : enumList) { if (instance.getName().equals(enumName) && instance.getNamespace().equals(getCurrentNamespace())) { instance.addValue(enumValue); return; } } final MetadataEnum newEnum = new MetadataEnum(enumName); newEnum.addValue(enumValue); newEnum.setNamespace(getCurrentNamespace()); newEnum.setSchemaName(getCurrentSchmema()); newEnum.setPackageApi(getCurrentPackageApi()); enumList.add(newEnum); }
/** * Adds a new reference to the specific group element class. If no group element class is found, then a new group * element class. will be created. * * @param groupName * the group class name of * @param groupReference * the new reference to be added. */ public void addGroupReference(final String groupName, final MetadataElement groupReference) { groupReference.setRef(getNamespaceValue(groupReference.getRef())); for (MetadataItem item : groupList) { if (item.getName().equals(groupName) && item.getNamespace().equals(getCurrentNamespace())) { item.getReferences().add(groupReference); return; } } final MetadataItem newItem = new MetadataItem(groupName); newItem.getReferences().add(groupReference); newItem.setNamespace(getCurrentNamespace()); newItem.setSchemaName(getCurrentSchmema()); newItem.setPackageApi(getCurrentPackageApi()); newItem.setPackageImpl(getCurrentPackageImpl()); groupList.add(newItem); }
/** * Adds a new reference to the specific group element class. If no group element class is found, then a new group * element class. will be created. * * @param groupName * the group class name of * @param groupReference * the new reference to be added. */ public void addGroupReference(final String groupName, final MetadataElement groupReference) { groupReference.setRef(getNamespaceValue(groupReference.getRef())); for (MetadataItem item : groupList) { if (item.getName().equals(groupName) && item.getNamespace().equals(getCurrentNamespace())) { item.getReferences().add(groupReference); return; } } final MetadataItem newItem = new MetadataItem(groupName); newItem.getReferences().add(groupReference); newItem.setNamespace(getCurrentNamespace()); newItem.setSchemaName(getCurrentSchmema()); newItem.setPackageApi(getCurrentPackageApi()); newItem.setPackageImpl(getCurrentPackageImpl()); groupList.add(newItem); }
&& item.getPackageApi().equals(getCurrentPackageApi())) { newItem.setNamespace(getCurrentNamespace()); newItem.setSchemaName(getCurrentSchmema()); newItem.setPackageApi(getCurrentPackageApi()); newItem.setPackageImpl(getCurrentPackageImpl()); classList.add(newItem);
&& item.getPackageApi().equals(getCurrentPackageApi())) { newItem.setNamespace(getCurrentNamespace()); newItem.setSchemaName(getCurrentSchmema()); newItem.setPackageApi(getCurrentPackageApi()); newItem.setPackageImpl(getCurrentPackageImpl()); classList.add(newItem);