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


Java AttributePSVI类代码示例

本文整理汇总了Java中org.apache.xerces.xs.AttributePSVI的典型用法代码示例。如果您正苦于以下问题:Java AttributePSVI类的具体用法?Java AttributePSVI怎么用?Java AttributePSVI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AttributePSVI类属于org.apache.xerces.xs包,在下文中一共展示了AttributePSVI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processAttributePSVI

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
/** Returns whether the given attribute is an ID type. **/
private boolean processAttributePSVI(AttrImpl attr, AttributePSVI attrPSVI) {
    if (fStorePSVI) {
        ((PSVIAttrNSImpl) attr).setPSVI (attrPSVI);
    }
    Object type = attrPSVI.getMemberTypeDefinition ();
    if (type == null) {
        type = attrPSVI.getTypeDefinition ();
        if (type != null) {
            attr.setType(type);
            return ((XSSimpleType) type).isIDType();
        }
    }
    else {
        attr.setType(type);
        return ((XSSimpleType) type).isIDType();
    }
    return false;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:20,代码来源:DOMResultAugmentor.java

示例2: setPSVI

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
/**
 * Copy PSVI properties from another psvi item.
 * 
 * @param attr  the source of attribute PSVI items
 */
public void setPSVI(AttributePSVI attr) {
    this.fDeclaration = attr.getAttributeDeclaration();
    this.fValidationContext = attr.getValidationContext();
    this.fValidity = attr.getValidity();
    this.fValidationAttempted = attr.getValidationAttempted();
    this.fErrorCodes = attr.getErrorCodes();
    this.fErrorMessages = attr.getErrorMessages();
    this.fValue.copyFrom(attr.getSchemaValue());
    this.fTypeDecl = attr.getTypeDefinition();
    this.fSpecified = attr.getIsSchemaSpecified();
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:17,代码来源:PSVIAttrNSImpl.java

示例3: getAttributeType

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
private TypeInfo getAttributeType( int index ) {
    checkStateAttribute();
    if (index < 0 || fAttributes.getLength() <= index) {
        throw new IndexOutOfBoundsException(Integer.toString(index));
    }
    Augmentations augs = fAttributes.getAugmentations(index);
    if (augs == null) {
        return null;
    }
    AttributePSVI psvi = (AttributePSVI)augs.getItem(Constants.ATTRIBUTE_PSVI);
    return getTypeInfoFromPSVI(psvi);
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:13,代码来源:ValidatorHandlerImpl.java

示例4: getAttributePSVI

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
AttributePSVI getAttributePSVI(int index) {
    if (fAttributes != null) {
        Augmentations augs = fAttributes.getAugmentations(index);
        if (augs != null) {
            return (AttributePSVI) augs.getItem(Constants.ATTRIBUTE_PSVI);
        }
    }
    return null;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:10,代码来源:ValidatorHandlerImpl.java

示例5: getAttributePSVIByName

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
AttributePSVI getAttributePSVIByName(String uri, String localname) {
    if (fAttributes != null) {
        Augmentations augs = fAttributes.getAugmentations(uri, localname);
        if (augs != null) {
            return (AttributePSVI) augs.getItem(Constants.ATTRIBUTE_PSVI);
        }
    }
    return null;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:10,代码来源:ValidatorHandlerImpl.java

示例6: reset

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
/**
 * Reset() 
 */
public void reset() {
    fValue.reset();
    fDeclaration = null;
    fTypeDecl = null;
    fSpecified = false;
    fValidationAttempted = AttributePSVI.VALIDATION_NONE;
    fValidity = AttributePSVI.VALIDITY_NOTKNOWN;
    fErrors = null;
    fValidationContext = null;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:14,代码来源:AttributePSVImpl.java

示例7: getSchemaDeterminedID

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
/**
 * Returns the schema-determined-ID.
 * 
 * 
 * @param attributes
 * @param index
 * @return A String containing the schema-determined ID. 
 * @throws XNIException
 */
public String getSchemaDeterminedID(XMLAttributes attributes, int index)
throws XNIException {
    Augmentations augs = attributes.getAugmentations(index);
    AttributePSVI attrPSVI = (AttributePSVI) augs
    .getItem(Constants.ATTRIBUTE_PSVI);
    
    if (attrPSVI != null) {
        // An element or attribute information item is a schema-determined 
        // ID if and only if one of the following is true:]
        
        // 1. It has a [member type definition] or [type definition] property 
        // whose value in turn has [name] equal to ID and [target namespace] 
        // equal to http://www.w3.org/2001/XMLSchema;
        
        // 2. It has a [base type definition] whose value has that [name] and [target namespace];
        
        // 3. It has a [base type definition] whose value has a [base type definition] 
        // whose value has that [name] and [target namespace], and so on following 
        // the [base type definition] property recursively;
        
        XSTypeDefinition typeDef = attrPSVI.getMemberTypeDefinition();
        if (typeDef != null) {
            typeDef = attrPSVI.getTypeDefinition();
        }
        
        // 
        if (typeDef != null && ((XSSimpleType) typeDef).isIDType()) {
            return attrPSVI.getSchemaNormalizedValue();
        }
        
        // 4 & 5 NA
    }
    
    return null;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:45,代码来源:ShortHandPointer.java

示例8: getAttributePSVIByName

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
public AttributePSVI getAttributePSVIByName(String uri, 
                                            String localname){
    return (AttributePSVI)fAttributesProxy.fAttributes.getAugmentations(uri, localname).getItem(Constants.ATTRIBUTE_PSVI);
}
 
开发者ID:BowlerHatLLC,项目名称:feathers-sdk,代码行数:5,代码来源:AbstractSAXParserMMImpl.java

示例9: getAttributePSVI

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
public AttributePSVI getAttributePSVI(int index) {
    return ((PSVIProvider)xmlReader).getAttributePSVI(index);
}
 
开发者ID:BowlerHatLLC,项目名称:feathers-sdk,代码行数:4,代码来源:SAXParserMMImpl.java

示例10: getAttributePSVIByName

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
public AttributePSVI getAttributePSVIByName(String uri, String localname) {
    return ((PSVIProvider)xmlReader).getAttributePSVIByName(uri, localname);
}
 
开发者ID:BowlerHatLLC,项目名称:feathers-sdk,代码行数:4,代码来源:SAXParserMMImpl.java

示例11: getAttributePSVI

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
public AttributePSVI getAttributePSVI(int index) {
    return (fSAXValidatorHelper != null) ? fSAXValidatorHelper.getAttributePSVI(index) : null;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:4,代码来源:ValidatorImpl.java

示例12: getAttributePSVIByName

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
public AttributePSVI getAttributePSVIByName(String uri, String localname) {
    return (fSAXValidatorHelper != null) ? fSAXValidatorHelper.getAttributePSVIByName(uri, localname) : null;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:4,代码来源:ValidatorImpl.java

示例13: startElement

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
public void startElement(QName element, XMLAttributes attributes,
        Augmentations augs) throws XNIException {
    Element elem;
    int attrCount = attributes.getLength();
    if (fDocumentImpl == null) {
        elem = fDocument.createElementNS(element.uri, element.rawname);
        for (int i = 0; i < attrCount; ++i) {
            attributes.getName(i, fAttributeQName);
            elem.setAttributeNS(fAttributeQName.uri, fAttributeQName.rawname, attributes.getValue(i));
        }
    }
    // If it's a Xerces DOM store type information for attributes, set idness, etc..
    else {
        elem = fDocumentImpl.createElementNS(element.uri, element.rawname, element.localpart);
        for (int i = 0; i < attrCount; ++i) {
            attributes.getName(i, fAttributeQName);
            AttrImpl attr = (AttrImpl) fDocumentImpl.createAttributeNS(fAttributeQName.uri, 
                    fAttributeQName.rawname, fAttributeQName.localpart);
            attr.setValue(attributes.getValue(i));
            elem.setAttributeNodeNS(attr);
            
            // write type information to this attribute
            AttributePSVI attrPSVI = (AttributePSVI) attributes.getAugmentations(i).getItem (Constants.ATTRIBUTE_PSVI);
            if (attrPSVI != null) {
                if (fStorePSVI) {
                    ((PSVIAttrNSImpl) attr).setPSVI(attrPSVI);
                }
                Object type = attrPSVI.getMemberTypeDefinition();
                if (type == null) {
                    type = attrPSVI.getTypeDefinition();
                    if (type != null) {
                        attr.setType (type);
                        if (((XSSimpleType) type).isIDType()) {
                            ((ElementImpl) elem).setIdAttributeNode (attr, true);
                        }
                    }
                }
                else {
                    attr.setType (type);
                    if (((XSSimpleType) type).isIDType()) {
                        ((ElementImpl) elem).setIdAttributeNode (attr, true);
                    }
                }
            }
            attr.setSpecified(attributes.isSpecified(i));
        }
    }
    append(elem);
    fCurrentNode = elem;
    if (fFragmentRoot == null) {
        fFragmentRoot = elem;
    }
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:54,代码来源:DOMResultBuilder.java

示例14: processPSVIAttribute

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
private void processPSVIAttribute(Augmentations augs) {
    if (augs == null)
        return;
    AttributePSVI attrPSVI =
        (AttributePSVI)augs.getItem(Constants.ATTRIBUTE_PSVI);
    if (attrPSVI != null) {
        sendElementEvent(
            "psv:validationAttempted",
            this.translateValidationAttempted(
                attrPSVI.getValidationAttempted()));
        // Would rather getValidationContext() return element info item.
        // This is not the same as XSV.
        sendElementEvent(
            "psv:validationContext",
            attrPSVI.getValidationContext());

        sendElementEvent(
            "psv:validity",
            this.translateValidity(attrPSVI.getValidity()));

        processPSVISchemaErrorCode(attrPSVI.getErrorCodes());
        sendElementEvent(
            "psv:schemaNormalizedValue",
            attrPSVI.getSchemaNormalizedValue());
        sendElementEvent(
            "psv:schemaSpecified",
            attrPSVI.getIsSchemaSpecified() ? "schema" : "infoset");
        sendElementEvent("psv:schemaDefault", attrPSVI.getSchemaDefault());

        processPSVITypeDefinitionRef(
            "psv:typeDefinition",
            attrPSVI.getTypeDefinition());
        processPSVITypeDefinitionRef(
            "psv:memberTypeDefinition",
            attrPSVI.getMemberTypeDefinition());

        if (attrPSVI.getAttributeDeclaration() == null) {
            sendElementEvent("psv:declaration");
        }
        else {
            sendIndentedElement("psv:declaration");
            processPSVIAttributeDeclarationRef(
                attrPSVI.getAttributeDeclaration());
            sendUnIndentedElement("psv:declaration");
        }
    }
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:48,代码来源:PSVIWriter.java

示例15: getAttributePSVI

import org.apache.xerces.xs.AttributePSVI; //导入依赖的package包/类
public AttributePSVI getAttributePSVI(int index){

        return (AttributePSVI)fAttributesProxy.fAttributes.getAugmentations(index).getItem(Constants.ATTRIBUTE_PSVI);
    }
 
开发者ID:BowlerHatLLC,项目名称:feathers-sdk,代码行数:5,代码来源:AbstractSAXParserMMImpl.java


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