1
package com.thaiopensource.relaxng.edit;
4
import java.util.Vector;
6
public abstract class Annotated extends SourceObject {
7
private final List<Comment> leadingComments = new Vector<Comment>();
8
private final List<AttributeAnnotation> attributeAnnotations = new Vector<AttributeAnnotation>();
9
private final List<AnnotationChild> childElementAnnotations = new Vector<AnnotationChild>();
10
private final List<AnnotationChild> followingElementAnnotations = new Vector<AnnotationChild>();
11
private NamespaceContext context;
13
public List<Comment> getLeadingComments() {
14
return leadingComments;
17
public List<AttributeAnnotation> getAttributeAnnotations() {
18
return attributeAnnotations;
21
public List<AnnotationChild> getChildElementAnnotations() {
22
return childElementAnnotations;
25
public List<AnnotationChild> getFollowingElementAnnotations() {
26
return followingElementAnnotations;
29
public boolean mayContainText() {
33
public NamespaceContext getContext() {
37
public void setContext(NamespaceContext context) {
38
this.context = context;
41
public String getAttributeAnnotation(String ns, String localName) {
42
for (AttributeAnnotation a : attributeAnnotations)
43
if (a.getNamespaceUri().equals(ns) && a.getLocalName().equals(localName))
49
public void attributeAnnotationsAccept(AttributeAnnotationVisitor<?> visitor) {
50
for (AttributeAnnotation a : attributeAnnotations)
54
public void childElementAnnotationsAccept(AnnotationChildVisitor<?> visitor) {
55
for (AnnotationChild a : childElementAnnotations)
59
public void followingElementAnnotationsAccept(AnnotationChildVisitor<?> visitor) {
60
for (AnnotationChild a : followingElementAnnotations)
64
public void leadingCommentsAccept(AnnotationChildVisitor<?> visitor) {
65
for (Comment c : leadingComments)