本文整理了Java中org.exolab.castor.mapping.Mapping.getRoot()
方法的一些代码示例,展示了Mapping.getRoot()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mapping.getRoot()
方法的具体详情如下:
包路径:org.exolab.castor.mapping.Mapping
类名称:Mapping
方法名:getRoot
[英]Get the loaded mapping.
[中]获取加载的映射。
代码示例来源:origin: org.codehaus.castor/castor-ddlgen
/**
* Return the ClassMapping which associated with parameter name.
*
* @param name Name of class to get ClassMapping of.
* @return ClassMapping of the named class or <code>null</code> if no such
* ClassMapping was found.
*/
public ClassMapping getClassMappingByName(final String name) {
Enumeration<? extends ClassMapping> ec = _mapping.getRoot().enumerateClassMapping();
while (ec.hasMoreElements()) {
ClassMapping cm = ec.nextElement();
String cmName = cm.getName();
if ((cmName != null) && cmName.equals(name)) { return cm; }
}
return null;
}
代码示例来源:origin: org.codehaus.castor/castor-ddlgen
MappingRoot root = _mapping.getRoot();
_schema = _schemaFactory.createSchema();
_schema.setConfiguration(_configuration);
代码示例来源:origin: org.codehaus.castor/com.springsource.org.castor
loader.setAllowRedefinitions(_allowRedefinitions);
loader.setInternalContext(_internalContext);
loader.loadMapping(mapping.getRoot(), param);
return loader;
代码示例来源:origin: org.codehaus.castor/castor-xml
/**
* Returns a mapping resolver for the suitable engine. The engine's specific mapping loader is
* created and used to create engine specific descriptors, returning a suitable mapping resolver.
* The mapping resolver is cached in memory and returned in subsequent method calls.
*
* @param mapping The mapping to load and resolve.
* @param bindingType The binding type to read from mapping.
* @param param Arbitrary parameter that is to be passed to resolver.loadMapping().
* @return A mapping resolver
* @throws MappingException A mapping error occured preventing descriptors from being generated
* from the loaded mapping.
*/
public MappingLoader getMappingLoader(final Mapping mapping, final BindingType bindingType,
final Object param) throws MappingException {
synchronized (this) {
Iterator iter = mapping.getMappingSources().iterator();
while (iter.hasNext()) {
MappingSource source = (MappingSource) iter.next();
loadMappingInternal(mapping, source.getResolver(), source.getSource());
}
AbstractMappingLoader loader;
loader = (AbstractMappingLoader) _registry.getMappingLoader("CastorXmlMapping", bindingType);
loader.setClassLoader(mapping.getClassLoader());
loader.setAllowRedefinitions(_allowRedefinitions);
loader.setInternalContext(_internalContext);
loader.loadMapping(mapping.getRoot(), param);
return loader;
}
}
代码示例来源:origin: org.codehaus.castor/castor-xml
MappingRoot root = mapping.getRoot();
_idResolver.setMapping(root);
代码示例来源:origin: org.codehaus.castor/com.springsource.org.castor
MappingRoot root = mapping.getRoot();
_idResolver.setMapping(root);
内容来源于网络,如有侵权,请联系作者删除!