Package javax.xml.stream.events

Examples of javax.xml.stream.events.NotationDeclaration


        XMLStreamReader sr = getReader(UNPARSED_ENTITY_XML, true);
        assertTokenType(DTD, sr.next());
        List l = (List) sr.getProperty("javax.xml.stream.notations");
        assertNotNull(l);
        assertEquals(1, l.size());
        NotationDeclaration nd = (NotationDeclaration) l.get(0);
        assertEquals("mynot", nd.getName());
    }
View Full Code Here


         * internal subset (prior to this parsing which then would external
         * subset). This is needed to know if the subset can be cached or
         * not.
         */
        if (mPredefdNotations != null) {
            NotationDeclaration decl = mPredefdNotations.get(id);
            if (decl != null) {
                mUsesPredefdNotations = true;
                return decl.getName();
            }
        }

        NotationDeclaration decl = (mNotations == null) ? null :mNotations.get(id);
        if (decl == null) {
            // In validating mode, this may be a problem (otherwise not)
            if (mCfgFullyValidating) {
                if (mNotationForwardRefs == null) {
                    mNotationForwardRefs = new LinkedHashMap<String,Location>();
                }
                mNotationForwardRefs.put(id, refLoc);
            }
            return id;
        }
        return decl.getName();
    }
View Full Code Here

        /* Ok, event needs to know its exact starting point (opening '<'
         * char), let's get that info now (note: data has been preserved
         * earlier)
         */
        Location evtLoc = getStartLocation();
        NotationDeclaration nd = new WNotationDeclaration(evtLoc, id, pubId, sysId, baseURL);

        // Any definitions from the internal subset?
        if (mPredefdNotations != null) {
            NotationDeclaration oldDecl = (NotationDeclaration) mPredefdNotations.get(id);
            if (oldDecl != null) { // oops, a problem!
                DTDSubsetImpl.throwNotationException(oldDecl, nd);
            }
        }

        HashMap m = mNotations;
        if (m == null) {
            /* Let's try to get insert-ordered Map, to be able to
             * report redefinition problems in proper order when validating
             * subset compatibility
             */
            mNotations = m = new LinkedHashMap();
        } else {
            NotationDeclaration oldDecl = (NotationDeclaration) m.get(id);
            if (oldDecl != null) { // oops, a problem!
                DTDSubsetImpl.throwNotationException(oldDecl, nd);
            }
        }
        // Does this resolve a dangling reference?
View Full Code Here

         * internal subset (prior to this parsing which then would external
         * subset). This is needed to know if the subset can be cached or
         * not.
         */
        if (mPredefdNotations != null) {
            NotationDeclaration decl = (NotationDeclaration) mPredefdNotations.get(id);
            if (decl != null) {
                mUsesPredefdNotations = true;
                return decl.getName();
            }
        }

        NotationDeclaration decl = (mNotations == null) ? null :
            (NotationDeclaration) mNotations.get(id);
        if (decl == null) {
            // In validating mode, this may be a problem (otherwise not)
            if (mCfgFullyValidating) {
                if (mNotationForwardRefs == null) {
                    mNotationForwardRefs = new LinkedHashMap();
                }
                mNotationForwardRefs.put(id, refLoc);
            }
            return id;
        }
        return decl.getName();
    }
View Full Code Here

    if (o == null)
      return false;
    if (this == o)
      return true;

    NotationDeclaration decl = (NotationDeclaration) o;
   
    return getName().equals(decl.getName()) &&
           getPublicId().equals(decl.getPublicId()) &&
           getSystemId().equals(decl.getSystemId());
  }
View Full Code Here

        /* Ok, event needs to know its exact starting point (opening '<'
         * char), let's get that info now (note: data has been preserved
         * earlier)
         */
        Location evtLoc = getStartLocation();
        NotationDeclaration nd = new WNotationDeclaration(evtLoc, id, pubId, sysId, baseURL);

        // Any definitions from the internal subset?
        if (mPredefdNotations != null) {
            NotationDeclaration oldDecl = (NotationDeclaration) mPredefdNotations.get(id);
            if (oldDecl != null) { // oops, a problem!
                DTDSubsetImpl.throwNotationException(oldDecl, nd);
            }
        }

        HashMap m = mNotations;
        if (m == null) {
            /* Let's try to get insert-ordered Map, to be able to
             * report redefinition problems in proper order when validating
             * subset compatibility
             */
            mNotations = m = new LinkedHashMap();
        } else {
            NotationDeclaration oldDecl = (NotationDeclaration) m.get(id);
            if (oldDecl != null) { // oops, a problem!
                DTDSubsetImpl.throwNotationException(oldDecl, nd);
            }
        }
        // Does this resolve a dangling reference?
View Full Code Here

         * internal subset (prior to this parsing which then would external
         * subset). This is needed to know if the subset can be cached or
         * not.
         */
        if (mPredefdNotations != null) {
            NotationDeclaration decl = (NotationDeclaration) mPredefdNotations.get(id);
            if (decl != null) {
                mUsesPredefdNotations = true;
                return decl.getName();
            }
        }

        NotationDeclaration decl = (mNotations == null) ? null :
            (NotationDeclaration) mNotations.get(id);
        if (decl == null) {
            // In validating mode, this may be a problem (otherwise not)
            if (mCfgFullyValidating) {
                if (mNotationForwardRefs == null) {
                    mNotationForwardRefs = new LinkedHashMap();
                }
                mNotationForwardRefs.put(id, refLoc);
            }
            return id;
        }
        return decl.getName();
    }
View Full Code Here

    if (o == null)
      return false;
    if (this == o)
      return true;

    NotationDeclaration decl = (NotationDeclaration) o;
   
    return getName().equals(decl.getName()) &&
           getPublicId().equals(decl.getPublicId()) &&
           getSystemId().equals(decl.getSystemId());
  }
View Full Code Here

TOP

Related Classes of javax.xml.stream.events.NotationDeclaration

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.