com.sun.xml.internal.txw2.TXW Java Examples

The following examples show how to use com.sun.xml.internal.txw2.TXW. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ServiceArtifactSchemaGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected Schema create(String tns) {
    try {
        Result res = xsdResolver.createOutput(tns, FilePrefix + (fileIndex++) + ".xsd");
        return TXW.create(Schema.class, ResultFactory.createSerializer(res));
    } catch (IOException e) {
        // TODO Auto-generated catch block
        throw new WebServiceException(e);
    }
}
 
Example #2
Source File: XmlPolicyModelMarshaller.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given XMLStreamWriter.
 *
 * @param model A policy source model.
 * @param writer An XML stream writer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final XMLStreamWriter writer) throws PolicyException {
    final StaxSerializer serializer = new StaxSerializer(writer);
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, serializer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
    serializer.flush();
}
 
Example #3
Source File: XmlPolicyModelMarshaller.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given StaxSerializer.
 *
 * @param model A policy source model.
 * @param writer A Stax serializer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final StaxSerializer writer) throws PolicyException {
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, writer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
}
 
Example #4
Source File: XmlPolicyModelMarshaller.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given XMLStreamWriter.
 *
 * @param model A policy source model.
 * @param writer An XML stream writer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final XMLStreamWriter writer) throws PolicyException {
    final StaxSerializer serializer = new StaxSerializer(writer);
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, serializer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
    serializer.flush();
}
 
Example #5
Source File: XmlPolicyModelMarshaller.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given StaxSerializer.
 *
 * @param model A policy source model.
 * @param writer A Stax serializer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final StaxSerializer writer) throws PolicyException {
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, writer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
}
 
Example #6
Source File: XmlPolicyModelMarshaller.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given XMLStreamWriter.
 *
 * @param model A policy source model.
 * @param writer An XML stream writer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final XMLStreamWriter writer) throws PolicyException {
    final StaxSerializer serializer = new StaxSerializer(writer);
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, serializer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
    serializer.flush();
}
 
Example #7
Source File: XmlPolicyModelMarshaller.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given StaxSerializer.
 *
 * @param model A policy source model.
 * @param writer A Stax serializer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final StaxSerializer writer) throws PolicyException {
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, writer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
}
 
Example #8
Source File: XmlPolicyModelMarshaller.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given XMLStreamWriter.
 *
 * @param model A policy source model.
 * @param writer An XML stream writer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final XMLStreamWriter writer) throws PolicyException {
    final StaxSerializer serializer = new StaxSerializer(writer);
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, serializer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
    serializer.flush();
}
 
Example #9
Source File: XmlPolicyModelMarshaller.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given StaxSerializer.
 *
 * @param model A policy source model.
 * @param writer A Stax serializer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final StaxSerializer writer) throws PolicyException {
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, writer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
}
 
Example #10
Source File: XmlPolicyModelMarshaller.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given StaxSerializer.
 *
 * @param model A policy source model.
 * @param writer A Stax serializer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final StaxSerializer writer) throws PolicyException {
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, writer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
}
 
Example #11
Source File: XmlPolicyModelMarshaller.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given XMLStreamWriter.
 *
 * @param model A policy source model.
 * @param writer An XML stream writer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final XMLStreamWriter writer) throws PolicyException {
    final StaxSerializer serializer = new StaxSerializer(writer);
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, serializer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
    serializer.flush();
}
 
Example #12
Source File: XmlPolicyModelMarshaller.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given StaxSerializer.
 *
 * @param model A policy source model.
 * @param writer A Stax serializer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final StaxSerializer writer) throws PolicyException {
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, writer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
}
 
Example #13
Source File: XmlPolicyModelMarshaller.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given XMLStreamWriter.
 *
 * @param model A policy source model.
 * @param writer An XML stream writer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final XMLStreamWriter writer) throws PolicyException {
    final StaxSerializer serializer = new StaxSerializer(writer);
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, serializer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
    serializer.flush();
}
 
Example #14
Source File: XmlPolicyModelMarshaller.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given StaxSerializer.
 *
 * @param model A policy source model.
 * @param writer A Stax serializer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final StaxSerializer writer) throws PolicyException {
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, writer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
}
 
Example #15
Source File: XmlPolicyModelMarshaller.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given XMLStreamWriter.
 *
 * @param model A policy source model.
 * @param writer An XML stream writer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final XMLStreamWriter writer) throws PolicyException {
    final StaxSerializer serializer = new StaxSerializer(writer);
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, serializer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
    serializer.flush();
}
 
Example #16
Source File: XmlPolicyModelMarshaller.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given StaxSerializer.
 *
 * @param model A policy source model.
 * @param writer A Stax serializer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final StaxSerializer writer) throws PolicyException {
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, writer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
}
 
Example #17
Source File: XmlPolicyModelMarshaller.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Marshal a policy onto the given XMLStreamWriter.
 *
 * @param model A policy source model.
 * @param writer An XML stream writer.
 * @throws PolicyException If marshalling failed.
 */
private void marshal(final PolicySourceModel model, final XMLStreamWriter writer) throws PolicyException {
    final StaxSerializer serializer = new StaxSerializer(writer);
    final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, serializer);

    marshalDefaultPrefixes(model, policy);
    marshalPolicyAttributes(model, policy);
    marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
    policy.commit();
    serializer.flush();
}