/** * 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 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); }
@Override public boolean filter(final Metadata metadata, final TreeWalker walker) { final Node parent = walker.getCurrentNode(); final Element element = (Element) parent; if (XsdElementEnum.union.isTagNameEqual(element.getTagName())) { final String memberTypesStr = MetadataUtil.getAttributeValue(element, "memberTypes"); if (memberTypesStr != null) { final Node parentNodeWithName = MetadataUtil.getNextParentNodeWithAttr(parent.getParentNode(), "name"); if (parentNodeWithName != null) { final Element parentElementWithName = (Element) parentNodeWithName; final String parentName = MetadataUtil.getAttributeValue(parentElementWithName, "name"); final String[] items = memberTypesStr.split(" ", -1); if (items != null && items.length > 1) { final MetadataItem dataType = new MetadataItem(parentName); dataType.setMappedTo(getDataType(items)); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); } } } } return false; }
@Override public boolean filter(final Metadata metadata, final TreeWalker walker) { final Node parent = walker.getCurrentNode(); final Element element = (Element) parent; if (XsdElementEnum.union.isTagNameEqual(element.getTagName())) { final String memberTypesStr = MetadataUtil.getAttributeValue(element, "memberTypes"); if (memberTypesStr != null) { final Node parentNodeWithName = MetadataUtil.getNextParentNodeWithAttr(parent.getParentNode(), "name"); if (parentNodeWithName != null) { final Element parentElementWithName = (Element) parentNodeWithName; final String parentName = MetadataUtil.getAttributeValue(parentElementWithName, "name"); final String[] items = memberTypesStr.split(" ", -1); if (items != null && items.length > 1) { final MetadataItem dataType = new MetadataItem(parentName); dataType.setMappedTo(getDataType(items)); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); } } } } return false; }
/** * 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); }
dataType.setMappedTo("xsd:string"); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); return true;
dataType.setMappedTo("xsd:string"); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); return true;
/** * 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 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 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); }
public boolean filter(final Metadata metadata, final TreeWalker walker) { final Node parent = walker.getCurrentNode(); final Element element = (Element) parent; if (XsdElementEnum.restriction.isTagNameEqual(element.getTagName())) { if (!hasNestedElement(parent, XsdElementEnum.enumeration)) { final Node parentNodeWithName = MetadataUtil.getNextParentNodeWithAttr(parent.getParentNode(), "name"); if (parentNodeWithName != null) { final Element parentElementWithName = (Element) parentNodeWithName; final String dataTypeName = MetadataUtil.getAttributeValue(parentElementWithName, "name"); if (dataTypeName != null) { final String type = MetadataUtil.getAttributeValue(element, "base"); if (type != null) { final MetadataItem dataType = new MetadataItem(dataTypeName); dataType.setMappedTo(type); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); return true; } } } } } return false; }
public boolean filter(final Metadata metadata, final TreeWalker walker) { final Node parent = walker.getCurrentNode(); final Element element = (Element) parent; if (XsdElementEnum.restriction.isTagNameEqual(element.getTagName())) { if (!hasNestedElement(parent, XsdElementEnum.enumeration)) { final Node parentNodeWithName = MetadataUtil.getNextParentNodeWithAttr(parent.getParentNode(), "name"); if (parentNodeWithName != null) { final Element parentElementWithName = (Element) parentNodeWithName; final String dataTypeName = MetadataUtil.getAttributeValue(parentElementWithName, "name"); if (dataTypeName != null) { final String type = MetadataUtil.getAttributeValue(element, "base"); if (type != null) { final MetadataItem dataType = new MetadataItem(dataTypeName); dataType.setMappedTo(type); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); return true; } } } } } return false; }
dataType.setMappedTo(typeStr); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType);
dataType.setMappedTo(typeStr); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType);
newItem.getElements().add(classElement); newItem.setNamespace(getCurrentNamespace()); newItem.setSchemaName(getCurrentSchmema()); newItem.setPackageApi(getCurrentPackageApi()); newItem.setPackageImpl(getCurrentPackageImpl());
newItem.getElements().add(classElement); newItem.setNamespace(getCurrentNamespace()); newItem.setSchemaName(getCurrentSchmema()); newItem.setPackageApi(getCurrentPackageApi()); newItem.setPackageImpl(getCurrentPackageImpl());
dataType.setMappedTo(typeStr); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); dataType.setMappedTo("xs:string"); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); return true;
dataType.setMappedTo(typeStr); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); dataType.setMappedTo("xs:string"); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); return true;
dataType.setMappedTo("javaee:emptyType"); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); return true; dataType.setMappedTo("javaee:emptyType"); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); return true;
dataType.setMappedTo("javaee:emptyType"); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); return true; dataType.setMappedTo("javaee:emptyType"); dataType.setNamespace(metadata.getCurrentNamespace()); dataType.setSchemaName(metadata.getCurrentSchmema()); metadata.getDataTypeList().add(dataType); return true;