public class ArtificerConflictException extends ArtificerUserException {
    
    private static final long serialVersionUID = 8618489938635309807L;

    public ArtificerConflictException() {
        super();
    }

    public ArtificerConflictException(String message) {
        super(message);
    }

    public ArtificerConflictException(String msg, String stackTrace) {
        super(msg, stackTrace);
    }

    public static ArtificerConflictException artifactConflict(String uuid) {
       return new ArtificerConflictException(Messages.i18n.format("ARTIFACT_ALREADY_EXISTS", uuid));
    }

    public static ArtificerConflictException derivedRelationshipCreation(String relationshipType) {
        return new ArtificerConflictException(Messages.i18n.format("DERIVED_RELATIONSHIP_CREATION", relationshipType));
    }

    public static ArtificerConflictException relationshipConstraint(String uuid) {
        return new ArtificerConflictException(Messages.i18n.format("RELATIONSHIP_CONSTRAINT", uuid));
    }

    public static ArtificerConflictException reservedName(String name) {
        return new ArtificerConflictException(Messages.i18n.format("RESERVED_WORD", name));
    }

    public static ArtificerConflictException customPropertyConstraint(String uuid) {
        return new ArtificerConflictException(Messages.i18n.format("CUSTOM_PROPERTY_CONSTRAINT", uuid));
    }

    public static ArtificerConflictException classifierConstraint(String uuid) {
        return new ArtificerConflictException(Messages.i18n.format("CLASSIFIER_CONSTRAINT", uuid));
    }

    public static ArtificerConflictException ontologyConflict(String ontologyUuid) {
        return new ArtificerConflictException(Messages.i18n.format("ONTOLOGY_ALREADY_EXISTS", ontologyUuid));
    }

    public static ArtificerConflictException storedQueryConflict() {
        return new ArtificerConflictException(Messages.i18n.format("STOREDQUERY_NAME_REQUIRED"));
    }

    public static ArtificerConflictException storedQueryConflict(String queryName) {
        return new ArtificerConflictException(Messages.i18n.format("STOREDQUERY_ALREADY_EXISTS", queryName));
    }

    public static ArtificerConflictException duplicateName(String name) {
        return new ArtificerConflictException(Messages.i18n.format("DUPLICATE_NAME", name));
    }
} @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "document",
    "xmlDocument",
    "extendedArtifactType",
    "extendedDocument",
    "organization",
    "serviceEndpoint",
    "serviceInstance",
    "serviceOperation",
    "actor",
    "choreography",
    "choreographyProcess",
    "collaboration",
    "collaborationProcess",
    "composition",
    "effect",
    "element",
    "event",
    "informationType",
    "orchestration",
    "orchestrationProcess",
    "policy",
    "policySubject",
    "process",
    "service",
    "serviceContract",
    "serviceComposition",
    "serviceInterface",
    "system",
    "task",
    "policyAttachment",
    "policyExpression",
    "policyDocument",
    "xsdDocument",
    "attributeDeclaration",
    "elementDeclaration",
    "complexTypeDeclaration",
    "simpleTypeDeclaration",
    "wsdlDocument",
    "wsdlService",
    "port",
    "wsdlExtension",
    "part",
    "message",
    "fault",
    "portType",
    "operation",
    "operationInput",
    "operationOutput",
    "binding",
    "bindingOperation",
    "bindingOperationInput",
    "bindingOperationOutput",
    "bindingOperationFault",
    "soapAddress",
    "soapBinding"
})
@XmlRootElement(name = "artifact")
public class Artifact
    implements Serializable
{

    private static final long serialVersionUID = 3836973340243877811L;
    @XmlElement(name = "Document")
    protected Document document;
    @XmlElement(name = "XmlDocument")
    protected XmlDocument xmlDocument;
    @XmlElement(name = "ExtendedArtifactType")
    protected ExtendedArtifactType extendedArtifactType;
    @XmlElement(name = "ExtendedDocument")
    protected ExtendedDocument extendedDocument;
    @XmlElement(name = "Organization")
    protected Organization organization;
    @XmlElement(name = "ServiceEndpoint")
    protected ServiceEndpoint serviceEndpoint;
    @XmlElement(name = "ServiceInstance")
    protected ServiceInstance serviceInstance;
    @XmlElement(name = "ServiceOperation")
    protected ServiceOperation serviceOperation;
    @XmlElement(name = "Actor")
    protected Actor actor;
    @XmlElement(name = "Choreography")
    protected Choreography choreography;
    @XmlElement(name = "ChoreographyProcess")
    protected ChoreographyProcess choreographyProcess;
    @XmlElement(name = "Collaboration")
    protected Collaboration collaboration;
    @XmlElement(name = "CollaborationProcess")
    protected CollaborationProcess collaborationProcess;
    @XmlElement(name = "Composition")
    protected Composition composition;
    @XmlElement(name = "Effect")
    protected Effect effect;
    @XmlElement(name = "Element")
    protected Element element;
    @XmlElement(name = "Event")
    protected Event event;
    @XmlElement(name = "InformationType")
    protected InformationType informationType;
    @XmlElement(name = "Orchestration")
    protected Orchestration orchestration;
    @XmlElement(name = "OrchestrationProcess")
    protected OrchestrationProcess orchestrationProcess;
    @XmlElement(name = "Policy")
    protected Policy policy;
    @XmlElement(name = "PolicySubject")
    protected PolicySubject policySubject;
    @XmlElement(name = "Process")
    protected Process process;
    @XmlElement(name = "Service")
    protected Service service;
    @XmlElement(name = "ServiceContract")
    protected ServiceContract serviceContract;
    @XmlElement(name = "ServiceComposition")
    protected ServiceComposition serviceComposition;
    @XmlElement(name = "ServiceInterface")
    protected ServiceInterface serviceInterface;
    @XmlElement(name = "System")
    protected System system;
    @XmlElement(name = "Task")
    protected Task task;
    @XmlElement(name = "PolicyAttachment")
    protected PolicyAttachment policyAttachment;
    @XmlElement(name = "PolicyExpression")
    protected PolicyExpression policyExpression;
    @XmlElement(name = "PolicyDocument")
    protected PolicyDocument policyDocument;
    @XmlElement(name = "XsdDocument")
    protected XsdDocument xsdDocument;
    @XmlElement(name = "AttributeDeclaration")
    protected AttributeDeclaration attributeDeclaration;
    @XmlElement(name = "ElementDeclaration")
    protected ElementDeclaration elementDeclaration;
    @XmlElement(name = "ComplexTypeDeclaration")
    protected ComplexTypeDeclaration complexTypeDeclaration;
    @XmlElement(name = "SimpleTypeDeclaration")
    protected SimpleTypeDeclaration simpleTypeDeclaration;
    @XmlElement(name = "WsdlDocument")
    protected WsdlDocument wsdlDocument;
    @XmlElement(name = "WsdlService")
    protected WsdlService wsdlService;
    @XmlElement(name = "Port")
    protected Port port;
    @XmlElement(name = "WsdlExtension")
    protected WsdlExtension wsdlExtension;
    @XmlElement(name = "Part")
    protected Part part;
    @XmlElement(name = "Message")
    protected Message message;
    @XmlElement(name = "Fault")
    protected Fault fault;
    @XmlElement(name = "PortType")
    protected PortType portType;
    @XmlElement(name = "Operation")
    protected Operation operation;
    @XmlElement(name = "OperationInput")
    protected OperationInput operationInput;
    @XmlElement(name = "OperationOutput")
    protected OperationOutput operationOutput;
    @XmlElement(name = "Binding")
    protected Binding binding;
    @XmlElement(name = "BindingOperation")
    protected BindingOperation bindingOperation;
    @XmlElement(name = "BindingOperationInput")
    protected BindingOperationInput bindingOperationInput;
    @XmlElement(name = "BindingOperationOutput")
    protected BindingOperationOutput bindingOperationOutput;
    @XmlElement(name = "BindingOperationFault")
    protected BindingOperationFault bindingOperationFault;
    @XmlElement(name = "SoapAddress")
    protected SoapAddress soapAddress;
    @XmlElement(name = "SoapBinding")
    protected SoapBinding soapBinding;

    /**
     * Gets the value of the document property.
     * 
     * @return
     *     possible object is
     *     {@link Document }
     *     
     */
    public Document getDocument() {
        return document;
    }

    /**
     * Sets the value of the document property.
     * 
     * @param value
     *     allowed object is
     *     {@link Document }
     *     
     */
    public void setDocument(Document value) {
        this.document = value;
    }

    /**
     * Gets the value of the xmlDocument property.
     * 
     * @return
     *     possible object is
     *     {@link XmlDocument }
     *     
     */
    public XmlDocument getXmlDocument() {
        return xmlDocument;
    }

    /**
     * Sets the value of the xmlDocument property.
     * 
     * @param value
     *     allowed object is
     *     {@link XmlDocument }
     *     
     */
    public void setXmlDocument(XmlDocument value) {
        this.xmlDocument = value;
    }

    /**
     * Gets the value of the extendedArtifactType property.
     * 
     * @return
     *     possible object is
     *     {@link ExtendedArtifactType }
     *     
     */
    public ExtendedArtifactType getExtendedArtifactType() {
        return extendedArtifactType;
    }

    /**
     * Sets the value of the extendedArtifactType property.
     * 
     * @param value
     *     allowed object is
     *     {@link ExtendedArtifactType }
     *     
     */
    public void setExtendedArtifactType(ExtendedArtifactType value) {
        this.extendedArtifactType = value;
    }

    /**
     * Gets the value of the extendedDocument property.
     * 
     * @return
     *     possible object is
     *     {@link ExtendedDocument }
     *     
     */
    public ExtendedDocument getExtendedDocument() {
        return extendedDocument;
    }

    /**
     * Sets the value of the extendedDocument property.
     * 
     * @param value
     *     allowed object is
     *     {@link ExtendedDocument }
     *     
     */
    public void setExtendedDocument(ExtendedDocument value) {
        this.extendedDocument = value;
    }

    /**
     * Gets the value of the organization property.
     * 
     * @return
     *     possible object is
     *     {@link Organization }
     *     
     */
    public Organization getOrganization() {
        return organization;
    }

    /**
     * Sets the value of the organization property.
     * 
     * @param value
     *     allowed object is
     *     {@link Organization }
     *     
     */
    public void setOrganization(Organization value) {
        this.organization = value;
    }

    /**
     * Gets the value of the serviceEndpoint property.
     * 
     * @return
     *     possible object is
     *     {@link ServiceEndpoint }
     *     
     */
    public ServiceEndpoint getServiceEndpoint() {
        return serviceEndpoint;
    }

    /**
     * Sets the value of the serviceEndpoint property.
     * 
     * @param value
     *     allowed object is
     *     {@link ServiceEndpoint }
     *     
     */
    public void setServiceEndpoint(ServiceEndpoint value) {
        this.serviceEndpoint = value;
    }

    /**
     * Gets the value of the serviceInstance property.
     * 
     * @return
     *     possible object is
     *     {@link ServiceInstance }
     *     
     */
    public ServiceInstance getServiceInstance() {
        return serviceInstance;
    }

    /**
     * Sets the value of the serviceInstance property.
     * 
     * @param value
     *     allowed object is
     *     {@link ServiceInstance }
     *     
     */
    public void setServiceInstance(ServiceInstance value) {
        this.serviceInstance = value;
    }

    /**
     * Gets the value of the serviceOperation property.
     * 
     * @return
     *     possible object is
     *     {@link ServiceOperation }
     *     
     */
    public ServiceOperation getServiceOperation() {
        return serviceOperation;
    }

    /**
     * Sets the value of the serviceOperation property.
     * 
     * @param value
     *     allowed object is
     *     {@link ServiceOperation }
     *     
     */
    public void setServiceOperation(ServiceOperation value) {
        this.serviceOperation = value;
    }

    /**
     * Gets the value of the actor property.
     * 
     * @return
     *     possible object is
     *     {@link Actor }
     *     
     */
    public Actor getActor() {
        return actor;
    }

    /**
     * Sets the value of the actor property.
     * 
     * @param value
     *     allowed object is
     *     {@link Actor }
     *     
     */
    public void setActor(Actor value) {
        this.actor = value;
    }

    /**
     * Gets the value of the choreography property.
     * 
     * @return
     *     possible object is
     *     {@link Choreography }
     *     
     */
    public Choreography getChoreography() {
        return choreography;
    }

    /**
     * Sets the value of the choreography property.
     * 
     * @param value
     *     allowed object is
     *     {@link Choreography }
     *     
     */
    public void setChoreography(Choreography value) {
        this.choreography = value;
    }

    /**
     * Gets the value of the choreographyProcess property.
     * 
     * @return
     *     possible object is
     *     {@link ChoreographyProcess }
     *     
     */
    public ChoreographyProcess getChoreographyProcess() {
        return choreographyProcess;
    }

    /**
     * Sets the value of the choreographyProcess property.
     * 
     * @param value
     *     allowed object is
     *     {@link ChoreographyProcess }
     *     
     */
    public void setChoreographyProcess(ChoreographyProcess value) {
        this.choreographyProcess = value;
    }

    /**
     * Gets the value of the collaboration property.
     * 
     * @return
     *     possible object is
     *     {@link Collaboration }
     *     
     */
    public Collaboration getCollaboration() {
        return collaboration;
    }

    /**
     * Sets the value of the collaboration property.
     * 
     * @param value
     *     allowed object is
     *     {@link Collaboration }
     *     
     */
    public void setCollaboration(Collaboration value) {
        this.collaboration = value;
    }

    /**
     * Gets the value of the collaborationProcess property.
     * 
     * @return
     *     possible object is
     *     {@link CollaborationProcess }
     *     
     */
    public CollaborationProcess getCollaborationProcess() {
        return collaborationProcess;
    }

    /**
     * Sets the value of the collaborationProcess property.
     * 
     * @param value
     *     allowed object is
     *     {@link CollaborationProcess }
     *     
     */
    public void setCollaborationProcess(CollaborationProcess value) {
        this.collaborationProcess = value;
    }

    /**
     * Gets the value of the composition property.
     * 
     * @return
     *     possible object is
     *     {@link Composition }
     *     
     */
    public Composition getComposition() {
        return composition;
    }

    /**
     * Sets the value of the composition property.
     * 
     * @param value
     *     allowed object is
     *     {@link Composition }
     *     
     */
    public void setComposition(Composition value) {
        this.composition = value;
    }

    /**
     * Gets the value of the effect property.
     * 
     * @return
     *     possible object is
     *     {@link Effect }
     *     
     */
    public Effect getEffect() {
        return effect;
    }

    /**
     * Sets the value of the effect property.
     * 
     * @param value
     *     allowed object is
     *     {@link Effect }
     *     
     */
    public void setEffect(Effect value) {
        this.effect = value;
    }

    /**
     * Gets the value of the element property.
     * 
     * @return
     *     possible object is
     *     {@link Element }
     *     
     */
    public Element getElement() {
        return element;
    }

    /**
     * Sets the value of the element property.
     * 
     * @param value
     *     allowed object is
     *     {@link Element }
     *     
     */
    public void setElement(Element value) {
        this.element = value;
    }

    /**
     * Gets the value of the event property.
     * 
     * @return
     *     possible object is
     *     {@link Event }
     *     
     */
    public Event getEvent() {
        return event;
    }

    /**
     * Sets the value of the event property.
     * 
     * @param value
     *     allowed object is
     *     {@link Event }
     *     
     */
    public void setEvent(Event value) {
        this.event = value;
    }

    /**
     * Gets the value of the informationType property.
     * 
     * @return
     *     possible object is
     *     {@link InformationType }
     *     
     */
    public InformationType getInformationType() {
        return informationType;
    }

    /**
     * Sets the value of the informationType property.
     * 
     * @param value
     *     allowed object is
     *     {@link InformationType }
     *     
     */
    public void setInformationType(InformationType value) {
        this.informationType = value;
    }

    /**
     * Gets the value of the orchestration property.
     * 
     * @return
     *     possible object is
     *     {@link Orchestration }
     *     
     */
    public Orchestration getOrchestration() {
        return orchestration;
    }

    /**
     * Sets the value of the orchestration property.
     * 
     * @param value
     *     allowed object is
     *     {@link Orchestration }
     *     
     */
    public void setOrchestration(Orchestration value) {
        this.orchestration = value;
    }

    /**
     * Gets the value of the orchestrationProcess property.
     * 
     * @return
     *     possible object is
     *     {@link OrchestrationProcess }
     *     
     */
    public OrchestrationProcess getOrchestrationProcess() {
        return orchestrationProcess;
    }

    /**
     * Sets the value of the orchestrationProcess property.
     * 
     * @param value
     *     allowed object is
     *     {@link OrchestrationProcess }
     *     
     */
    public void setOrchestrationProcess(OrchestrationProcess value) {
        this.orchestrationProcess = value;
    }

    /**
     * Gets the value of the policy property.
     * 
     * @return
     *     possible object is
     *     {@link Policy }
     *     
     */
    public Policy getPolicy() {
        return policy;
    }

    /**
     * Sets the value of the policy property.
     * 
     * @param value
     *     allowed object is
     *     {@link Policy }
     *     
     */
    public void setPolicy(Policy value) {
        this.policy = value;
    }

    /**
     * Gets the value of the policySubject property.
     * 
     * @return
     *     possible object is
     *     {@link PolicySubject }
     *     
     */
    public PolicySubject getPolicySubject() {
        return policySubject;
    }

    /**
     * Sets the value of the policySubject property.
     * 
     * @param value
     *     allowed object is
     *     {@link PolicySubject }
     *     
     */
    public void setPolicySubject(PolicySubject value) {
        this.policySubject = value;
    }

    /**
     * Gets the value of the process property.
     * 
     * @return
     *     possible object is
     *     {@link Process }
     *     
     */
    public Process getProcess() {
        return process;
    }

    /**
     * Sets the value of the process property.
     * 
     * @param value
     *     allowed object is
     *     {@link Process }
     *     
     */
    public void setProcess(Process value) {
        this.process = value;
    }

    /**
     * Gets the value of the service property.
     * 
     * @return
     *     possible object is
     *     {@link Service }
     *     
     */
    public Service getService() {
        return service;
    }

    /**
     * Sets the value of the service property.
     * 
     * @param value
     *     allowed object is
     *     {@link Service }
     *     
     */
    public void setService(Service value) {
        this.service = value;
    }

    /**
     * Gets the value of the serviceContract property.
     * 
     * @return
     *     possible object is
     *     {@link ServiceContract }
     *     
     */
    public ServiceContract getServiceContract() {
        return serviceContract;
    }

    /**
     * Sets the value of the serviceContract property.
     * 
     * @param value
     *     allowed object is
     *     {@link ServiceContract }
     *     
     */
    public void setServiceContract(ServiceContract value) {
        this.serviceContract = value;
    }

    /**
     * Gets the value of the serviceComposition property.
     * 
     * @return
     *     possible object is
     *     {@link ServiceComposition }
     *     
     */
    public ServiceComposition getServiceComposition() {
        return serviceComposition;
    }

    /**
     * Sets the value of the serviceComposition property.
     * 
     * @param value
     *     allowed object is
     *     {@link ServiceComposition }
     *     
     */
    public void setServiceComposition(ServiceComposition value) {
        this.serviceComposition = value;
    }

    /**
     * Gets the value of the serviceInterface property.
     * 
     * @return
     *     possible object is
     *     {@link ServiceInterface }
     *     
     */
    public ServiceInterface getServiceInterface() {
        return serviceInterface;
    }

    /**
     * Sets the value of the serviceInterface property.
     * 
     * @param value
     *     allowed object is
     *     {@link ServiceInterface }
     *     
     */
    public void setServiceInterface(ServiceInterface value) {
        this.serviceInterface = value;
    }

    /**
     * Gets the value of the system property.
     * 
     * @return
     *     possible object is
     *     {@link System }
     *     
     */
    public System getSystem() {
        return system;
    }

    /**
     * Sets the value of the system property.
     * 
     * @param value
     *     allowed object is
     *     {@link System }
     *     
     */
    public void setSystem(System value) {
        this.system = value;
    }

    /**
     * Gets the value of the task property.
     * 
     * @return
     *     possible object is
     *     {@link Task }
     *     
     */
    public Task getTask() {
        return task;
    }

    /**
     * Sets the value of the task property.
     * 
     * @param value
     *     allowed object is
     *     {@link Task }
     *     
     */
    public void setTask(Task value) {
        this.task = value;
    }

    /**
     * Gets the value of the policyAttachment property.
     * 
     * @return
     *     possible object is
     *     {@link PolicyAttachment }
     *     
     */
    public PolicyAttachment getPolicyAttachment() {
        return policyAttachment;
    }

    /**
     * Sets the value of the policyAttachment property.
     * 
     * @param value
     *     allowed object is
     *     {@link PolicyAttachment }
     *     
     */
    public void setPolicyAttachment(PolicyAttachment value) {
        this.policyAttachment = value;
    }

    /**
     * Gets the value of the policyExpression property.
     * 
     * @return
     *     possible object is
     *     {@link PolicyExpression }
     *     
     */
    public PolicyExpression getPolicyExpression() {
        return policyExpression;
    }

    /**
     * Sets the value of the policyExpression property.
     * 
     * @param value
     *     allowed object is
     *     {@link PolicyExpression }
     *     
     */
    public void setPolicyExpression(PolicyExpression value) {
        this.policyExpression = value;
    }

    /**
     * Gets the value of the policyDocument property.
     * 
     * @return
     *     possible object is
     *     {@link PolicyDocument }
     *     
     */
    public PolicyDocument getPolicyDocument() {
        return policyDocument;
    }

    /**
     * Sets the value of the policyDocument property.
     * 
     * @param value
     *     allowed object is
     *     {@link PolicyDocument }
     *     
     */
    public void setPolicyDocument(PolicyDocument value) {
        this.policyDocument = value;
    }

    /**
     * Gets the value of the xsdDocument property.
     * 
     * @return
     *     possible object is
     *     {@link XsdDocument }
     *     
     */
    public XsdDocument getXsdDocument() {
        return xsdDocument;
    }

    /**
     * Sets the value of the xsdDocument property.
     * 
     * @param value
     *     allowed object is
     *     {@link XsdDocument }
     *     
     */
    public void setXsdDocument(XsdDocument value) {
        this.xsdDocument = value;
    }

    /**
     * Gets the value of the attributeDeclaration property.
     * 
     * @return
     *     possible object is
     *     {@link AttributeDeclaration }
     *     
     */
    public AttributeDeclaration getAttributeDeclaration() {
        return attributeDeclaration;
    }

    /**
     * Sets the value of the attributeDeclaration property.
     * 
     * @param value
     *     allowed object is
     *     {@link AttributeDeclaration }
     *     
     */
    public void setAttributeDeclaration(AttributeDeclaration value) {
        this.attributeDeclaration = value;
    }

    /**
     * Gets the value of the elementDeclaration property.
     * 
     * @return
     *     possible object is
     *     {@link ElementDeclaration }
     *     
     */
    public ElementDeclaration getElementDeclaration() {
        return elementDeclaration;
    }

    /**
     * Sets the value of the elementDeclaration property.
     * 
     * @param value
     *     allowed object is
     *     {@link ElementDeclaration }
     *     
     */
    public void setElementDeclaration(ElementDeclaration value) {
        this.elementDeclaration = value;
    }

    /**
     * Gets the value of the complexTypeDeclaration property.
     * 
     * @return
     *     possible object is
     *     {@link ComplexTypeDeclaration }
     *     
     */
    public ComplexTypeDeclaration getComplexTypeDeclaration() {
        return complexTypeDeclaration;
    }

    /**
     * Sets the value of the complexTypeDeclaration property.
     * 
     * @param value
     *     allowed object is
     *     {@link ComplexTypeDeclaration }
     *     
     */
    public void setComplexTypeDeclaration(ComplexTypeDeclaration value) {
        this.complexTypeDeclaration = value;
    }

    /**
     * Gets the value of the simpleTypeDeclaration property.
     * 
     * @return
     *     possible object is
     *     {@link SimpleTypeDeclaration }
     *     
     */
    public SimpleTypeDeclaration getSimpleTypeDeclaration() {
        return simpleTypeDeclaration;
    }

    /**
     * Sets the value of the simpleTypeDeclaration property.
     * 
     * @param value
     *     allowed object is
     *     {@link SimpleTypeDeclaration }
     *     
     */
    public void setSimpleTypeDeclaration(SimpleTypeDeclaration value) {
        this.simpleTypeDeclaration = value;
    }

    /**
     * Gets the value of the wsdlDocument property.
     * 
     * @return
     *     possible object is
     *     {@link WsdlDocument }
     *     
     */
    public WsdlDocument getWsdlDocument() {
        return wsdlDocument;
    }

    /**
     * Sets the value of the wsdlDocument property.
     * 
     * @param value
     *     allowed object is
     *     {@link WsdlDocument }
     *     
     */
    public void setWsdlDocument(WsdlDocument value) {
        this.wsdlDocument = value;
    }

    /**
     * Gets the value of the wsdlService property.
     * 
     * @return
     *     possible object is
     *     {@link WsdlService }
     *     
     */
    public WsdlService getWsdlService() {
        return wsdlService;
    }

    /**
     * Sets the value of the wsdlService property.
     * 
     * @param value
     *     allowed object is
     *     {@link WsdlService }
     *     
     */
    public void setWsdlService(WsdlService value) {
        this.wsdlService = value;
    }

    /**
     * Gets the value of the port property.
     * 
     * @return
     *     possible object is
     *     {@link Port }
     *     
     */
    public Port getPort() {
        return port;
    }

    /**
     * Sets the value of the port property.
     * 
     * @param value
     *     allowed object is
     *     {@link Port }
     *     
     */
    public void setPort(Port value) {
        this.port = value;
    }

    /**
     * Gets the value of the wsdlExtension property.
     * 
     * @return
     *     possible object is
     *     {@link WsdlExtension }
     *     
     */
    public WsdlExtension getWsdlExtension() {
        return wsdlExtension;
    }

    /**
     * Sets the value of the wsdlExtension property.
     * 
     * @param value
     *     allowed object is
     *     {@link WsdlExtension }
     *     
     */
    public void setWsdlExtension(WsdlExtension value) {
        this.wsdlExtension = value;
    }

    /**
     * Gets the value of the part property.
     * 
     * @return
     *     possible object is
     *     {@link Part }
     *     
     */
    public Part getPart() {
        return part;
    }

    /**
     * Sets the value of the part property.
     * 
     * @param value
     *     allowed object is
     *     {@link Part }
     *     
     */
    public void setPart(Part value) {
        this.part = value;
    }

    /**
     * Gets the value of the message property.
     * 
     * @return
     *     possible object is
     *     {@link Message }
     *     
     */
    public Message getMessage() {
        return message;
    }

    /**
     * Sets the value of the message property.
     * 
     * @param value
     *     allowed object is
     *     {@link Message }
     *     
     */
    public void setMessage(Message value) {
        this.message = value;
    }

    /**
     * Gets the value of the fault property.
     * 
     * @return
     *     possible object is
     *     {@link Fault }
     *     
     */
    public Fault getFault() {
        return fault;
    }

    /**
     * Sets the value of the fault property.
     * 
     * @param value
     *     allowed object is
     *     {@link Fault }
     *     
     */
    public void setFault(Fault value) {
        this.fault = value;
    }

    /**
     * Gets the value of the portType property.
     * 
     * @return
     *     possible object is
     *     {@link PortType }
     *     
     */
    public PortType getPortType() {
        return portType;
    }

    /**
     * Sets the value of the portType property.
     * 
     * @param value
     *     allowed object is
     *     {@link PortType }
     *     
     */
    public void setPortType(PortType value) {
        this.portType = value;
    }

    /**
     * Gets the value of the operation property.
     * 
     * @return
     *     possible object is
     *     {@link Operation }
     *     
     */
    public Operation getOperation() {
        return operation;
    }

    /**
     * Sets the value of the operation property.
     * 
     * @param value
     *     allowed object is
     *     {@link Operation }
     *     
     */
    public void setOperation(Operation value) {
        this.operation = value;
    }

    /**
     * Gets the value of the operationInput property.
     * 
     * @return
     *     possible object is
     *     {@link OperationInput }
     *     
     */
    public OperationInput getOperationInput() {
        return operationInput;
    }

    /**
     * Sets the value of the operationInput property.
     * 
     * @param value
     *     allowed object is
     *     {@link OperationInput }
     *     
     */
    public void setOperationInput(OperationInput value) {
        this.operationInput = value;
    }

    /**
     * Gets the value of the operationOutput property.
     * 
     * @return
     *     possible object is
     *     {@link OperationOutput }
     *     
     */
    public OperationOutput getOperationOutput() {
        return operationOutput;
    }

    /**
     * Sets the value of the operationOutput property.
     * 
     * @param value
     *     allowed object is
     *     {@link OperationOutput }
     *     
     */
    public void setOperationOutput(OperationOutput value) {
        this.operationOutput = value;
    }

    /**
     * Gets the value of the binding property.
     * 
     * @return
     *     possible object is
     *     {@link Binding }
     *     
     */
    public Binding getBinding() {
        return binding;
    }

    /**
     * Sets the value of the binding property.
     * 
     * @param value
     *     allowed object is
     *     {@link Binding }
     *     
     */
    public void setBinding(Binding value) {
        this.binding = value;
    }

    /**
     * Gets the value of the bindingOperation property.
     * 
     * @return
     *     possible object is
     *     {@link BindingOperation }
     *     
     */
    public BindingOperation getBindingOperation() {
        return bindingOperation;
    }

    /**
     * Sets the value of the bindingOperation property.
     * 
     * @param value
     *     allowed object is
     *     {@link BindingOperation }
     *     
     */
    public void setBindingOperation(BindingOperation value) {
        this.bindingOperation = value;
    }

    /**
     * Gets the value of the bindingOperationInput property.
     * 
     * @return
     *     possible object is
     *     {@link BindingOperationInput }
     *     
     */
    public BindingOperationInput getBindingOperationInput() {
        return bindingOperationInput;
    }

    /**
     * Sets the value of the bindingOperationInput property.
     * 
     * @param value
     *     allowed object is
     *     {@link BindingOperationInput }
     *     
     */
    public void setBindingOperationInput(BindingOperationInput value) {
        this.bindingOperationInput = value;
    }

    /**
     * Gets the value of the bindingOperationOutput property.
     * 
     * @return
     *     possible object is
     *     {@link BindingOperationOutput }
     *     
     */
    public BindingOperationOutput getBindingOperationOutput() {
        return bindingOperationOutput;
    }

    /**
     * Sets the value of the bindingOperationOutput property.
     * 
     * @param value
     *     allowed object is
     *     {@link BindingOperationOutput }
     *     
     */
    public void setBindingOperationOutput(BindingOperationOutput value) {
        this.bindingOperationOutput = value;
    }

    /**
     * Gets the value of the bindingOperationFault property.
     * 
     * @return
     *     possible object is
     *     {@link BindingOperationFault }
     *     
     */
    public BindingOperationFault getBindingOperationFault() {
        return bindingOperationFault;
    }

    /**
     * Sets the value of the bindingOperationFault property.
     * 
     * @param value
     *     allowed object is
     *     {@link BindingOperationFault }
     *     
     */
    public void setBindingOperationFault(BindingOperationFault value) {
        this.bindingOperationFault = value;
    }

    /**
     * Gets the value of the soapAddress property.
     * 
     * @return
     *     possible object is
     *     {@link SoapAddress }
     *     
     */
    public SoapAddress getSoapAddress() {
        return soapAddress;
    }

    /**
     * Sets the value of the soapAddress property.
     * 
     * @param value
     *     allowed object is
     *     {@link SoapAddress }
     *     
     */
    public void setSoapAddress(SoapAddress value) {
        this.soapAddress = value;
    }

    /**
     * Gets the value of the soapBinding property.
     * 
     * @return
     *     possible object is
     *     {@link SoapBinding }
     *     
     */
    public SoapBinding getSoapBinding() {
        return soapBinding;
    }

    /**
     * Sets the value of the soapBinding property.
     * 
     * @param value
     *     allowed object is
     *     {@link SoapBinding }
     *     
     */
    public void setSoapBinding(SoapBinding value) {
        this.soapBinding = value;
    }

} @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AttributeDeclaration")
public class AttributeDeclaration
    extends DerivedArtifactType
    implements Serializable
{

    private static final long serialVersionUID = -3713596295133969563L;
    @XmlAttribute(name = "NCName")
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
    @XmlSchemaType(name = "NCName")
    protected String ncName;
    @XmlAttribute(name = "namespace")
    @XmlSchemaType(name = "anyURI")
    protected String namespace;

    /**
     * Gets the value of the ncName property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getNCName() {
        return ncName;
    }

    /**
     * Sets the value of the ncName property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setNCName(String value) {
        this.ncName = value;
    }

    /**
     * Gets the value of the namespace property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getNamespace() {
        return namespace;
    }

    /**
     * Sets the value of the namespace property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setNamespace(String value) {
        this.namespace = value;
    }

} @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ComplexTypeDeclaration")
public class ComplexTypeDeclaration
    extends XsdType
    implements Serializable
{

    private static final long serialVersionUID = -9166270690887980103L;
    @XmlAttribute(name = "NCName")
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
    @XmlSchemaType(name = "NCName")
    protected String ncName;
    @XmlAttribute(name = "namespace")
    @XmlSchemaType(name = "anyURI")
    protected String namespace;

    /**
     * Gets the value of the ncName property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getNCName() {
        return ncName;
    }

    /**
     * Sets the value of the ncName property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setNCName(String value) {
        this.ncName = value;
    }

    /**
     * Gets the value of the namespace property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getNamespace() {
        return namespace;
    }

    /**
     * Sets the value of the namespace property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setNamespace(String value) {
        this.namespace = value;
    }

} @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ExtendedArtifactType")
public class ExtendedArtifactType
    extends BaseArtifactType
    implements Serializable
{

    private static final long serialVersionUID = -206412977040808162L;
    @XmlAttribute(name = "extendedType")
    protected String extendedType;

    /**
     * Gets the value of the extendedType property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getExtendedType() {
        return extendedType;
    }

    /**
     * Sets the value of the extendedType property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setExtendedType(String value) {
        this.extendedType = value;
    }

} @XmlType(name = "faultEnum")
@XmlEnum(DerivedArtifactEnum.class)
public enum FaultEnum {

    @XmlEnumValue("Fault")
    FAULT(DerivedArtifactEnum.FAULT);
    private final DerivedArtifactEnum value;

    FaultEnum(DerivedArtifactEnum v) {
        value = v;
    }

    public DerivedArtifactEnum value() {
        return value;
    }

    public static FaultEnum fromValue(DerivedArtifactEnum v) {
        for (FaultEnum c: FaultEnum.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v.toString());
    }

} @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Orchestration")
public class Orchestration
    extends Composition
    implements Serializable
{

    private static final long serialVersionUID = -6564603269555617226L;

} @XmlType(name = "orchestrationProcessEnum")
@XmlEnum(BaseArtifactEnum.class)
public enum OrchestrationProcessEnum {

    @XmlEnumValue("OrchestrationProcess")
    ORCHESTRATION_PROCESS(BaseArtifactEnum.ORCHESTRATION_PROCESS);
    private final BaseArtifactEnum value;

    OrchestrationProcessEnum(BaseArtifactEnum v) {
        value = v;
    }

    public BaseArtifactEnum value() {
        return value;
    }

    public static OrchestrationProcessEnum fromValue(BaseArtifactEnum v) {
        for (OrchestrationProcessEnum c: OrchestrationProcessEnum.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v.toString());
    }

} @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "policyExpressionTarget")
public class PolicyExpressionTarget
    extends Target
    implements Serializable
{

    private static final long serialVersionUID = -7702581652333441302L;
    @XmlAttribute(name = "artifactType", required = true)
    protected PolicyExpressionEnum artifactType;

    /**
     * Gets the value of the artifactType property.
     * 
     * @return
     *     possible object is
     *     {@link PolicyExpressionEnum }
     *     
     */
    public PolicyExpressionEnum getArtifactType() {
        return artifactType;
    }

    /**
     * Sets the value of the artifactType property.
     * 
     * @param value
     *     allowed object is
     *     {@link PolicyExpressionEnum }
     *     
     */
    public void setArtifactType(PolicyExpressionEnum value) {
        this.artifactType = value;
    }

} @XmlType(name = "portEnum")
@XmlEnum(DerivedArtifactEnum.class)
public enum PortEnum {

    @XmlEnumValue("Port")
    PORT(DerivedArtifactEnum.PORT);
    private final DerivedArtifactEnum value;

    PortEnum(DerivedArtifactEnum v) {
        value = v;
    }

    public DerivedArtifactEnum value() {
        return value;
    }

    public static PortEnum fromValue(DerivedArtifactEnum v) {
        for (PortEnum c: PortEnum.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v.toString());
    }

} @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "relationshipType",
    "relationshipTarget"
})
@XmlRootElement(name = "relationship")
public class Relationship
    implements Serializable
{

    private static final long serialVersionUID = 6376521055748465351L;
    @XmlElement(required = true)
    protected String relationshipType;
    protected List<Target> relationshipTarget;
    @XmlAnyAttribute
    private Map<QName, String> otherAttributes = new HashMap<QName, String>();

    /**
     * Gets the value of the relationshipType property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getRelationshipType() {
        return relationshipType;
    }

    /**
     * Sets the value of the relationshipType property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setRelationshipType(String value) {
        this.relationshipType = value;
    }

    /**
     * Gets the value of the relationshipTarget property.
     * 
     * <p>
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the relationshipTarget property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getRelationshipTarget().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link Target }
     * 
     * 
     */
    public List<Target> getRelationshipTarget() {
        if (relationshipTarget == null) {
            relationshipTarget = new ArrayList<Target>();
        }
        return this.relationshipTarget;
    }

    /**
     * Gets a map that contains attributes that aren't bound to any typed property on this class.
     * 
     * <p>
     * the map is keyed by the name of the attribute and 
     * the value is the string value of the attribute.
     * 
     * the map returned by this method is live, and you can add new attribute
     * by updating the map directly. Because of this design, there's no setter.
     * 
     * 
     * @return
     *     always non-null
     */
    public Map<QName, String> getOtherAttributes() {
        return otherAttributes;
    }

} @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "queryName",
    "queryString",
    "propertyName"
})
@XmlRootElement(name = "storedQueryData")
public class StoredQueryData
    implements Serializable
{

    private static final long serialVersionUID = -2037272408847834030L;
    @XmlElement(required = true)
    protected String queryName;
    @XmlElement(required = true)
    protected String queryString;
    protected List<String> propertyName;

    /**
     * Gets the value of the queryName property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getQueryName() {
        return queryName;
    }

    /**
     * Sets the value of the queryName property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setQueryName(String value) {
        this.queryName = value;
    }

    /**
     * Gets the value of the queryString property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getQueryString() {
        return queryString;
    }

    /**
     * Sets the value of the queryString property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setQueryString(String value) {
        this.queryString = value;
    }

    /**
     * Gets the value of the propertyName property.
     * 
     * <p>
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the propertyName property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getPropertyName().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link String }
     * 
     * 
     */
    public List<String> getPropertyName() {
        if (propertyName == null) {
            propertyName = new ArrayList<String>();
        }
        return this.propertyName;
    }

} @XmlType(name = "taskEnum")
@XmlEnum(BaseArtifactEnum.class)
public enum TaskEnum {

    @XmlEnumValue("Task")
    TASK(BaseArtifactEnum.TASK);
    private final BaseArtifactEnum value;

    TaskEnum(BaseArtifactEnum v) {
        value = v;
    }

    public BaseArtifactEnum value() {
        return value;
    }

    public static TaskEnum fromValue(BaseArtifactEnum v) {
        for (TaskEnum c: TaskEnum.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v.toString());
    }

} @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WsdlService", propOrder = {
    "port"
})
public class WsdlService
    extends NamedWsdlDerivedArtifactType
    implements Serializable
{

    private static final long serialVersionUID = -2527167688145345320L;
    @XmlElement(required = true)
    protected List<PortTarget> port;

    /**
     * Gets the value of the port property.
     * 
     * <p>
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the port property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getPort().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link PortTarget }
     * 
     * 
     */
    public List<PortTarget> getPort() {
        if (port == null) {
            port = new ArrayList<PortTarget>();
        }
        return this.port;
    }

} @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "xsdTypeTarget")
public class XsdTypeTarget
    extends Target
    implements Serializable
{

    private static final long serialVersionUID = 3148458088753358749L;
    @XmlAttribute(name = "artifactType", required = true)
    protected XsdTypeEnum artifactType;

    /**
     * Gets the value of the artifactType property.
     * 
     * @return
     *     possible object is
     *     {@link XsdTypeEnum }
     *     
     */
    public XsdTypeEnum getArtifactType() {
        return artifactType;
    }

    /**
     * Sets the value of the artifactType property.
     * 
     * @param value
     *     allowed object is
     *     {@link XsdTypeEnum }
     *     
     */
    public void setArtifactType(XsdTypeEnum value) {
        this.artifactType = value;
    }

}
import org.artificer.common.error.ArtificerConflictException;
import org.artificer.common.error.ArtificerWrongModelException;
import org.artificer.common.visitors.HierarchicalArtifactVisitor;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Actor;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ActorEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ActorTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Artifact;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.AttributeDeclaration;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Binding;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperation;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationFault;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationFaultEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationFaultTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationInput;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationInputEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationInputTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationOutput;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationOutputEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationOutputTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Choreography;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ChoreographyProcess;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ClassificationData;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Collaboration;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.CollaborationProcess;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ComplexTypeDeclaration;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Composition;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.DerivedArtifactEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.DerivedArtifactTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.DerivedArtifactType;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Document;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.DocumentArtifactEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.DocumentArtifactTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.DocumentArtifactType;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Effect;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.EffectEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.EffectTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Element;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ElementDeclaration;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ElementDeclarationEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ElementDeclarationTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ElementEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ElementTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Error;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ErrorResponse;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Event;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.EventEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.EventTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ExtendedArtifactType;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ExtendedDocument;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ExtensionType;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Fault;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.FaultEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.FaultTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.InformationType;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.InformationTypeEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.InformationTypeTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Message;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.MessageEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.MessageTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.NamedWsdlDerivedArtifactType;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ObjectFactory;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Operation;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.OperationEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.OperationInput;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.OperationInputEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.OperationInputTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.OperationOutput;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.OperationOutputEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.OperationOutputTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.OperationTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Orchestration;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.OrchestrationEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.OrchestrationProcess;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.OrchestrationProcessEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.OrchestrationProcessTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.OrchestrationTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Organization;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Part;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PartEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PartTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Policy;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PolicyAttachment;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PolicyDocument;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PolicyEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PolicyExpression;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PolicyExpressionEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PolicyExpressionTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PolicySubject;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PolicySubjectEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PolicySubjectTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PolicyTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Port;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PortEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PortTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PortType;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PortTypeEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PortTypeTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Process;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Property;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.PropertyData;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Relationship;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.RelationshipData;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.RelationshipTypeData;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Service;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceComposition;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceContract;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceContractEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceContractTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceEndpoint;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceImplementationModelEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceImplementationModelTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceImplementationModelType;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceInstance;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceInstanceEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceInstanceTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceInterface;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceInterfaceEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceInterfaceTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceOperation;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceOperationEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceOperationTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ServiceTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.SimpleTypeDeclaration;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.SoaModelType;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.SoapAddress;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.SoapBinding;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.StoredQuery;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.StoredQueryData;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.System;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Target;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Task;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.TaskEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.TaskTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.WsdlDerivedArtifactType;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.WsdlDocument;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.WsdlDocumentEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.WsdlDocumentTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.WsdlExtension;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.WsdlExtensionEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.WsdlExtensionTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.WsdlService;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.XmlDocument;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.XsdDocument;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.XsdDocumentEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.XsdDocumentTarget;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.XsdType;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.XsdTypeEnum;
import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.XsdTypeTarget;
import org.reflections.ReflectionUtils;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/*
 * Copyright 2014 JBoss Inc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.artificer.common;



/**
 * This visitor verifies numerous logical and spec-required constraints on artifact creations and updates.
 * 
 * @author Brett Meyer
 */
public class ArtifactVerifier extends HierarchicalArtifactVisitor {

    private static final Set<String> reservedNames = new HashSet<String>();
    private final ArtifactType artifactType;
    private BaseArtifactType oldArtifact = null;

    static {
        // TODO: This is not working reliably -- works well in EAP, but fails in WildFly (different module system,
        // etc.).  For now, just hard-code the classes.
//        Reflections reflections = new Reflections(new ConfigurationBuilder()
//                .setScanners(new SubTypesScanner(false))
//                .setUrls(ClasspathHelper.forClassLoader(ArtifactVerifier.class.getClassLoader()))
//                .filterInputsBy(new FilterBuilder().include(
//                        FilterBuilder.prefix("org.oasis_open.docs.s_ramp.ns.s_ramp_v1"))));
//        Set<Class<? extends Object>> classes = reflections.getSubTypesOf(Object.class);
        Class[] classes = new Class[] {
            Actor.class,
            ActorEnum.class,
            ActorTarget.class,
            Artifact.class,
            AttributeDeclaration.class,
            BaseArtifactEnum.class,
            BaseArtifactTarget.class,
            BaseArtifactType.class,
            Binding.class,
            BindingEnum.class,
            BindingOperation.class,
            BindingOperationEnum.class,
            BindingOperationFault.class,
            BindingOperationFaultEnum.class,
            BindingOperationFaultTarget.class,
            BindingOperationInput.class,
            BindingOperationInputEnum.class,
            BindingOperationInputTarget.class,
            BindingOperationOutput.class,
            BindingOperationOutputEnum.class,
            BindingOperationOutputTarget.class,
            BindingOperationTarget.class,
            BindingTarget.class,
            Choreography.class,
            ChoreographyProcess.class,
            ClassificationData.class,
            Collaboration.class,
            CollaborationProcess.class,
            ComplexTypeDeclaration.class,
            Composition.class,
            DerivedArtifactEnum.class,
            DerivedArtifactTarget.class,
            DerivedArtifactType.class,
            Document.class,
            DocumentArtifactEnum.class,
            DocumentArtifactTarget.class,
            DocumentArtifactType.class,
            Effect.class,
            EffectEnum.class,
            EffectTarget.class,
            Element.class,
            ElementDeclaration.class,
            ElementDeclarationEnum.class,
            ElementDeclarationTarget.class,
            ElementEnum.class,
            ElementTarget.class,
            Error.class,
            ErrorResponse.class,
            Event.class,
            EventEnum.class,
            EventTarget.class,
            ExtendedArtifactType.class,
            ExtendedDocument.class,
            ExtensionType.class,
            Fault.class,
            FaultEnum.class,