Skip to main content
summaryrefslogtreecommitdiffstats
blob: 7c2cc3bacf7ac619a558ce7c143372418af9bae7 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/*******************************************************************************
 * Copyright (c) 2010 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.jaxb.core.internal.resource.java;

import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.NullAnnotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jaxb.core.resource.java.JAXB;
import org.eclipse.jpt.jaxb.core.resource.java.XmlNsAnnotation;
import org.eclipse.jpt.jaxb.core.resource.java.XmlNsForm;
import org.eclipse.jpt.jaxb.core.resource.java.XmlSchemaAnnotation;

/**
 * javax.xml.bind.annotation.XmlSchema
 */
public final class NullXmlSchemaAnnotation
	extends NullAnnotation
	implements XmlSchemaAnnotation
{
	protected NullXmlSchemaAnnotation(JavaResourceNode parent) {
		super(parent);
	}

	public String getAnnotationName() {
		return JAXB.XML_SCHEMA;
	}

	@Override
	protected XmlSchemaAnnotation addAnnotation() {
		return (XmlSchemaAnnotation) super.addAnnotation();
	}


	// ********** XmlSchemaAnnotation implementation **********

	// ***** namespace
	
	public String getNamespace() {
		return null;
	}

	public void setNamespace(String namespace) {
		if (namespace != null) {
			this.addAnnotation().setNamespace(namespace);
		}
	}

	public TextRange getNamespaceTextRange(CompilationUnit astRoot) {
		return null;
	}
	
	public boolean namespaceTouches(int pos, CompilationUnit astRoot) {
		return false;
	}
	
	
	// ***** location
	
	public String getLocation() {
		return null;
	}

	public void setLocation(String location) {
		if (location != null) {
			this.addAnnotation().setLocation(location);
		}
	}

	public TextRange getLocationTextRange(CompilationUnit astRoot) {
		return null;
	}

	public TextRange getValueTextRange(CompilationUnit astRoot) {
		return null;
	}

	public XmlNsForm getAttributeFormDefault() {
		return null;
	}

	public void setAttributeFormDefault(XmlNsForm attributeFormDefault) {
		if (attributeFormDefault != null) {
			this.addAnnotation().setAttributeFormDefault(attributeFormDefault);
		}
	}

	public TextRange getAttributeFormDefaultTextRange(CompilationUnit astRoot) {
		return null;
	}

	public XmlNsForm getElementFormDefault() {
		return null;
	}

	public void setElementFormDefault(XmlNsForm elementFormDefault) {
		if (elementFormDefault != null) {
			this.addAnnotation().setElementFormDefault(elementFormDefault);
		}
	}

	public TextRange getElementFormDefaultTextRange(CompilationUnit astRoot) {
		return null;
	}

	public ListIterable<XmlNsAnnotation> getXmlns() {
		return EmptyListIterable.instance();
	}

	public int getXmlnsSize() {
		return 0;
	}

	public XmlNsAnnotation xmlnsAt(int index) {
		return null;
	}

	public XmlNsAnnotation addXmlns(int index) {
		return this.addAnnotation().addXmlns(index);
	}

	public void moveXmlns(int targetIndex, int sourceIndex) {
		throw new UnsupportedOperationException();
	}

	public void removeXmlns(int index) {
		throw new UnsupportedOperationException();
	}

}

Back to the top