com.sun.tools.ws.wsdl.document.mime.MIMEMultipartRelated Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaxws-tools Show documentation
Show all versions of jaxws-tools Show documentation
Open source Reference Implementation of JSR-224: Java API for XML Web Services
/*
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package com.sun.tools.ws.wsdl.document.mime;
import com.sun.tools.ws.wsdl.framework.Entity;
import com.sun.tools.ws.wsdl.framework.EntityAction;
import com.sun.tools.ws.wsdl.framework.ExtensionImpl;
import com.sun.tools.ws.wsdl.framework.ExtensionVisitor;
import org.xml.sax.Locator;
import javax.xml.namespace.QName;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* A MIME multipartRelated extension.
*
* @author WS Development Team
*/
public class MIMEMultipartRelated extends ExtensionImpl {
public MIMEMultipartRelated(Locator locator) {
super(locator);
_parts = new ArrayList();
}
public QName getElementName() {
return MIMEConstants.QNAME_MULTIPART_RELATED;
}
public void add(MIMEPart part) {
_parts.add(part);
}
public Iterable getParts() {
return _parts;
}
public void withAllSubEntitiesDo(EntityAction action) {
super.withAllSubEntitiesDo(action);
for (Iterator iter = _parts.iterator(); iter.hasNext();) {
action.perform((Entity) iter.next());
}
}
public void accept(ExtensionVisitor visitor) throws Exception {
visitor.preVisit(this);
visitor.postVisit(this);
}
public void validateThis() {
}
private List _parts;
}