Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


org.eclipse.emf.validation.util
Class XmlConfig

java.lang.Object
  extended by 
org.eclipse.emf.validation.util.XmlConfig

public class XmlConfig
extends Object

Static utilities for loading the constraint provider configurations from XML documents.

This class is not intended to be used outside of the validation framework.


Field Summary
static  String A_CACHE
           
static  String A_CATEGORIES
           
static  String A_CLASS
           
static  String A_ENABLED
           
static  String A_ID
           
static  String A_LANG
           
static  String A_MANDATORY
           
static  String A_MODE
           
static  String A_NAME
           
static  String A_NAMESPACE_URI
           
static  String A_PATH
           
static  String A_SEVERITY
           
static  String A_STATUS_CODE
           
static  String A_VALUE
           
static  String E_CATEGORY
           
static  String E_CONSTRAINT
           
static  String E_CONSTRAINT_PROVIDER
           
static  String E_CONSTRAINTS
           
static  String E_CUSTOM_EVENT
           
static  String E_DESCRIPTION
           
static  String E_EVENT
           
static  String E_FEATURE
           
static  String E_INCLUDE
           
static  String E_INCLUDED_CONSTRAINTS
           
static  String E_MESSAGE
           
static  String E_PACKAGE
           
static  String E_PARAM
           
static  String E_TARGET
           
 
Method Summary
static void flushResourceBundles ()
          Flushes the resource bundles that were loaded for localization of strings in an XML constraint provider's XML constraint declarations.
static  IConfigurationElement[] getEvents ( IConfigurationElement config)
          Obtains an array including all of the event and customEvent children of the specified configuration element.
static  String getParameter ( IConfigurationElement constraint, String name)
          Gets the value of the named parameter on the specified constraint configuration element.
static  String[] getParameterValues ( IConfigurationElement constraint, String name)
          Gets the values of the named parameter in the order in which they appear on the specified constraint configuration element.
static  IConfigurationElement load ( IConfigurationElement parent, URL url)
          Loads a <constraints> element from the specified url.
static  IConfigurationElement parseConstraintsWithIncludes ( IConfigurationElement constraints)
          Parses a <constraints> element into an Eclipse configuration element data structure, with support for including constraints from separate XML files.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

E_CONSTRAINT_PROVIDER

public static final 
String E_CONSTRAINT_PROVIDER
See Also:
Constant Field Values

A_ID

public static final 
String A_ID
See Also:
Constant Field Values

A_MODE

public static final 
String A_MODE
See Also:
Constant Field Values

A_CACHE

public static final 
String A_CACHE
See Also:
Constant Field Values

E_PACKAGE

public static final 
String E_PACKAGE
See Also:
Constant Field Values

A_NAMESPACE_URI

public static final 
String A_NAMESPACE_URI
See Also:
Constant Field Values

E_CONSTRAINTS

public static final 
String E_CONSTRAINTS
See Also:
Constant Field Values

A_CATEGORIES

public static final 
String A_CATEGORIES
See Also:
Constant Field Values

E_INCLUDED_CONSTRAINTS

public static final 
String E_INCLUDED_CONSTRAINTS
See Also:
Constant Field Values

E_CONSTRAINT

public static final 
String E_CONSTRAINT
See Also:
Constant Field Values

A_LANG

public static final 
String A_LANG
See Also:
Constant Field Values

A_SEVERITY

public static final 
String A_SEVERITY
See Also:
Constant Field Values

A_STATUS_CODE

public static final 
String A_STATUS_CODE
See Also:
Constant Field Values

A_CLASS

public static final 
String A_CLASS
See Also:
Constant Field Values

E_INCLUDE

public static final 
String E_INCLUDE
See Also:
Constant Field Values

A_PATH

public static final 
String A_PATH
See Also:
Constant Field Values

E_TARGET

public static final 
String E_TARGET
See Also:
Constant Field Values

E_EVENT

public static final 
String E_EVENT
See Also:
Constant Field Values

E_CUSTOM_EVENT

public static final 
String E_CUSTOM_EVENT
See Also:
Constant Field Values

A_NAME

public static final 
String A_NAME
See Also:
Constant Field Values

E_FEATURE

public static final 
String E_FEATURE
See Also:
Constant Field Values

E_DESCRIPTION

public static final 
String E_DESCRIPTION
See Also:
Constant Field Values

E_MESSAGE

public static final 
String E_MESSAGE
See Also:
Constant Field Values

E_PARAM

public static final 
String E_PARAM
See Also:
Constant Field Values

A_VALUE

public static final 
String A_VALUE
See Also:
Constant Field Values

E_CATEGORY

public static final 
String E_CATEGORY
See Also:
Constant Field Values

A_MANDATORY

public static final 
String A_MANDATORY
See Also:
Constant Field Values

A_ENABLED

public static final 
String A_ENABLED
See Also:
Constant Field Values
Method Detail

parseConstraintsWithIncludes

public static 
IConfigurationElement parseConstraintsWithIncludes(
IConfigurationElement constraints)
                                                          throws 
CoreException
Parses a <constraints> element into an Eclipse configuration element data structure, with support for including constraints from separate XML files.

Parameters:
constraints - an Eclipse configuration element obtained either from Eclipse's extension point parser or from this utility class
Returns:
the Eclipse-ish representation of the XML constraint configurations
Throws:
CoreException - if there is any problem either in accessing an existing configuration element or in parsing the XML to create new ones

getParameter

public static 
String getParameter(
IConfigurationElement constraint,
                                  
String name)
Gets the value of the named parameter on the specified constraint configuration element. If the parameter occurs more than once, only the first name will be retrieved.

Parameters:
constraint - the <constraint> configuration element
name - the name of the parameter to retrieve
Returns:
the parameter's value, or null if no such parameter is defined
See Also:
getParameterValues(org.eclipse.core.runtime.IConfigurationElement, java.lang.String)

getParameterValues

public static 
String[] getParameterValues(
IConfigurationElement constraint,
                                          
String name)
Gets the values of the named parameter in the order in which they appear on the specified constraint configuration element.

Parameters:
constraint - the <constraint> configuration element
name - the name of the parameter to retrieve
Returns:
the parameter's values, in order. Will be an empty array (not null) if no occurrences of the parameter are found
See Also:
getParameter(org.eclipse.core.runtime.IConfigurationElement, java.lang.String)

load

public static 
IConfigurationElement load(
IConfigurationElement parent,
                                         
URL url)
                                  throws 
CoreException
Loads a <constraints> element from the specified url.

Parameters:
parent - the configuration element which is to be the parent of the new <constraints> element
url - the location of the document defining the <constraints> element
Returns:
the configuration element representing the XML document
Throws:
CoreException - on any problem accessing a configuration element or parsing an XML file

flushResourceBundles

public static void flushResourceBundles()
Flushes the resource bundles that were loaded for localization of strings in an XML constraint provider's XML constraint declarations.


getEvents

public static 
IConfigurationElement[] getEvents(
IConfigurationElement config)
Obtains an array including all of the event and customEvent children of the specified configuration element.

Parameters:
config - a configuration element
Returns:
its event children
Since:
1.1

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire