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

com.thaiopensource.validate.nvdl.NvdlSchemaReceiverFactory 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.validate.nvdl;

import com.thaiopensource.util.PropertyMap;
import com.thaiopensource.validate.auto.SchemaReceiver;
import com.thaiopensource.validate.auto.SchemaReceiverFactory;
import com.thaiopensource.validate.Option;

/**
 * A Schema receiver factory that knows how to create NVDL schema receivers.
 */
public class NvdlSchemaReceiverFactory implements SchemaReceiverFactory {
  /**
   * Checks if the namespace is the NVDL namespace and if yes then it creates
   * a schema receiver, otherwise returns null.
   */
  public SchemaReceiver createSchemaReceiver(String namespaceUri, PropertyMap properties) {
    if (!SchemaImpl.NVDL_URI.equals(namespaceUri))
      return null;
    return new SchemaReceiverImpl(properties);
  }

  /**
   * No options handling, always returns null.
   */
  public Option getOption(String uri) {
    return null;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy