1
|
|
/*
|
2
|
|
* JBind
|
3
|
|
*
|
4
|
|
* Copyright (c) by Stefan Wachter. All rights reserved.
|
5
|
|
*
|
6
|
|
* Usage, modification, and redistribution is subject to license terms that are
|
7
|
|
* available at 'http://www.jbind.org'. The JBind license is like the
|
8
|
|
* 'Apache Software License V 1.1'.
|
9
|
|
*/
|
10
|
|
package org.jbind.xml.schema.element;
|
11
|
|
|
12
|
|
import org.jbind.xml.base.IAttribute;
|
13
|
|
import org.jbind.xml.base.ILocation;
|
14
|
|
import org.jbind.xml.base.IRef;
|
15
|
|
import org.jbind.xml.schema.instantiation.ISchemaElement;
|
16
|
|
|
17
|
|
public class Attribute implements IAttribute {
|
18
|
|
|
19
|
|
private String myNamespaceUri = null;
|
20
|
|
private String myLocalName = null;
|
21
|
|
private String myStringValue = null;
|
22
|
|
private ILocation myLocation = null;
|
23
|
|
private ISchemaElement mySchemaElement = null;
|
24
|
|
|
25
|
7300
|
public Attribute(ACParams anACParams) {
|
26
|
7300
|
myNamespaceUri = anACParams.namespace;
|
27
|
7300
|
myLocalName = anACParams.localName;
|
28
|
7300
|
myStringValue = anACParams.value;
|
29
|
7300
|
myLocation = anACParams.location;
|
30
|
|
}
|
31
|
|
|
32
|
0
|
public Attribute(String aNamespace, String aName, String aValue) {
|
33
|
0
|
myNamespaceUri = aNamespace;
|
34
|
0
|
myLocalName = aName;
|
35
|
0
|
myStringValue = aValue;
|
36
|
0
|
myLocation = null;
|
37
|
|
}
|
38
|
|
|
39
|
7298
|
public String getLocalName() {
|
40
|
7298
|
return myLocalName;
|
41
|
|
}
|
42
|
|
|
43
|
7298
|
public String getNamespaceUri() {
|
44
|
7298
|
return myNamespaceUri;
|
45
|
|
}
|
46
|
|
|
47
|
4823
|
public String getStringValue() {
|
48
|
4823
|
return myStringValue;
|
49
|
|
}
|
50
|
|
|
51
|
0
|
public IRef getRef() {
|
52
|
|
assert false : "attribute is not a reference";
|
53
|
0
|
return null;
|
54
|
|
}
|
55
|
|
|
56
|
0
|
public boolean getBoolean() {
|
57
|
|
assert false : "attribute is not a boolean";
|
58
|
0
|
return false;
|
59
|
|
}
|
60
|
|
|
61
|
0
|
public int getInt() {
|
62
|
|
assert false : "attribute is not an int";
|
63
|
0
|
return 0;
|
64
|
|
}
|
65
|
|
|
66
|
1
|
public ILocation getLocation() {
|
67
|
1
|
return myLocation;
|
68
|
|
}
|
69
|
|
}
|
70
|
|
|