Package com.ctc.wstx.util

Examples of com.ctc.wstx.util.PrefixedName


        return PrefixedName.valueOf(mContext.getCurrentElementName());
    }
   
    PrefixedName getAttrPName()
    {
        return new PrefixedName(mCurrAttrPrefix, mCurrAttrLocalName);
    }
View Full Code Here


        //boolean anyAdded = false;
       
        if (otherMap != null && otherMap.size() > 0) {
          for (Map.Entry<PrefixedName,DTDAttribute> me : otherMap.entrySet()) {
                PrefixedName key = me.getKey();
                // Should only add if no such attribute exists...
                if (!m.containsKey(key)) {
                    // can only use as is, if it's not a special attr
                    DTDAttribute newAttr = me.getValue();
                    List<DTDAttribute> specList;
View Full Code Here

    private DTDAttribute doAddAttribute(Map<PrefixedName,DTDAttribute> attrMap, InputProblemReporter rep,
                                        DTDAttribute attr, List<DTDAttribute> specList,
                                        boolean fullyValidate)
        throws XMLStreamException
    {
        PrefixedName attrName = attr.getName();

        // Maybe we already have it? If so, need to ignore
        DTDAttribute old = attrMap.get(attrName);
        if (old != null) {
            rep.reportProblem(null, ErrorConsts.WT_ATTR_DECL, ErrorConsts.W_DTD_DUP_ATTR,
View Full Code Here

            mIdDefs = new ElementIdMap();
        }

        int idType = datatype.getIdType();
        Location loc = mContext.getValidationLocation();
        PrefixedName elemPName = getElementPName();
        PrefixedName attrPName = getAttrPName();

        if (idType == Datatype.ID_TYPE_ID) {
            String idStr = idToken.literal.trim();
            ElementId eid = mIdDefs.addDefined(idStr, loc, elemPName, attrPName);
            // We can detect dups by checking if Location is the one we passed:
View Full Code Here

        return PrefixedName.valueOf(mContext.getCurrentElementName());
    }
   
    PrefixedName getAttrPName()
    {
        return new PrefixedName(mCurrAttrPrefix, mCurrAttrLocalName);
    }
View Full Code Here

            mIdDefs = new ElementIdMap();
        }

        int idType = datatype.getIdType();
        Location loc = mContext.getValidationLocation();
        PrefixedName elemPName = getElementPName();
        PrefixedName attrPName = getAttrPName();

        if (idType == Datatype.ID_TYPE_ID) {
            String idStr = idToken.literal.trim();
            ElementId eid = mIdDefs.addDefined(idStr, loc, elemPName, attrPName);
            // We can detect dups by checking if Location is the one we passed:
View Full Code Here

        return PrefixedName.valueOf(mContext.getCurrentElementName());
    }
   
    PrefixedName getAttrPName()
    {
        return new PrefixedName(mCurrAttrPrefix, mCurrAttrLocalName);
    }
View Full Code Here

    private DTDAttribute doAddAttribute(Map attrMap, InputProblemReporter rep,
                                        DTDAttribute attr, List specList,
                                        boolean fullyValidate)
        throws XMLStreamException
    {
        PrefixedName attrName = attr.getName();

        // Maybe we already have it? If so, need to ignore
        DTDAttribute old = (DTDAttribute) attrMap.get(attrName);
        if (old != null) {
            rep.reportProblem(null, ErrorConsts.WT_ATTR_DECL, ErrorConsts.W_DTD_DUP_ATTR,
View Full Code Here

        Bucket[] buckets = null;
        int mask = (tableSize - 1);

        for (int i = 0; i < len; ++i) {
            PrefixedName nk = names[i];
            int ix = (nk.hashCode() & mask);
            if (mNames[ix] == null) { // no collision
                mNames[ix] = nk;
            } else { // collision, need to add a bucket
                ix >>= 2;
View Full Code Here

     */
    public boolean contains(PrefixedName name)
    {
        PrefixedName[] hashArea = mNames;
        int index = name.hashCode() & (hashArea.length - 1);
        PrefixedName res = hashArea[index];

        if (res != null && res.equals(name)) {
            return true;
        }

        Bucket[] buckets = mBuckets;
        if (buckets != null) {
            for (Bucket bucket = buckets[index >> 2]; bucket != null;
                 bucket = bucket.getNext()) {
                res = bucket.getName();
                if (res.equals(name)) {
                    return true;
                }
            }
        }
        return false;
View Full Code Here

TOP

Related Classes of com.ctc.wstx.util.PrefixedName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.