All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.thaiopensource.resolver.xml.XMLDocumentIdentifier Maven / Gradle / Ivy

Go to download

Jing is a validator for RELAX NG and other schema languages. This project was taken from http://code.google.com/p/jing-trang and mavenized for inclusion in the Wicket Stuff HTML Validator. The code was taken from the 20091111 release.

There is a newer version: 1.11
Show newest version
package com.thaiopensource.resolver.xml;

import com.thaiopensource.resolver.Identifier;

/**
 * An Identifier for an XML document.
 */
public class XMLDocumentIdentifier extends Identifier {
  private final String namespaceUri;
  public static final String MEDIA_TYPE = "application/xml";

  /**
   *
   * @param href
   * @param base
   * @param namespaceUri the expected namespace URI of the root element of the XML document
   */
  public XMLDocumentIdentifier(String href, String base, String namespaceUri) {
    super(href, base);
    this.namespaceUri = namespaceUri;
  }

  /**
   *
   * @return the expected namespace name of root element; "" if no namespace is expected;
   * null if no information is available about the expected namespace name.
   */
  public String getNamespaceUri() {
    return namespaceUri;
  }

  public String getMediaType() {
    return MEDIA_TYPE;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy