Java 类org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator 实例源码

项目:eclipse-avro    文件:EcoreValidator.java   
/**
 * Validates the WellFormedNsPrefix constraint of '<em>EPackage</em>'.
 * <!-- begin-user-doc -->
 * The namespace prefix must be either the empty string
 * or a {@link XMLTypeValidator#validateNCName(String, DiagnosticChain, Map) valid NCName}
 * that does not start with any case combination of the three letters
 * <a href="http://www.w3.org/TR/REC-xml-names/#xmlReserved">"xml"</a>.
 * <!-- end-user-doc -->
 * @generated NOT
 */
public boolean validateEPackage_WellFormedNsPrefix(EPackage ePackage, DiagnosticChain diagnostics, Map<Object, Object> context)
{
  String nsPrefix = ePackage.getNsPrefix();
  boolean
    result = "".equals(nsPrefix) ||
      nsPrefix != null &&
        XMLTypeValidator.INSTANCE.validateNCName(nsPrefix, null, context) &&
        (!nsPrefix.toLowerCase().startsWith("xml") || XMLNamespacePackage.eNS_URI.equals(ePackage.getNsURI()));
  if (!result && diagnostics != null)
  {
    diagnostics.add
      (createDiagnostic
        (Diagnostic.ERROR,
         DIAGNOSTIC_SOURCE,
         WELL_FORMED_NS_PREFIX,
         "_UI_EPackageNsPrefixNotWellFormed_diagnostic",
         new Object[] { nsPrefix },
         new Object[] { ePackage, EcorePackage.Literals.EPACKAGE__NS_PREFIX },
         context));
  }
  return result;
}
项目:clickwatch    文件:EcoreValidator.java   
/**
 * Validates the WellFormedNsPrefix constraint of '<em>EPackage</em>'.
 * <!-- begin-user-doc -->
 * The namespace prefix must be either the empty string
 * or a {@link XMLTypeValidator#validateNCName(String, DiagnosticChain, Map) valid NCName}
 * that does not start with any case combination of the three letters
 * <a href="http://www.w3.org/TR/REC-xml-names/#xmlReserved">"xml"</a>.
 * <!-- end-user-doc -->
 * @generated NOT
 */
public boolean validateEPackage_WellFormedNsPrefix(EPackage ePackage, DiagnosticChain diagnostics, Map<Object, Object> context)
{
  String nsPrefix = ePackage.getNsPrefix();
  boolean
    result = "".equals(nsPrefix) ||
      nsPrefix != null &&
        XMLTypeValidator.INSTANCE.validateNCName(nsPrefix, null, context) &&
        (!nsPrefix.toLowerCase().startsWith("xml") || XMLNamespacePackage.eNS_URI.equals(ePackage.getNsURI()));
  if (!result && diagnostics != null)
  {
    diagnostics.add
      (createDiagnostic
        (Diagnostic.ERROR,
         DIAGNOSTIC_SOURCE,
         WELL_FORMED_NS_PREFIX,
         "_UI_EPackageNsPrefixNotWellFormed_diagnostic",
         new Object[] { nsPrefix },
         new Object[] { ePackage },
         context));
  }
  return result;
}
项目:eclipse-avro    文件:XMLTypePackageImpl.java   
/**
 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
 * 
 * <p>This method is used to initialize {@link XMLTypePackage#eINSTANCE} when that field is accessed.
 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @see #eNS_URI
 * @see #createPackageContents()
 * @see #initializePackageContents()
 * @generated
 */
public static XMLTypePackage init()
{
  if (isInited) return (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);

  // Obtain or create and register package
  XMLTypePackageImpl theXMLTypePackage = (XMLTypePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof XMLTypePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new XMLTypePackageImpl());

  isInited = true;

  // Create package meta-data objects
  theXMLTypePackage.createPackageContents();

  // Initialize created meta-data
  theXMLTypePackage.initializePackageContents();

  // Register package validator
  EValidator.Registry.INSTANCE.put
    (theXMLTypePackage, 
     new EValidator.Descriptor()
     {
       public EValidator getEValidator()
       {
         return XMLTypeValidator.INSTANCE;
       }
     });

  // Mark meta-data to indicate it can't be changed
  theXMLTypePackage.freeze();


  // Update the registry and return the package
  EPackage.Registry.INSTANCE.put(XMLTypePackage.eNS_URI, theXMLTypePackage);
  return theXMLTypePackage;
}
项目:clickwatch    文件:XMLTypePackageImpl.java   
/**
 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
 * 
 * <p>This method is used to initialize {@link XMLTypePackage#eINSTANCE} when that field is accessed.
 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @see #eNS_URI
 * @see #createPackageContents()
 * @see #initializePackageContents()
 * @generated
 */
public static XMLTypePackage init()
{
  if (isInited) return (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);

  // Obtain or create and register package
  XMLTypePackageImpl theXMLTypePackage = (XMLTypePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof XMLTypePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new XMLTypePackageImpl());

  isInited = true;

  // Create package meta-data objects
  theXMLTypePackage.createPackageContents();

  // Initialize created meta-data
  theXMLTypePackage.initializePackageContents();

  // Register package validator
  EValidator.Registry.INSTANCE.put
    (theXMLTypePackage, 
     new EValidator.Descriptor()
     {
       public EValidator getEValidator()
       {
         return XMLTypeValidator.INSTANCE;
       }
     });

  // Mark meta-data to indicate it can't be changed
  theXMLTypePackage.freeze();


  // Update the registry and return the package
  EPackage.Registry.INSTANCE.put(XMLTypePackage.eNS_URI, theXMLTypePackage);
  return theXMLTypePackage;
}
项目:Saturn    文件:MqModuleValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public MqModuleValidator()
{
  super();
  xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:Saturn    文件:TypesValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public TypesValidator()
{
  super();
  xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:neoscada    文件:ConfigurationValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public ConfigurationValidator ()
{
    super ();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:neoscada    文件:ConfigurationValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public ConfigurationValidator ()
{
    super ();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:caml2tosca    文件:ToscaValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public ToscaValidator() {
    super();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:OpenSPIFe    文件:EsmConfigValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EsmConfigValidator() {
    super();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:pnmlframework    文件:NupnValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NupnValidator() {
    super();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:LiquibaseEditor    文件:DbchangelogValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public DbchangelogValidator() {
    super();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:tool    文件:PartnerValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public PartnerValidator() {
    super();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:tool    文件:PartnerValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public PartnerValidator() {
    super();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:tool    文件:graValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public graValidator() {
    super();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:birt    文件:AttributeValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc --> <!--
 * end-user-doc -->
 * @generated
 */
public AttributeValidator( )
{
    super( );
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:birt    文件:ModelValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public ModelValidator( )
{
    super( );
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:birt    文件:LayoutValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public LayoutValidator( )
{
    super( );
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:eclipse-avro    文件:XMLNamespaceValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public XMLNamespaceValidator()
{
  super();
  xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:eclipse-avro    文件:EcoreValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EcoreValidator()
{
  super();
  xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:citygml4emf    文件:Smil20Validator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public Smil20Validator() {
    super();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:citygml4emf    文件:CitygmlValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public CitygmlValidator() {
    super();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
    gmlValidator = GmlValidator.INSTANCE;
}
项目:citygml4emf    文件:GmlValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public GmlValidator() {
    super();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:NIEM-Modeling-Tool    文件:CatValidator.java   
/**
 * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated
 */
public CatValidator() {
    super();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:clickwatch    文件:XMLNamespaceValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public XMLNamespaceValidator()
{
  super();
  xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
项目:clickwatch    文件:EcoreValidator.java   
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EcoreValidator()
{
  super();
  xmlTypeValidator = XMLTypeValidator.INSTANCE;
}