|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xml.security.utils.ElementProxy
public abstract class ElementProxy
This is the base class to all Objects which have a direct 1:1 mapping to an Element in a particular namespace.
| Field Summary | |
|---|---|
protected String |
baseURI
Field baseURI |
protected static org.slf4j.Logger |
log
|
| Constructor Summary | |
|---|---|
ElementProxy()
Constructor ElementProxy |
|
ElementProxy(Document doc)
Constructor ElementProxy |
|
ElementProxy(Element element,
String BaseURI)
Constructor ElementProxy |
|
| Method Summary | |
|---|---|
void |
addBase64Element(byte[] bytes,
String localname)
Method addBase64Element |
void |
addBase64Text(byte[] bytes)
Method addBase64Text |
void |
addBigIntegerElement(BigInteger bi,
String localname)
Method addBigIntegerElement |
protected void |
addReturnToSelf()
|
void |
addText(String text)
Method addText |
void |
addTextElement(String text,
String localname)
Method addTextElement |
protected void |
appendOther(Element parent,
Node toAppend)
|
protected void |
appendSelf(ElementProxy toAppend)
|
protected void |
appendSelf(Node toAppend)
|
static Element |
createElementForFamily(Document doc,
String namespace,
String localName)
This method creates an Element in a given namespace with a given localname. |
protected Element |
createElementForFamilyLocal(String namespace,
String localName)
|
protected Text |
createText(String text)
|
abstract String |
getBaseLocalName()
Returns the localname of the Elements of the sub-class. |
abstract String |
getBaseNamespace()
Returns the namespace of the Elements of the sub-class. |
String |
getBaseURI()
Method getBaseURI |
BigInteger |
getBigIntegerFromChildElement(String localname,
String namespace)
Method getVal |
byte[] |
getBytesFromTextChild()
Method getBytesFromTextChild |
static String |
getDefaultPrefix(String namespace)
Method getDefaultPrefix |
Document |
getDocument()
Method getDocument |
Element |
getElement()
Returns the Element which was constructed by the Object. |
NodeList |
getElementPlusReturns()
Returns the Element plus a leading and a trailing CarriageReturn Text node. |
protected Node |
getFirstChild()
|
protected String |
getLocalAttribute(String attrName)
|
String |
getTextFromChildElement(String localname,
String namespace)
Method getTextFromChildElement |
String |
getTextFromTextChild()
Method getTextFromTextChild |
int |
length(String namespace,
String localname)
Method length |
static void |
registerDefaultPrefixes()
This method registers the default prefixes. |
static void |
setDefaultPrefix(String namespace,
String prefix)
Method setDefaultPrefix |
protected void |
setDocument(Document doc)
Set a new value for the wrapped document that this object is a proxy for. |
protected void |
setElement(Element elem)
New value for the wrapped XML element that this object is a proxy for. |
void |
setElement(Element element,
String BaseURI)
Method setElement |
protected void |
setLocalAttribute(String attrName,
String value)
|
protected void |
setLocalIdAttribute(String attrName,
String value)
|
void |
setXPathNamespaceContext(String prefix,
String uri)
Adds an xmlns: definition to the Element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.slf4j.Logger log
protected String baseURI
| Constructor Detail |
|---|
public ElementProxy()
public ElementProxy(Document doc)
doc -
public ElementProxy(Element element,
String BaseURI)
throws XMLSecurityException
element - BaseURI -
XMLSecurityException| Method Detail |
|---|
public abstract String getBaseNamespace()
public abstract String getBaseLocalName()
protected Element createElementForFamilyLocal(String namespace,
String localName)
public static Element createElementForFamily(Document doc,
String namespace,
String localName)
getDefaultPrefix(java.lang.String) method to decide whether
a particular prefix is bound to that namespace.
doc - namespace - localName -
public void setElement(Element element,
String BaseURI)
throws XMLSecurityException
element - BaseURI -
XMLSecurityExceptionpublic final Element getElement()
public final NodeList getElementPlusReturns()
protected Text createText(String text)
public Document getDocument()
public String getBaseURI()
public void addBigIntegerElement(BigInteger bi,
String localname)
bi - localname - protected void addReturnToSelf()
public void addBase64Element(byte[] bytes,
String localname)
bytes - localname -
public void addTextElement(String text,
String localname)
text - localname - public void addBase64Text(byte[] bytes)
bytes - protected void appendSelf(ElementProxy toAppend)
protected void appendSelf(Node toAppend)
protected void appendOther(Element parent,
Node toAppend)
public void addText(String text)
text -
public BigInteger getBigIntegerFromChildElement(String localname,
String namespace)
throws Base64DecodingException
localname - namespace -
Base64DecodingException
public String getTextFromChildElement(String localname,
String namespace)
localname - namespace -
public byte[] getBytesFromTextChild()
throws XMLSecurityException
XMLSecurityExceptionpublic String getTextFromTextChild()
public int length(String namespace,
String localname)
namespace - localname -
public void setXPathNamespaceContext(String prefix,
String uri)
throws XMLSecurityException
// set namespace with ds prefix
xpathContainer.setXPathNamespaceContext("ds", "http://www.w3.org/2000/09/xmldsig#");
xpathContainer.setXPathNamespaceContext("xmlns:ds", "http://www.w3.org/2000/09/xmldsig#");
prefix - uri -
XMLSecurityException
public static void setDefaultPrefix(String namespace,
String prefix)
throws XMLSecurityException
namespace - prefix -
XMLSecurityException
public static void registerDefaultPrefixes()
throws XMLSecurityException
XMLSecurityExceptionpublic static String getDefaultPrefix(String namespace)
namespace -
protected void setElement(Element elem)
elem - New elementgetElement()protected void setDocument(Document doc)
doc - New document object being wrapped.getDocument()protected String getLocalAttribute(String attrName)
protected void setLocalAttribute(String attrName,
String value)
protected void setLocalIdAttribute(String attrName,
String value)
protected Node getFirstChild()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||