本文整理汇总了Java中org.w3c.dom.Attr.isId方法的典型用法代码示例。如果您正苦于以下问题:Java Attr.isId方法的具体用法?Java Attr.isId怎么用?Java Attr.isId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.w3c.dom.Attr
的用法示例。
在下文中一共展示了Attr.isId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processAttribute
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
EncryptionProperty ep = (EncryptionProperty) xmlObject;
if (attribute.getLocalName().equals(EncryptionProperty.ID_ATTRIB_NAME)) {
ep.setID(attribute.getValue());
attribute.getOwnerElement().setIdAttributeNode(attribute, true);
} else if (attribute.getLocalName().equals(EncryptionProperty.TARGET_ATTRIB_NAME)) {
ep.setTarget(attribute.getValue());
} else {
QName attributeName = XMLHelper.getNodeQName(attribute);
if (attribute.isId()) {
ep.getUnknownAttributes().registerID(attributeName);
}
ep.getUnknownAttributes().put(attributeName, attribute.getValue());
}
}
示例2: processAttribute
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
SubjectConfirmationData subjectCD = (SubjectConfirmationData) samlObject;
if (attribute.getLocalName().equals(SubjectConfirmationData.NOT_BEFORE_ATTRIB_NAME)
&& !DatatypeHelper.isEmpty(attribute.getValue())) {
subjectCD.setNotBefore(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
} else if (attribute.getLocalName().equals(SubjectConfirmationData.NOT_ON_OR_AFTER_ATTRIB_NAME)
&& !DatatypeHelper.isEmpty(attribute.getValue())) {
subjectCD.setNotOnOrAfter(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
} else if (attribute.getLocalName().equals(SubjectConfirmationData.RECIPIENT_ATTRIB_NAME)) {
subjectCD.setRecipient(attribute.getValue());
} else if (attribute.getLocalName().equals(SubjectConfirmationData.IN_RESPONSE_TO_ATTRIB_NAME)) {
subjectCD.setInResponseTo(attribute.getValue());
} else if (attribute.getLocalName().equals(SubjectConfirmationData.ADDRESS_ATTRIB_NAME)) {
subjectCD.setAddress(attribute.getValue());
} else {
QName attribQName = XMLHelper.getNodeQName(attribute);
if (attribute.isId()) {
subjectCD.getUnknownAttributes().registerID(attribQName);
}
subjectCD.getUnknownAttributes().put(attribQName, attribute.getValue());
}
}
示例3: processAttribute
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
Endpoint endpoint = (Endpoint) samlObject;
if (attribute.getLocalName().equals(Endpoint.BINDING_ATTRIB_NAME)) {
endpoint.setBinding(attribute.getValue());
} else if (attribute.getLocalName().equals(Endpoint.LOCATION_ATTRIB_NAME)) {
endpoint.setLocation(attribute.getValue());
} else if (attribute.getLocalName().equals(Endpoint.RESPONSE_LOCATION_ATTRIB_NAME)) {
endpoint.setResponseLocation(attribute.getValue());
} else {
QName attribQName = XMLHelper.getNodeQName(attribute);
if (attribute.isId()) {
endpoint.getUnknownAttributes().registerID(attribQName);
}
endpoint.getUnknownAttributes().put(attribQName, attribute.getValue());
}
}
示例4: processAttribute
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
EntityDescriptor entityDescriptor = (EntityDescriptor) samlObject;
if (attribute.getLocalName().equals(EntityDescriptor.ENTITY_ID_ATTRIB_NAME)) {
entityDescriptor.setEntityID(attribute.getValue());
} else if (attribute.getLocalName().equals(EntityDescriptor.ID_ATTRIB_NAME)) {
entityDescriptor.setID(attribute.getValue());
attribute.getOwnerElement().setIdAttributeNode(attribute, true);
} else if (attribute.getLocalName().equals(TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME)
&& !DatatypeHelper.isEmpty(attribute.getValue())) {
entityDescriptor.setValidUntil(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
} else if (attribute.getLocalName().equals(CacheableSAMLObject.CACHE_DURATION_ATTRIB_NAME)) {
entityDescriptor.setCacheDuration(XMLHelper.durationToLong(attribute.getValue()));
} else {
QName attribQName = XMLHelper.getNodeQName(attribute);
if (attribute.isId()) {
entityDescriptor.getUnknownAttributes().registerID(attribQName);
}
entityDescriptor.getUnknownAttributes().put(attribQName, attribute.getValue());
}
}
示例5: processAttribute
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
Attribute attrib = (Attribute) samlObject;
if (attribute.getLocalName().equals(Attribute.NAME_ATTTRIB_NAME)) {
attrib.setName(attribute.getValue());
} else if (attribute.getLocalName().equals(Attribute.NAME_FORMAT_ATTRIB_NAME)) {
attrib.setNameFormat(attribute.getValue());
} else if (attribute.getLocalName().equals(Attribute.FRIENDLY_NAME_ATTRIB_NAME)) {
attrib.setFriendlyName(attribute.getValue());
} else {
QName attribQName = XMLHelper.getNodeQName(attribute);
if (attribute.isId()) {
attrib.getUnknownAttributes().registerID(attribQName);
}
attrib.getUnknownAttributes().put(attribQName, attribute.getValue());
}
}
示例6: processAttribute
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
Detail detail = (Detail) xmlObject;
QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute
.getPrefix());
if (attribute.isId()) {
detail.getUnknownAttributes().registerID(attribQName);
}
detail.getUnknownAttributes().put(attribQName, attribute.getValue());
}
示例7: processAttribute
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
Header header = (Header) xmlObject;
QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute
.getPrefix());
if (attribute.isId()) {
header.getUnknownAttributes().registerID(attribQName);
}
header.getUnknownAttributes().put(attribQName, attribute.getValue());
}
示例8: matches
import org.w3c.dom.Attr; //导入方法依赖的package包/类
@Override
public boolean matches(Element element) {
NamedNodeMap map = element.getAttributes();
for (int i = 0; i < map.getLength(); i++) {
Attr a = (Attr)map.item(i);
if (a.isId() && this.identifier.equals(a.getValue())) {
return true;
}
}
return false;
}
示例9: unmarshallToAttributeMap
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/**
* Unmarshall a DOM Attr to an AttributeMap.
*
* @param attributeMap the target AttributeMap
* @param attribute the target DOM Attr
*/
public static void unmarshallToAttributeMap(AttributeMap attributeMap, Attr attribute) {
QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute
.getPrefix());
attributeMap.put(attribQName, attribute.getValue());
if (attribute.isId() || Configuration.isIDAttribute(attribQName)) {
attributeMap.registerID(attribQName);
}
}
示例10: processAttribute
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
AttributeValueType attributeValue = (AttributeValueType) xmlObject;
QName attribQName = XMLHelper.getNodeQName(attribute);
if (attribute.isId()) {
attributeValue.getUnknownAttributes().registerID(attribQName);
}
attributeValue.getUnknownAttributes().put(attribQName, attribute.getValue());
if(attribute.getLocalName().equals(AttributeValueType.DATA_TYPE_ATTRIB_NAME)){
attributeValue.setDataType(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
}
}
示例11: processAttribute
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
AttributeValueType attributeValue = (AttributeValueType) xmlObject;
QName attribQName = XMLHelper.getNodeQName(attribute);
if (attribute.isId()) {
attributeValue.getUnknownAttributes().registerID(attribQName);
}
attributeValue.getUnknownAttributes().put(attribQName, attribute.getValue());
}
示例12: processAttribute
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
ResourceContentType resourceContent = (ResourceContentType) xmlObject;
QName attribQName = XMLHelper.getNodeQName(attribute);
if (attribute.isId()) {
resourceContent.getUnknownAttributes().registerID(attribQName);
}
resourceContent.getUnknownAttributes().put(attribQName, attribute.getValue());
}
示例13: processAttribute
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
RoleDescriptor roleDescriptor = (RoleDescriptor) samlObject;
if (attribute.getLocalName().equals(RoleDescriptor.ID_ATTRIB_NAME)) {
roleDescriptor.setID(attribute.getValue());
attribute.getOwnerElement().setIdAttributeNode(attribute, true);
} else if (attribute.getLocalName().equals(TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME)
&& !DatatypeHelper.isEmpty(attribute.getValue())) {
roleDescriptor.setValidUntil(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
} else if (attribute.getLocalName().equals(CacheableSAMLObject.CACHE_DURATION_ATTRIB_NAME)) {
roleDescriptor.setCacheDuration(XMLHelper.durationToLong(attribute.getValue()));
} else if (attribute.getLocalName().equals(RoleDescriptor.PROTOCOL_ENUMERATION_ATTRIB_NAME)) {
StringTokenizer protocolTokenizer = new StringTokenizer(attribute.getValue(), " ");
while (protocolTokenizer.hasMoreTokens()) {
roleDescriptor.addSupportedProtocol(protocolTokenizer.nextToken());
}
} else if (attribute.getLocalName().equals(RoleDescriptor.ERROR_URL_ATTRIB_NAME)) {
roleDescriptor.setErrorURL(attribute.getValue());
} else {
QName attribQName = XMLHelper.getNodeQName(attribute);
if (attribute.isId()) {
roleDescriptor.getUnknownAttributes().registerID(attribQName);
}
roleDescriptor.getUnknownAttributes().put(attribQName, attribute.getValue());
}
}
示例14: processAttribute
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
Organization org = (Organization) samlObject;
QName attribQName = XMLHelper.getNodeQName(attribute);
if (attribute.isId()) {
org.getUnknownAttributes().registerID(attribQName);
}
org.getUnknownAttributes().put(attribQName, attribute.getValue());
}
示例15: processAttribute
import org.w3c.dom.Attr; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
AuthnContextDecl authnCtcDecl = (AuthnContextDecl) xmlObject;
QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute
.getPrefix());
if (attribute.isId()) {
authnCtcDecl.getUnknownAttributes().registerID(attribQName);
}
authnCtcDecl.getUnknownAttributes().put(attribQName, attribute.getValue());
}