Class OGCCapabilities

    • Field Detail

      • SERVICE

        protected javax.xml.namespace.QName SERVICE
      • CAPABILITY

        protected javax.xml.namespace.QName CAPABILITY
      • VERSION

        protected javax.xml.namespace.QName VERSION
      • UPDATE_SEQUENCE

        protected javax.xml.namespace.QName UPDATE_SEQUENCE
      • version

        protected java.lang.String version
      • updateSequence

        protected java.lang.String updateSequence
      • eventReader

        protected javax.xml.stream.XMLEventReader eventReader
    • Constructor Detail

      • OGCCapabilities

        public OGCCapabilities​(java.lang.String namespaceURI,
                               java.lang.Object docSource)
        Create a new capabilities parser.
        Parameters:
        namespaceURI - the default namespace URI.
        docSource - the XML source. May be a filename, file, stream or other type allowed by WWXML.openEventReader(Object).
        Throws:
        java.lang.IllegalArgumentException - if the document source is null.
    • Method Detail

      • getDefaultNamespaceURI

        public abstract java.lang.String getDefaultNamespaceURI()
        Returns the default namespace URI. Must be overridden by subclasses to provide a specific URI. The default namespace is used to match XML elements found in the default namespace of the XML stream.
        Returns:
        the default namespace URI.
      • isRootElementName

        public abstract boolean isRootElementName​(javax.xml.namespace.QName name)
        Determines whether a specified element name is the root element name of the schema.
        Parameters:
        name - the name to test.
        Returns:
        true if the name is the schema's root element, otherwise false.
      • createReader

        protected javax.xml.stream.XMLEventReader createReader​(java.lang.Object docSource)
      • createParserContext

        protected XMLEventParserContext createParserContext​(javax.xml.stream.XMLEventReader reader)
      • allocate

        public XMLEventParser allocate​(XMLEventParserContext ctx,
                                       javax.xml.stream.events.XMLEvent event)
        Create a parser for a specified event.
        Overrides:
        allocate in class AbstractXMLEventParser
        Parameters:
        ctx - the current parser context.
        event - the event for which the parser is created. Only the event type is used; the new parser can operate on any event of that type.
        Returns:
        the new parser.
      • parse

        public OGCCapabilities parse​(java.lang.Object... args)
                              throws javax.xml.stream.XMLStreamException
        Starts document parsing. This method initiates parsing of the XML document and returns when the full capabilities document has been parsed.
        Parameters:
        args - optional arguments to pass to parsers of sub-elements.
        Returns:
        this if parsing is successful, otherwise null.
        Throws:
        javax.xml.stream.XMLStreamException - if an exception occurs while attempting to read the event stream.
      • doParseEventContent

        protected void doParseEventContent​(XMLEventParserContext ctx,
                                           javax.xml.stream.events.XMLEvent event,
                                           java.lang.Object... args)
                                    throws javax.xml.stream.XMLStreamException
        Description copied from class: AbstractXMLEventParser
        Parse an event's sub-elements.
        Overrides:
        doParseEventContent in class AbstractXMLEventParser
        Parameters:
        ctx - a current parser context.
        event - the event to parse.
        args - an optional list of arguments that may by used by subclasses.
        Throws:
        javax.xml.stream.XMLStreamException - if an exception occurs during event-stream reading.
      • doParseEventAttributes

        protected void doParseEventAttributes​(XMLEventParserContext ctx,
                                              javax.xml.stream.events.XMLEvent event,
                                              java.lang.Object... args)
        Description copied from class: AbstractXMLEventParser
        Parse an event's attributes.
        Overrides:
        doParseEventAttributes in class AbstractXMLEventParser
        Parameters:
        ctx - a current parser context.
        event - the event to parse.
        args - an optional list of arguments that may by used by subclasses.
      • getServiceInformation

        public OGCServiceInformation getServiceInformation()
        Returns the document's service information.
        Returns:
        the document's service information.
      • setServiceInformation

        protected void setServiceInformation​(OGCServiceInformation serviceInformation)
      • setCapabilityInformation

        protected void setCapabilityInformation​(OGCCapabilityInformation capabilityInformation)
      • getCapabilityInformation

        public OGCCapabilityInformation getCapabilityInformation()
        Returns the document's capability information.
        Returns:
        the document's capability information.
      • getVersion

        public java.lang.String getVersion()
        Returns the document's version number.
        Returns:
        the document's version number.
      • setVersion

        protected void setVersion​(java.lang.String version)
      • getUpdateSequence

        public java.lang.String getUpdateSequence()
        Returns the document's update sequence.
        Returns:
        the document's update sequence.
      • setUpdateSequence

        protected void setUpdateSequence​(java.lang.String updateSequence)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object