本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}