Package javax.xml.stream.events

Examples of javax.xml.stream.events.EntityDeclaration


          text.append(characters.getData());
          break;
        }
        case XMLStreamConstants.ENTITY_REFERENCE: {
          final EntityReference entityReference = (EntityReference)event;
          final EntityDeclaration declaration = entityReference.getDeclaration();
          text.append(declaration.getReplacementText());
          break;
        }
        case XMLStreamConstants.COMMENT:
        case XMLStreamConstants.PROCESSING_INSTRUCTION: {
          //Ignore
View Full Code Here


    public ESBStaxEntityReference(final EntityReference entityReference)
    {
        super(entityReference) ;
       
        final EntityDeclaration declaration = entityReference.getDeclaration() ;
        this.declaration = (declaration == null ? null : new ESBStaxEntityDeclaration(declaration)) ;
        name = entityReference.getName() ;
    }
View Full Code Here

            String systemId = null;
            String publicId = null;
            String baseURI = null;
            if (ent instanceof EntityDeclaration) {
                // This is what we would expect from the StAX API spec
                EntityDeclaration ed = (EntityDeclaration)ent;
                name = ed.getName();
                systemId = ed.getSystemId();
                publicId = ed.getPublicId();
                baseURI = ed.getBaseURI();
            } else if (ent.getClass().getName().equals("com.ctc.wstx.ent.UnparsedExtEntity")) {
                // Woodstox 3.0.0 returns this: use introspection to get the data we need
                try {
                    Class woodstoxClass = ent.getClass();
                    Class[] noArgs = new Class[0];
View Full Code Here

            String systemId = null;
            String publicId = null;
            String baseURI = null;
            if (ent instanceof EntityDeclaration) {
                // This is what we would expect from the StAX API spec
                EntityDeclaration ed = (EntityDeclaration)ent;
                name = ed.getName();
                systemId = ed.getSystemId();
                publicId = ed.getPublicId();
                baseURI = ed.getBaseURI();
            } else if (ent.getClass().getName().equals("com.ctc.wstx.ent.UnparsedExtEntity")) {
                // Woodstox 3.0.0 returns this: use introspection to get the data we need
                try {
                    Class woodstoxClass = ent.getClass();
                    Class[] noArgs = new Class[0];
View Full Code Here

        return false;
    }

    public boolean isEntityUnparsed(String name) {
        if (fEntities != null) {
            EntityDeclaration entityDecl = (EntityDeclaration) fEntities.get(name);
            // If the entity is associated with a notation then it must be an unparsed entity.
            if (entityDecl != null) {
                return (entityDecl.getNotationName() != null);
            }
        }
        return false;
    }
View Full Code Here

        if (size > 0) {
            if (fEntities == null) {
                fEntities = new HashMap();
            }
            for (int i = 0; i < size; ++i) {
                EntityDeclaration decl = (EntityDeclaration) entityDecls.get(i);
                fEntities.put(decl.getName(), decl);
            }
        }
    }
View Full Code Here

    public EntityReference allocateEntityReference(XMLStreamReader reader)
            throws XMLStreamException {

        Location location = createStableLocation(reader);
        String name = reader.getLocalName();
        EntityDeclaration decl = determineEntityDeclaration(name, reader);

        return new EntityReferenceEvent(name, decl, location);

    }
View Full Code Here

            String systemId = null;
            String publicId = null;
            String baseURI = null;
            if (ent instanceof EntityDeclaration) {
                // This is what we would expect from the StAX API spec
                EntityDeclaration ed = (EntityDeclaration)ent;
                name = ed.getName();
                systemId = ed.getSystemId();
                publicId = ed.getPublicId();
                baseURI = ed.getBaseURI();
            } else if (ent.getClass().getName().equals("com.ctc.wstx.ent.UnparsedExtEntity")) {
                // Woodstox 3.0.0 returns this: use introspection to get the data we need
                try {
                    Class woodstoxClass = ent.getClass();
                    Class[] noArgs = new Class[0];
View Full Code Here

            String systemId = null;
            String publicId = null;
            String baseURI = null;
            if (ent instanceof EntityDeclaration) {
                // This is what we would expect from the StAX API spec
                EntityDeclaration ed = (EntityDeclaration)ent;
                name = ed.getName();
                systemId = ed.getSystemId();
                publicId = ed.getPublicId();
                baseURI = ed.getBaseURI();
            } else if (ent.getClass().getName().equals("com.ctc.wstx.ent.UnparsedExtEntity")) {
                // Woodstox 3.0.0 returns this: use introspection to get the data we need
                try {
                    Class woodstoxClass = ent.getClass();
                    Class[] noArgs = new Class[0];
View Full Code Here

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

        if (!(o instanceof EntityDeclaration)) return false;

        EntityDeclaration other = (EntityDeclaration) o;
        return stringsWithNullsEqual(getName(), other.getName())
            && stringsWithNullsEqual(getBaseURI(), other.getBaseURI())
            && stringsWithNullsEqual(getNotationName(), other.getNotationName())
            && stringsWithNullsEqual(getPublicId(), other.getPublicId())
            && stringsWithNullsEqual(getReplacementText(), other.getReplacementText())
            && stringsWithNullsEqual(getSystemId(), other.getSystemId())
            ;
    }
View Full Code Here

TOP

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

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.