private List<AnnotationAttribute> readAnnotationAttribute(final XMLStreamReader reader) { List<AnnotationAttribute> annotationAttributes = new ArrayList<AnnotationAttribute>(); for (int i = 0; i < reader.getAttributeCount(); i++) { String attributeNamespace = reader.getAttributeNamespace(i); if (attributeNamespace != null && !isDefaultNamespace(attributeNamespace) && !mandatoryNamespaces.containsValue(attributeNamespace) && !edmNamespaces.contains(attributeNamespace)) { annotationAttributes.add(new AnnotationAttribute().setName(reader.getAttributeLocalName(i)). setPrefix(reader.getAttributePrefix(i)).setNamespace(attributeNamespace).setText( reader.getAttributeValue(i))); } } if (annotationAttributes.isEmpty()) { return null; } return annotationAttributes; }
private List<AnnotationAttribute> readAnnotationAttribute(final XMLStreamReader reader) { List<AnnotationAttribute> annotationAttributes = new ArrayList<AnnotationAttribute>(); for (int i = 0; i < reader.getAttributeCount(); i++) { String attributeNamespace = reader.getAttributeNamespace(i); if (attributeNamespace != null && !isDefaultNamespace(attributeNamespace) && !mandatoryNamespaces.containsValue(attributeNamespace) && !edmNamespaces.contains(attributeNamespace)) { annotationAttributes.add(new AnnotationAttribute().setName(reader.getAttributeLocalName(i)). setPrefix(reader.getAttributePrefix(i)).setNamespace(attributeNamespace).setText( reader.getAttributeValue(i))); } } if (annotationAttributes.isEmpty()) { return null; } return annotationAttributes; }
private List<AnnotationAttribute> readAnnotationAttribute(final XMLStreamReader reader) { List<AnnotationAttribute> annotationAttributes = new ArrayList<AnnotationAttribute>(); for (int i = 0; i < reader.getAttributeCount(); i++) { String attributeNamespace = reader.getAttributeNamespace(i); if (attributeNamespace != null && !isDefaultNamespace(attributeNamespace) && !mandatoryNamespaces.containsValue(attributeNamespace) && !edmNamespaces.contains(attributeNamespace)) { annotationAttributes.add(new AnnotationAttribute().setName(reader.getAttributeLocalName(i)). setPrefix(reader.getAttributePrefix(i)).setNamespace(attributeNamespace).setText( reader.getAttributeValue(i))); } } if (annotationAttributes.isEmpty()) { return null; } return annotationAttributes; }
private VocabAnnotationElement generateAnnotationElement(HashMap<Integer, EdmxReference> edmxRefMap) { VocabAnnotationElement vocabEle = new VocabAnnotationElement(); List<AnnotationElement> annoElements = new ArrayList<AnnotationElement>(); for (int i = 0; i < edmxRefMap.size(); i++) { EdmxReference edmxRef = edmxRefMap.get(i + 1); List<AnnotationAttribute> childAttributes = new ArrayList<AnnotationAttribute>(); childAttributes.add(new AnnotationAttribute().setName("Alias").setText(edmxRef.getAlias())); childAttributes.add(new AnnotationAttribute().setName("Namespace").setText(edmxRef.getNamespace())); List<AnnotationAttribute> referenceAttributes = new ArrayList<AnnotationAttribute>(); List<AnnotationElement> childElements = new ArrayList<AnnotationElement>(); childElements.add(new AnnotationElement().setName("edmx:Include").setAttributes(childAttributes)); if (edmxRef.getNamespaceUri() != null) referenceAttributes .add(new AnnotationAttribute().setName("xmlns:edmx").setText(edmxRef.getNamespaceUri())); referenceAttributes.add(new AnnotationAttribute().setName("Uri").setText(edmxRef.getUri())); annoElements.add(new AnnotationElement().setName("edmx:Reference").setPrefix("edmx") .setAttributes(referenceAttributes).setChildElements(childElements)); } vocabEle.setAnnotationElements(annoElements); return vocabEle; }
AnnotationAttribute annotationAttribute = new AnnotationAttribute(); annotationAttribute.setText(reader.getAttributeValue(i)); annotationAttribute.setName(reader.getAttributeLocalName(i));
AnnotationAttribute annotationAttribute = new AnnotationAttribute(); annotationAttribute.setText(reader.getAttributeValue(i)); annotationAttribute.setName(reader.getAttributeLocalName(i));
AnnotationAttribute annotationAttribute = new AnnotationAttribute(); annotationAttribute.setText(reader.getAttributeValue(i)); annotationAttribute.setName(reader.getAttributeLocalName(i));