public abstract class ResourceVisitor extends Object
Abstract ResourceVisitor class.
| Modifier and Type | Class and Description |
|---|---|
class |
ResourceVisitor.CustomSchemaOutputResolver |
| Modifier and Type | Field and Description |
|---|---|
protected String[] |
classConsumes |
protected ClassLoader |
classLoader |
protected String[] |
classProduces |
protected HashSet<ITypeModel> |
consumedTypes |
protected static String |
EXAMPLES_FOLDER
Constant
EXAMPLES_FOLDER="examples" |
protected static String |
EXAMPLES_PREFFIX
Constant
EXAMPLES_PREFFIX="EXAMPLES_FOLDER + /" |
protected File |
outputFile |
protected JAXBRegistry |
regsistry |
protected static String |
SCHEMAS_FOLDER
Constant
SCHEMAS_FOLDER="schemas" |
protected RAMLModelHelper |
spec |
protected static String |
XML_FILE_EXT
Constant
XML_FILE_EXT=".xml" |
| Constructor and Description |
|---|
ResourceVisitor(File outputFile,
ClassLoader classLoader)
Constructor for ResourceVisitor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
clear.
|
protected abstract ResourceVisitor |
createResourceVisitor()
createResourceVisitor.
|
protected void |
doGenerateAndSave(File schemaFile,
File parentDir,
File examplesDir,
String dummyXml)
doGenerateAndSave.
|
protected void |
generateExamle(File schemaFile,
String content)
generateExamle.
|
protected String |
generateXMLExampleJAXB(ITypeModel t)
generateXMLExampleJAXB.
|
protected void |
generateXMLSchema(ITypeModel t)
generateXMLSchema.
|
protected void |
generateXSDForClass(Class<?> element)
generateXSDForClass.
|
String |
getRaml()
getRaml.
|
boolean |
isEmpty()
isEmpty.
|
void |
setPreferences(IRamlConfig preferencesConfig)
setPreferences.
|
void |
visit(ITypeModel t)
visit.
|
protected void |
writeString(String generateDummyXmlFor,
File toSave)
writeString.
|
protected static final String XML_FILE_EXT
XML_FILE_EXT=".xml"protected static final String SCHEMAS_FOLDER
SCHEMAS_FOLDER="schemas"protected static final String EXAMPLES_FOLDER
EXAMPLES_FOLDER="examples"protected static final String EXAMPLES_PREFFIX
EXAMPLES_PREFFIX="EXAMPLES_FOLDER + /"protected JAXBRegistry regsistry
protected RAMLModelHelper spec
protected String[] classConsumes
protected String[] classProduces
protected HashSet<ITypeModel> consumedTypes
protected final File outputFile
protected final ClassLoader classLoader
public ResourceVisitor(File outputFile, ClassLoader classLoader)
Constructor for ResourceVisitor.
outputFile - a File object.classLoader - a ClassLoader object.public void visit(ITypeModel t)
visit.
t - a ITypeModel object.protected void generateXMLSchema(ITypeModel t)
generateXMLSchema.
t - a ITypeModel object.protected String generateXMLExampleJAXB(ITypeModel t)
generateXMLExampleJAXB.
t - a ITypeModel object.String object.protected abstract ResourceVisitor createResourceVisitor()
createResourceVisitor.
ResourceVisitor object.protected void generateXSDForClass(Class<?> element)
generateXSDForClass.
element - a Class object.public void clear()
clear.
public boolean isEmpty()
isEmpty.
protected void doGenerateAndSave(File schemaFile, File parentDir, File examplesDir, String dummyXml)
doGenerateAndSave.
public void setPreferences(IRamlConfig preferencesConfig)
setPreferences.
preferencesConfig - a IRamlConfig object.Copyright © 2015 Mulesoft. All rights reserved.