当前位置: 首页>>代码示例>>Java>>正文


Java XMLTypeValidator类代码示例

本文整理汇总了Java中org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator的典型用法代码示例。如果您正苦于以下问题:Java XMLTypeValidator类的具体用法?Java XMLTypeValidator怎么用?Java XMLTypeValidator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XMLTypeValidator类属于org.eclipse.emf.ecore.xml.type.util包,在下文中一共展示了XMLTypeValidator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: validateEPackage_WellFormedNsPrefix

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:LangleyStudios,项目名称:eclipse-avro,代码行数:33,代码来源:EcoreValidator.java

示例2: validateEPackage_WellFormedNsPrefix

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:markus1978,项目名称:clickwatch,代码行数:33,代码来源:EcoreValidator.java

示例3: init

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:LangleyStudios,项目名称:eclipse-avro,代码行数:47,代码来源:XMLTypePackageImpl.java

示例4: MqModuleValidator

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public MqModuleValidator()
{
  super();
  xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
 
开发者ID:Morgan-Stanley,项目名称:Saturn,代码行数:11,代码来源:MqModuleValidator.java

示例5: TypesValidator

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public TypesValidator()
{
  super();
  xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
 
开发者ID:Morgan-Stanley,项目名称:Saturn,代码行数:11,代码来源:TypesValidator.java

示例6: ConfigurationValidator

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public ConfigurationValidator ()
{
    super ();
    xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:12,代码来源:ConfigurationValidator.java

示例7: ToscaValidator

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public ToscaValidator() {
	super();
	xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
 
开发者ID:alexander-bergmayr,项目名称:caml2tosca,代码行数:11,代码来源:ToscaValidator.java

示例8: EsmConfigValidator

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EsmConfigValidator() {
	super();
	xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:11,代码来源:EsmConfigValidator.java

示例9: NupnValidator

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NupnValidator() {
	super();
	xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
 
开发者ID:lip6,项目名称:pnmlframework,代码行数:11,代码来源:NupnValidator.java

示例10: DbchangelogValidator

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public DbchangelogValidator() {
	super();
	xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
 
开发者ID:dzonekl,项目名称:LiquibaseEditor,代码行数:11,代码来源:DbchangelogValidator.java

示例11: PartnerValidator

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public PartnerValidator() {
	super();
	xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
 
开发者ID:GRA-UML,项目名称:tool,代码行数:11,代码来源:PartnerValidator.java

示例12: graValidator

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public graValidator() {
	super();
	xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
 
开发者ID:GRA-UML,项目名称:tool,代码行数:11,代码来源:graValidator.java

示例13: AttributeValidator

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc --> <!--
 * end-user-doc -->
 * @generated
 */
public AttributeValidator( )
{
	super( );
	xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:12,代码来源:AttributeValidator.java

示例14: ModelValidator

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public ModelValidator( )
{
	super( );
	xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:12,代码来源:ModelValidator.java

示例15: LayoutValidator

import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; //导入依赖的package包/类
/**
 * Creates an instance of the switch.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public LayoutValidator( )
{
	super( );
	xmlTypeValidator = XMLTypeValidator.INSTANCE;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:12,代码来源:LayoutValidator.java


注:本文中的org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。