/** * Start an element. * @param writer * @param name * @param attrs * @throws XMLStreamException */ protected void writeStart(XMLStreamWriter writer, String name, XAttr... attrs) throws XMLStreamException { super.writeStart(writer, SCA11_NS, name, attrs); }
/** * Start a document. * @param writer * @throws XMLStreamException */ protected void writeStartDocument(XMLStreamWriter writer, String name, XAttr... attrs) throws XMLStreamException { super.writeStartDocument(writer, SCA11_NS, name, attrs); }
/** * * @param reader * @param elementName * @param extensionAttributeProcessor * @param context TODO * @param estensibleElement * @throws ContributionReadException * @throws XMLStreamException */ protected void readExtendedAttributes(XMLStreamReader reader, QName elementName, Extensible extensible, StAXAttributeProcessor extensionAttributeProcessor, ProcessorContext context) throws ContributionReadException, XMLStreamException { super.readExtendedAttributes(reader, extensible, extensionAttributeProcessor, assemblyFactory, context); }
protected void writeExtendedElements(XMLStreamWriter writer, Extensible extensible, StAXArtifactProcessor extensionProcessor, ProcessorContext context) throws ContributionWriteException, XMLStreamException { List <Object> otherExtensions = new ArrayList<Object>(); // write all generic extensions as elements // to produce semanticaly equal xml output for (Object ext : extensible.getExtensions()) { if (ext instanceof Extension) { extensionProcessor.write(ext, writer, context); } else { otherExtensions.add(ext); } } //wrap xml extensibility into a extension wrapper element if(otherExtensions.size() > 0) { writeStart(writer, SCA11_NS, "extensions"); for (Object extension : otherExtensions) { extensionProcessor.write(extension, writer, context); } writeEnd(writer); } }
/** * Start an element. * @param uri * @param name * @param attrs * @throws XMLStreamException */ protected void writeStart(XMLStreamWriter writer, String uri, String name, XAttr... attrs) throws XMLStreamException { helper.writeStartElement(writer, "", name, uri); writeAttributes(writer, attrs); }
protected void writeExtendedElements(XMLStreamWriter writer, Extensible extensible, StAXArtifactProcessor extensionProcessor, ProcessorContext context) throws ContributionWriteException, XMLStreamException { List <Object> otherExtensions = new ArrayList<Object>(); // write all generic extensions as elements // to produce semanticaly equal xml output for (Object ext : extensible.getExtensions()) { if (ext instanceof Extension) { extensionProcessor.write(ext, writer, context); } else { otherExtensions.add(ext); } } //wrap xml extensibility into a extension wrapper element if(otherExtensions.size() > 0) { writeStart(writer, SCA11_NS, "extensions"); for (Object extension : otherExtensions) { extensionProcessor.write(extension, writer, context); } writeEnd(writer); } }
/** * Start an element. * @param uri * @param name * @param attrs * @throws XMLStreamException */ protected void writeStart(XMLStreamWriter writer, String uri, String name, XAttr... attrs) throws XMLStreamException { helper.writeStartElement(writer, "", name, uri); writeAttributes(writer, attrs); }
/** * Start an element. * @param writer * @param name * @param attrs * @throws XMLStreamException */ protected void writeStart(XMLStreamWriter writer, String name, XAttr... attrs) throws XMLStreamException { super.writeStart(writer, SCA11_NS, name, attrs); }
/** * Start a document. * @param writer * @throws XMLStreamException */ protected void writeStartDocument(XMLStreamWriter writer, String name, XAttr... attrs) throws XMLStreamException { super.writeStartDocument(writer, SCA11_NS, name, attrs); }
/** * * @param reader * @param elementName * @param extensionAttributeProcessor * @param context TODO * @param estensibleElement * @throws ContributionReadException * @throws XMLStreamException */ protected void readExtendedAttributes(XMLStreamReader reader, QName elementName, Extensible extensible, StAXAttributeProcessor extensionAttributeProcessor, ProcessorContext context) throws ContributionReadException, XMLStreamException { super.readExtendedAttributes(reader, extensible, extensionAttributeProcessor, assemblyFactory, context); }
/** * Start a document. * @param writer * @throws XMLStreamException */ protected void writeStartDocument(XMLStreamWriter writer, String uri, String name, XAttr... attrs) throws XMLStreamException { writer.writeStartDocument(); writer.setDefaultNamespace(uri); writeStart(writer, uri, name, attrs); // writer.writeDefaultNamespace(uri); }
/** * Start a document. * @param writer * @param qname * @param attrs * @throws XMLStreamException */ protected void writeStartDocument(XMLStreamWriter writer, QName qname, XAttr... attrs) throws XMLStreamException { writeStartDocument(writer, qname.getNamespaceURI(), qname.getLocalPart(), attrs); }
/** * Start a document. * @param writer * @throws XMLStreamException */ protected void writeStartDocument(XMLStreamWriter writer, String uri, String name, XAttr... attrs) throws XMLStreamException { writer.writeStartDocument(); writer.setDefaultNamespace(uri); writeStart(writer, uri, name, attrs); // writer.writeDefaultNamespace(uri); }
/** * Start a document. * @param writer * @param qname * @param attrs * @throws XMLStreamException */ protected void writeStartDocument(XMLStreamWriter writer, QName qname, XAttr... attrs) throws XMLStreamException { writeStartDocument(writer, qname.getNamespaceURI(), qname.getLocalPart(), attrs); }
/** * Start an element. * @param qname * @param attrs * @throws XMLStreamException */ protected void writeStart(XMLStreamWriter writer, QName qname, XAttr... attrs) throws XMLStreamException { writeStart(writer, qname.getNamespaceURI(), qname.getLocalPart(), attrs); }
/** * Start an element. * @param qname * @param attrs * @throws XMLStreamException */ protected void writeStart(XMLStreamWriter writer, QName qname, XAttr... attrs) throws XMLStreamException { writeStart(writer, qname.getNamespaceURI(), qname.getLocalPart(), attrs); }