本文整理了Java中org.opensaml.core.xml.schema.XSBooleanValue
类的一些代码示例,展示了XSBooleanValue
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSBooleanValue
类的具体详情如下:
包路径:org.opensaml.core.xml.schema.XSBooleanValue
类名称:XSBooleanValue
[英]A class representing a boolean attribute. This class tracks the usage of the literals {true, false, 1, 0} to ensure proper roundtripping when unmarshalling/marshalling.
[中]表示布尔属性的类。此类跟踪文本{true,false,1,0}的使用情况,以确保在解组/编组时进行正确的往返。
代码示例来源:origin: org.opensaml/opensaml-saml-impl
/** {@inheritDoc} */
public Boolean isAuthnRequestsSigned() {
if (authnRequestSigned == null) {
return Boolean.FALSE;
}
return authnRequestSigned.getValue();
}
代码示例来源:origin: org.opensaml/opensaml-soap-impl
/**
* Constructor. Default value is <code>TRUE</code>.
*
* @param namespaceURI The namespace of the element
* @param elementLocalName The local name of the element
* @param namespacePrefix The namespace prefix of the element
*/
public ForwardableImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
value = new XSBooleanValue(DEFAULT_VALUE, false);
}
代码示例来源:origin: org.opensaml/opensaml-core
/** {@inheritDoc} */
@Override
public String toString() {
return toString(value, numeric);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml
/** {@inheritDoc} */
@Override
protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
XSBoolean xsiBoolean = (XSBoolean) xmlObject;
xsiBoolean.setValue(XSBooleanValue.valueOf(elementContent));
}
}
代码示例来源:origin: org.opensaml/opensaml-soap-api
/**
* Adds a <code>soap11:mustUnderstand</code> attribute to the given SOAP object.
*
* @param soapObject the SOAP object to add the attribute to
* @param mustUnderstand whether mustUnderstand is true or false
*/
public static void addSOAP11MustUnderstandAttribute(@Nonnull final XMLObject soapObject, boolean mustUnderstand) {
if (soapObject instanceof MustUnderstandBearing) {
((MustUnderstandBearing) soapObject).setSOAP11MustUnderstand(new XSBooleanValue(mustUnderstand, true));
} else if (soapObject instanceof AttributeExtensibleXMLObject) {
((AttributeExtensibleXMLObject) soapObject).getUnknownAttributes().put(
MustUnderstandBearing.SOAP11_MUST_UNDERSTAND_ATTR_NAME,
new XSBooleanValue(mustUnderstand, true).toString());
} else {
throw new IllegalArgumentException(
"Specified object was neither MustUnderstandBearing nor AttributeExtensible");
}
}
代码示例来源:origin: org.opensaml/opensaml-core
/** {@inheritDoc} */
@Override
public boolean equals(Object obj) {
if(obj == this){
return true;
}
if(obj instanceof XSBooleanValue){
return hashCode() == obj.hashCode();
}
return false;
}
代码示例来源:origin: org.opensaml/opensaml-core
/** {@inheritDoc} */
@Override
protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
XSBoolean xsiBoolean = (XSBoolean) xmlObject;
xsiBoolean.setValue(XSBooleanValue.valueOf(elementContent));
}
}
代码示例来源:origin: org.opensaml/opensaml-soap-api
/**
* Adds a <code>soap12:relay</code> attribute to the given SOAP object.
*
* @param soapObject the SOAP object to add the attribute to
* @param relay whether relay is true or false
*/
public static void addSOAP12RelayAttribute(@Nonnull final XMLObject soapObject, boolean relay) {
if (soapObject instanceof org.opensaml.soap.soap12.RelayBearing) {
((org.opensaml.soap.soap12.RelayBearing) soapObject).setSOAP12Relay(new XSBooleanValue(relay, false));
} else if (soapObject instanceof AttributeExtensibleXMLObject) {
((AttributeExtensibleXMLObject) soapObject).getUnknownAttributes().put(
org.opensaml.soap.soap12.RelayBearing.SOAP12_RELAY_ATTR_NAME,
new XSBooleanValue(relay, false).toString());
} else {
throw new IllegalArgumentException("Specified object was neither RelayBearing nor AttributeExtensible");
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml
/** {@inheritDoc} */
@Override
public boolean equals(Object obj) {
if(obj == this){
return true;
}
if(obj instanceof XSBooleanValue){
return hashCode() == obj.hashCode();
}
return false;
}
代码示例来源:origin: org.opensaml/opensaml-saml-impl
/** {@inheritDoc} */
public Boolean isPassive() {
if (isPassive != null) {
return isPassive.getValue();
}
return Boolean.FALSE;
}
代码示例来源:origin: org.opensaml/opensaml-soap-impl
/**
* Constructor. Default value is <code>FALSE</code>.
*
* @param namespaceURI The namespace of the element
* @param elementLocalName The local name of the element
* @param namespacePrefix The namespace prefix of the element
*/
public DelegatableImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
value = new XSBooleanValue(DEFAULT_VALUE, false);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml
/** {@inheritDoc} */
@Override
public String toString() {
return toString(value, numeric);
}
代码示例来源:origin: org.opensaml/opensaml-soap-impl
/** {@inheritDoc} */
protected void processElementContent(XMLObject xmlObject, String elementContent) {
if (elementContent != null) {
Delegatable delegatable = (Delegatable) xmlObject;
XSBooleanValue value = XSBooleanValue.valueOf(elementContent);
delegatable.setValue(value);
}
}
代码示例来源:origin: org.opensaml/opensaml-saml-impl
/** {@inheritDoc} */
public Boolean isDefault() {
if (isDefault == null) {
return Boolean.FALSE;
}
return isDefault.getValue();
}
代码示例来源:origin: org.opensaml/opensaml-saml-impl
/** {@inheritDoc} */
public void setPassive(Boolean newIsPassive) {
if (newIsPassive != null) {
isPassive = prepareForAssignment(isPassive, new XSBooleanValue(newIsPassive, false));
} else {
isPassive = prepareForAssignment(isPassive, null);
}
}
代码示例来源:origin: net.shibboleth.idp/idp-saml-impl
/** {@inheritDoc} */
protected void marshallAttributes(final XMLObject xmlObject, final Element domElement) throws MarshallingException {
final Scope scope = (Scope) xmlObject;
if (scope.getRegexpXSBoolean() != null) {
domElement.setAttributeNS(null, Scope.REGEXP_ATTRIB_NAME, scope.getRegexpXSBoolean().toString());
}
}
代码示例来源:origin: org.opensaml/opensaml-soap-impl
/** {@inheritDoc} */
protected void processElementContent(XMLObject xmlObject, String elementContent) {
if (elementContent != null) {
Forwardable forwardable = (Forwardable) xmlObject;
XSBooleanValue value = XSBooleanValue.valueOf(elementContent);
forwardable.setValue(value);
}
}
代码示例来源:origin: org.opensaml/opensaml-saml-impl
/** {@inheritDoc} */
public Boolean isSOAP11MustUnderstand() {
if (soap11MustUnderstand != null) {
return soap11MustUnderstand.getValue();
}
return Boolean.FALSE;
}
代码示例来源:origin: org.opensaml/opensaml-saml-impl
/** {@inheritDoc} */
public void setIsRequired(Boolean newIsRequired){
if(newIsRequired != null){
isRequired = prepareForAssignment(isRequired, new XSBooleanValue(newIsRequired, false));
}else{
isRequired = prepareForAssignment(isRequired, null);
}
}
代码示例来源:origin: org.opensaml/opensaml-soap-impl
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
Renewing renewing = (Renewing) xmlObject;
if (renewing.isAllowXSBoolean() != null) {
domElement.setAttributeNS(null, Renewing.ALLOW_ATTRIB_NAME, renewing.isAllowXSBoolean().toString());
}
if (renewing.isOKXSBoolean() != null) {
domElement.setAttributeNS(null, Renewing.OK_ATTRIB_NAME, renewing.isOKXSBoolean().toString());
}
}
内容来源于网络,如有侵权,请联系作者删除!