当前位置: 首页>>代码示例>>Java>>正文


Java Attr.isId方法代码示例

本文整理汇总了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());
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:18,代码来源:EncryptionPropertyUnmarshaller.java

示例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());
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:25,代码来源:SubjectConfirmationDataUnmarshaller.java

示例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());
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:EndpointUnmarshaller.java

示例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());
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:23,代码来源:EntityDescriptorUnmarshaller.java

示例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());
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:20,代码来源:AttributeUnmarshaller.java

示例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());
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:DetailUnmarshaller.java

示例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());
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:HeaderUnmarshaller.java

示例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;
}
 
开发者ID:i49,项目名称:cascade,代码行数:12,代码来源:IdentifierMatcher.java

示例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);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:XMLHelper.java

示例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()));
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:AttributeValueTypeUnmarshaller.java

示例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());
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:AttributeValueTypeUnmarshaller.java

示例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());
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:ResourceContentTypeUnmarshaller.java

示例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());
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:28,代码来源:RoleDescriptorUnmarshaller.java

示例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());
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:13,代码来源:OrganizationUnmarshaller.java

示例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());
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:AuthnContextDeclUnmarshaller.java


注:本文中的org.w3c.dom.Attr.isId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。