Fields Summary |
---|
private static final String | _ATT_FILTERField _ATT_FILTER |
private static final String | _ATT_FILTER_VALUE_INTERSECTField _ATT_FILTER_VALUE_INTERSECT |
private static final String | _ATT_FILTER_VALUE_SUBTRACTField _ATT_FILTER_VALUE_SUBTRACT |
private static final String | _ATT_FILTER_VALUE_UNIONField _ATT_FILTER_VALUE_UNION |
public static final String | INTERSECTField INTERSECT |
public static final String | SUBTRACTField SUBTRACT |
public static final String | UNIONField UNION |
public static final String | _TAG_XPATH2Field _TAG_XPATH2 |
public static final String | XPathFilter2NSField XPathFiler2NS |
Constructors Summary |
---|
private XPath2FilterContainer()Constructor XPath2FilterContainer
// no instantiation
|
private XPath2FilterContainer(Document doc, String xpath2filter, String filterType)Constructor XPath2FilterContainer
super(doc);
this._constructionElement
.setAttributeNS(null, XPath2FilterContainer._ATT_FILTER, filterType);
this._constructionElement.appendChild(doc.createTextNode(xpath2filter));
|
private XPath2FilterContainer(Element element, String BaseURI)Constructor XPath2FilterContainer
super(element, BaseURI);
String filterStr = this._constructionElement.getAttributeNS(null,
XPath2FilterContainer._ATT_FILTER);
if (!filterStr
.equals(XPath2FilterContainer
._ATT_FILTER_VALUE_INTERSECT) &&!filterStr
.equals(XPath2FilterContainer
._ATT_FILTER_VALUE_SUBTRACT) &&!filterStr
.equals(XPath2FilterContainer._ATT_FILTER_VALUE_UNION)) {
Object exArgs[] = { XPath2FilterContainer._ATT_FILTER, filterStr,
XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT
+ ", "
+ XPath2FilterContainer._ATT_FILTER_VALUE_SUBTRACT
+ " or "
+ XPath2FilterContainer._ATT_FILTER_VALUE_UNION };
throw new XMLSecurityException("attributeValueIllegal", exArgs);
}
|
Methods Summary |
---|
public final java.lang.String | getBaseLocalName()Method getBaseLocalName
return XPath2FilterContainer._TAG_XPATH2;
|
public final java.lang.String | getBaseNamespace()Method getBaseNamespace
return XPath2FilterContainer.XPathFilter2NS;
|
public java.lang.String | getXPathFilterStr()Returns the XPath 2 Filter String
return this.getTextFromTextChild();
|
public org.w3c.dom.Node | getXPathFilterTextNode()Returns the first Text node which contains information from the XPath 2
Filter String. We must use this stupid hook to enable the here() function
to work.
$todo$ I dunno whether this crashes: here()/ds:Signature[1]
NodeList children = this._constructionElement.getChildNodes();
int length = children.getLength();
for (int i = 0; i < length; i++) {
if (children.item(i).getNodeType() == Node.TEXT_NODE) {
return children.item(i);
}
}
return null;
|
public boolean | isIntersect()Returns true if the Filter attribute has value "intersect".
return this._constructionElement
.getAttributeNS(null, XPath2FilterContainer._ATT_FILTER)
.equals(XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT);
|
public boolean | isSubtract()Returns true if the Filter attribute has value "subtract".
return this._constructionElement
.getAttributeNS(null, XPath2FilterContainer._ATT_FILTER)
.equals(XPath2FilterContainer._ATT_FILTER_VALUE_SUBTRACT);
|
public boolean | isUnion()Returns true if the Filter attribute has value "union".
return this._constructionElement
.getAttributeNS(null, XPath2FilterContainer._ATT_FILTER)
.equals(XPath2FilterContainer._ATT_FILTER_VALUE_UNION);
|
public static com.sun.org.apache.xml.internal.security.transforms.params.XPath2FilterContainer | newInstance(org.w3c.dom.Element element, java.lang.String BaseURI)Creates a XPath2FilterContainer from an existing Element; needed for verification.
return new XPath2FilterContainer(element, BaseURI);
|
public static com.sun.org.apache.xml.internal.security.transforms.params.XPath2FilterContainer | newInstanceIntersect(org.w3c.dom.Document doc, java.lang.String xpath2filter)Creates a new XPath2FilterContainer with the filter type "intersect".
return new XPath2FilterContainer(doc, xpath2filter,
XPath2FilterContainer
._ATT_FILTER_VALUE_INTERSECT);
|
public static com.sun.org.apache.xml.internal.security.transforms.params.XPath2FilterContainer | newInstanceSubtract(org.w3c.dom.Document doc, java.lang.String xpath2filter)Creates a new XPath2FilterContainer with the filter type "subtract".
return new XPath2FilterContainer(doc, xpath2filter,
XPath2FilterContainer
._ATT_FILTER_VALUE_SUBTRACT);
|
public static com.sun.org.apache.xml.internal.security.transforms.params.XPath2FilterContainer | newInstanceUnion(org.w3c.dom.Document doc, java.lang.String xpath2filter)Creates a new XPath2FilterContainer with the filter type "union".
return new XPath2FilterContainer(doc, xpath2filter,
XPath2FilterContainer
._ATT_FILTER_VALUE_UNION);
|
public static org.w3c.dom.NodeList | newInstances(org.w3c.dom.Document doc, java.lang.String[][] params)Method newInstances
HelperNodeList nl = new HelperNodeList();
nl.appendChild(doc.createTextNode("\n"));
for (int i = 0; i < params.length; i++) {
String type = params[i][0];
String xpath = params[i][1];
if (!(type.equals(XPath2FilterContainer
._ATT_FILTER_VALUE_INTERSECT) || type
.equals(XPath2FilterContainer
._ATT_FILTER_VALUE_SUBTRACT) || type
.equals(XPath2FilterContainer
._ATT_FILTER_VALUE_UNION))) {
throw new IllegalArgumentException("The type(" + i + ")=\"" + type
+ "\" is illegal");
}
XPath2FilterContainer c = new XPath2FilterContainer(doc, xpath, type);
nl.appendChild(c.getElement());
nl.appendChild(doc.createTextNode("\n"));
}
return nl;
|