本文整理了Java中org.codehaus.modello.model.Model
类的一些代码示例,展示了Model
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model
类的具体详情如下:
包路径:org.codehaus.modello.model.Model
类名称:Model
暂无
代码示例来源:origin: org.codehaus.modello/modello-plugin-dom4j
private void writeAllClassesParser( Model objectModel, JClass jClass )
{
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ), getGeneratedVersion() );
for ( ModelClass clazz : getClasses( objectModel ) )
{
writeClassParser( clazz, jClass, root.getName().equals( clazz.getName() ) );
}
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-store
context.put( "package", model.getDefaultPackageName( false, getGeneratedVersion() ) );
String packageName = model.getDefaultPackageName( false, getGeneratedVersion() );
File interfaceFile = new File( packageFile, model.getName() + "Store.java" );
File exceptionFile = new File( packageFile, model.getName() + "StoreException.java" );
代码示例来源:origin: org.codehaus.modello/modello-core
public ModelMetadata getMetadata( String key )
{
return getMetadata( ModelMetadata.class, key );
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-jpox
for ( Iterator it = model.getClasses( getGeneratedVersion() ).iterator(); it.hasNext(); )
if ( packageName.equals( model.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() ) ) )
代码示例来源:origin: org.codehaus.modello/modello-plugin-converters
String root = objectModel.getRoot( getGeneratedVersion() );
ModelClass rootClass = objectModel.getClass( root, getGeneratedVersion() );
String basePackage = objectModel.getDefaultPackageName( false, null );
String packageName = basePackage + ".convert";
代码示例来源:origin: org.codehaus.modello/modello-core
protected boolean isClassInModel( String fieldType, Model model )
{
try
{
return model.getClass( fieldType, generatedVersion ) != null;
}
catch ( Exception e )
{
}
return false;
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-xdoc
File f = new File( directory, objectModel.getId() + ".xml" );
writeTextElement( w, "title", objectModel.getName() );
w.addAttribute( "name", objectModel.getName() );
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ), getGeneratedVersion() );
代码示例来源:origin: org.codehaus.modello/modello-plugin-xsd
File f = new File( directory, objectModel.getId() + "-" + getGeneratedVersion() + ".xsd" );
w.addAttribute( "elementFormDefault", "qualified" );
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ),
getGeneratedVersion() );
int initialCapacity = objectModel.getClasses( getGeneratedVersion() ).size();
writeComplexTypeDescriptor( w, objectModel, root, new HashSet<ModelClass>( initialCapacity ) );
代码示例来源:origin: org.codehaus.modello/modello-plugin-stax
private void writeDetermineVersionMethod( JClass jClass, Model objectModel )
throws ModelloException
VersionDefinition versionDefinition = objectModel.getVersionDefinition();
XmlModelMetadata xmlModelMetadata = (XmlModelMetadata) objectModel.getMetadata( XmlModelMetadata.ID );
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ),
getGeneratedVersion() );
ModelField field = root.getField( value, getGeneratedVersion() );
代码示例来源:origin: org.codehaus.modello/modello-core
/**
* @deprecated This shouldn't be used, anything querying the model should read the
* package of the class. Use getDefaultPackageName(..).
*/
public String getPackageName( boolean withVersion, Version version )
{
return getDefaultPackageName( withVersion, version );
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-stax
String packageName = objectModel.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() )
+ ".io.stax";
ModelClass root = objectModel.getClass( objectModel.getRoot( getGeneratedVersion() ), getGeneratedVersion() );
JClass rootType = new JClass( root.getName() );
sc.add( "}" );
VersionDefinition versionDefinition = objectModel.getVersionDefinition();
if ( versionDefinition != null && versionDefinition.isNamespaceType() )
代码示例来源:origin: org.codehaus.modello/modello-plugin-jpox
JPoxModelMetadata metadata = (JPoxModelMetadata) model.getMetadata( JPoxModelMetadata.ID );
File packageJdo = null;
String packageName = model.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() );
String dir = StringUtils.replace( packageName, '.', '/' );
File directory = new File( getOutputDirectory(), dir );
代码示例来源:origin: org.codehaus.modello/modello-plugin-xdoc
XmlModelMetadata xmlModelMetadata = (XmlModelMetadata) modelClass.getModel().getMetadata( XmlModelMetadata.ID );
ModelClass fieldModelClass = getModel().getClass( assoc.getTo(), getGeneratedVersion() );
代码示例来源:origin: org.codehaus.modello/modello-plugin-converters
String packageName = objectModel.getDefaultPackageName( true, fromVersion ) + ".convert";
basicConverterClass.addInterface( conversionInterface );
VersionDefinition versionDefinition = objectModel.getVersionDefinition();
for ( ModelClass modelClass : objectModel.getClasses( fromVersion ) )
代码示例来源:origin: org.codehaus.modello/modello-core
public void validateElement()
throws ModelValidationException
{
// Check if superClass exists
if ( hasSuperClass() )
{
try
{
getModel().getClass( superClass, getVersionRange() );
isInternalSuperClass = true;
}
catch ( ModelloRuntimeException e )
{
isInternalSuperClass = false;
}
}
if ( getModel().getDefault( ModelDefault.CHECK_DEPRECATION ).getBoolean() )
{
if ( ! Version.INFINITE.equals( getVersionRange().getToVersion() )
&& getDeprecatedVersion() == null )
{
throw new ModelValidationException( "You must define the deprecated version of '" + getName() + "' class." );
}
}
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-jackson
String packageName = objectModel.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() )
+ ".io.jackson";
jClass.addField( factoryField );
String root = objectModel.getRoot( getGeneratedVersion() );
代码示例来源:origin: org.codehaus.modello/modello-plugin-java
protected List<ModelClass> getClasses( Model model )
{
List<ModelClass> modelClasses = new ArrayList<ModelClass>();
for ( ModelClass modelClass : model.getClasses( getGeneratedVersion() ) )
{
if ( isRelevant( modelClass ) )
{
modelClasses.add( modelClass );
}
}
return modelClasses;
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-java
ModelClass locationTrackerClass = objectModel.getLocationTracker( getGeneratedVersion() );
ModelClass sourceTrackerClass = objectModel.getSourceTracker( getGeneratedVersion() );
for ( ModelInterface modelInterface : objectModel.getInterfaces( getGeneratedVersion() ) )
for ( ModelClass modelClass : objectModel.getClasses( getGeneratedVersion() ) )
代码示例来源:origin: org.codehaus.modello/modello-plugin-xml
protected String getFileName( String suffix )
{
String name = getModel().getName();
return name + suffix;
}
代码示例来源:origin: org.codehaus.modello/modello-core
public String getDefaultPackageName( boolean withVersion, Version version )
{
String packageName = getDefault( ModelDefault.PACKAGE ).getValue();
if ( withVersion )
{
packageName += "." + version.toString( "v", "_" );
}
return packageName;
}
内容来源于网络,如有侵权,请联系作者删除!