Skip to main content
summaryrefslogtreecommitdiffstats
blob: 6b247b9e3531e271e8d26396dfd3bd4600d36b2c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*******************************************************************************
 * Copyright (c) 2007, 2008 Oracle. All rights reserved.
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0, which accompanies this distribution
 * and is available at http://www.eclipse.org/legal/epl-v10.html.
 * 
 * Contributors:
 *     Oracle - initial API and implementation
 ******************************************************************************/
package org.eclipse.jpt.core.internal.context;

import java.util.List;
import org.eclipse.jpt.core.context.JpaContextNode;
import org.eclipse.jpt.core.context.XmlContextNode;
import org.eclipse.jpt.core.resource.common.JpaXmlResource;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;

public abstract class AbstractXmlContextNode
	extends AbstractJpaContextNode
	implements XmlContextNode
{

	// ********** constructor **********

	protected AbstractXmlContextNode(JpaContextNode parent) {
		super(parent);
	}
	
	
	/**
	 * It is the responsibility of any root XML context nodes to override this 
	 * behavior.
	 * 
	 * @see XmlContextNode#getEResource()
	 */
	public JpaXmlResource getEResource() {
		return ((XmlContextNode) getParent()).getEResource();
	}
	

	// ********** validation **********
	
	/**
	 * All subclass implementations {@link #validate(List<IMessage>)} 
	 * should be preceded by a "super" call to this method
	 */
	public void validate(List<IMessage> messages) {
		// do nothing by default
	}

}

Back to the top