Fields Summary |
---|
private static final String | _TAG_INCLUDE_BUT_SEARCHField _ATT_FILTER_VALUE_INTERSECT |
private static final String | _TAG_EXCLUDE_BUT_SEARCHField _ATT_FILTER_VALUE_SUBTRACT |
private static final String | _TAG_EXCLUDEField _ATT_FILTER_VALUE_UNION |
public static final String | _TAG_XPATHCHGPField _TAG_XPATHCHGP |
public static final String | _ATT_INCLUDESLASHField _ATT_INCLUDESLASH |
public static final boolean | IncludeSlashField IncludeSlash |
public static final boolean | ExcludeSlashField ExcludeSlash |
Constructors Summary |
---|
private XPathFilterCHGPContainer()Constructor XPathFilterCHGPContainer
// no instantiation
|
private XPathFilterCHGPContainer(Document doc, boolean includeSlashPolicy, String includeButSearch, String excludeButSearch, String exclude)Constructor XPathFilterCHGPContainer
super(doc);
if (includeSlashPolicy) {
this._constructionElement
.setAttributeNS(null, XPathFilterCHGPContainer._ATT_INCLUDESLASH, "true");
} else {
this._constructionElement
.setAttributeNS(null, XPathFilterCHGPContainer._ATT_INCLUDESLASH, "false");
}
if ((includeButSearch != null)
&& (includeButSearch.trim().length() > 0)) {
Element includeButSearchElem =
ElementProxy.createElementForFamily(doc, this.getBaseNamespace(),
XPathFilterCHGPContainer
._TAG_INCLUDE_BUT_SEARCH);
includeButSearchElem
.appendChild(this._doc
.createTextNode(indentXPathText(includeButSearch)));
this._constructionElement.appendChild(doc.createTextNode("\n"));
this._constructionElement.appendChild(includeButSearchElem);
}
if ((excludeButSearch != null)
&& (excludeButSearch.trim().length() > 0)) {
Element excludeButSearchElem =
ElementProxy.createElementForFamily(doc, this.getBaseNamespace(),
XPathFilterCHGPContainer
._TAG_EXCLUDE_BUT_SEARCH);
excludeButSearchElem
.appendChild(this._doc
.createTextNode(indentXPathText(excludeButSearch)));
this._constructionElement.appendChild(doc.createTextNode("\n"));
this._constructionElement.appendChild(excludeButSearchElem);
}
if ((exclude != null) && (exclude.trim().length() > 0)) {
Element excludeElem = ElementProxy.createElementForFamily(doc,
this.getBaseNamespace(),
XPathFilterCHGPContainer._TAG_EXCLUDE);
excludeElem
.appendChild(this._doc.createTextNode(indentXPathText(exclude)));
this._constructionElement.appendChild(doc.createTextNode("\n"));
this._constructionElement.appendChild(excludeElem);
}
this._constructionElement.appendChild(doc.createTextNode("\n"));
|
private XPathFilterCHGPContainer(Element element, String BaseURI)Constructor XPathFilterCHGPContainer
super(element, BaseURI);
|
Methods Summary |
---|
public final java.lang.String | getBaseLocalName()Method getBaseLocalName
return XPathFilterCHGPContainer._TAG_XPATHCHGP;
|
public final java.lang.String | getBaseNamespace()Method getBaseNamespace
return Transforms.TRANSFORM_XPATHFILTERCHGP;
|
public java.lang.String | getExclude()Method getExclude
return this.getXStr(XPathFilterCHGPContainer._TAG_EXCLUDE);
|
public java.lang.String | getExcludeButSearch()Method getExcludeButSearch
return this.getXStr(XPathFilterCHGPContainer._TAG_EXCLUDE_BUT_SEARCH);
|
private org.w3c.dom.Node | getHereContextNode(java.lang.String type)Returns the first Text node which contains information from the XPath
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]
if (this.length(this.getBaseNamespace(), type) != 1) {
return null;
}
return XMLUtils.selectNodeText(this._constructionElement.getFirstChild(), this.getBaseNamespace(),
type,0);
|
public org.w3c.dom.Node | getHereContextNodeExclude()Method getHereContextNodeExclude
return this.getHereContextNode(XPathFilterCHGPContainer._TAG_EXCLUDE);
|
public org.w3c.dom.Node | getHereContextNodeExcludeButSearch()Method getHereContextNodeExcludeButSearch
return this
.getHereContextNode(XPathFilterCHGPContainer._TAG_EXCLUDE_BUT_SEARCH);
|
public org.w3c.dom.Node | getHereContextNodeIncludeButSearch()Method getHereContextNodeIncludeButSearch
return this
.getHereContextNode(XPathFilterCHGPContainer._TAG_INCLUDE_BUT_SEARCH);
|
public java.lang.String | getIncludeButSearch()Method getIncludeButSearch
return this.getXStr(XPathFilterCHGPContainer._TAG_INCLUDE_BUT_SEARCH);
|
public boolean | getIncludeSlashPolicy()Method getIncludeSlashPolicy
return this._constructionElement
.getAttributeNS(null, XPathFilterCHGPContainer._ATT_INCLUDESLASH)
.equals("true");
|
public static com.sun.org.apache.xml.internal.security.transforms.params.XPathFilterCHGPContainer | getInstance(org.w3c.dom.Document doc, boolean includeSlashPolicy, java.lang.String includeButSearch, java.lang.String excludeButSearch, java.lang.String exclude)Creates a new XPathFilterCHGPContainer; needed for generation.
return new XPathFilterCHGPContainer(doc, includeSlashPolicy,
includeButSearch, excludeButSearch,
exclude);
|
public static com.sun.org.apache.xml.internal.security.transforms.params.XPathFilterCHGPContainer | getInstance(org.w3c.dom.Element element, java.lang.String BaseURI)Creates a XPathFilterCHGPContainer from an existing Element; needed for verification.
return new XPathFilterCHGPContainer(element, BaseURI);
|
private java.lang.String | getXStr(java.lang.String type)Method getXStr
if (this.length(this.getBaseNamespace(), type) != 1) {
return "";
}
Element xElem = XMLUtils.selectNode(this._constructionElement.getFirstChild(), this.getBaseNamespace(),
type,0);
return XMLUtils.getFullTextChildrenFromElement(xElem);
|
static java.lang.String | indentXPathText(java.lang.String xp)Method indentXPathText
if ((xp.length() > 2) && (!Character.isWhitespace(xp.charAt(0)))) {
return "\n" + xp + "\n";
}
return xp;
|