Examples of DescriptionModel


Examples of org.jfree.xml.generator.model.DescriptionModel

    public DescriptionModel buildModel(final SourceCollector c, DescriptionModel model) {
       
        Class[] classes = c.getClasses();

        if (model == null) {
            model = new DescriptionModel();
        }

        while (classes.length != 0) {
            classes = fillModel(classes, model);
        }
View Full Code Here

Examples of org.jfree.xml.generator.model.DescriptionModel

     * @throws ObjectDescriptionException  if there is a problem reading the object descriptions.
     */
    public synchronized DescriptionModel load(final String file) throws IOException,
                                                                  ObjectDescriptionException {
       
        this.model = new DescriptionModel();
        this.baseURL = new File (file).toURL();
        parseXml(this.baseURL);
        fillSuperClasses();
        return this.model;
       
View Full Code Here

Examples of org.jfree.xml.generator.model.DescriptionModel

     *
     * @throws IOException if there is an I/O problem.
     */
    public synchronized void write(final String target) throws IOException {
    
        final DescriptionModel model = getModel();
        this.sources = new ArrayList(Arrays.asList(model.getSources()));
        this.targetFile = new File(target);
        this.plainFileName = IOUtils.getInstance().stripFileExtension(this.targetFile.getName());
        this.extension = IOUtils.getInstance().getFileExtension(target);

        // split into classDescriptionByPackage ...
        this.classDescriptionByPackage = new HashNMap();
        for (int i = 0; i < model.size(); i++) {
            final ClassDescription cd = model.get(i);
            if (cd.getSource() == null) {
                final String packageName = getPackage(cd.getObjectClass());
                final String includeFileName = this.plainFileName + "-" + packageName
                    + this.extension;
                this.classDescriptionByPackage.add(includeFileName, cd);
            }
            else {
                this.classDescriptionByPackage.add(cd.getSource(), cd);
            }
        }

        final MappingModel mappingModel = model.getMappingModel();

        // split manual mappings into packages ...
        final ManualMappingInfo[] manualMappings = mappingModel.getManualMapping();
        this.manualMappingByPackage = new HashNMap();
        for (int i = 0; i < manualMappings.length; i++) {
View Full Code Here

Examples of org.jfree.xml.generator.model.DescriptionModel

            ModelBuilder.getInstance().addAttributeHandlers(handlers);
        }

        final String source = p.getProperty("sourcedirectory", ".");
        final String target = p.getProperty("targetfile", "model.xml");
        DescriptionModel model = null;
        try {
            model = new DefaultModelReader().load(target);
        }
        catch (Exception e) {
            Log.debug("Unable to load default model. Ignoring...");
        }
//        Log.debug (model.getModelComments());
        model = generate(source, p, model);
        model.prune();
        writeMultiFile(target, model);
        System.exit(0);
    }
View Full Code Here

Examples of org.jfree.xml.generator.model.DescriptionModel

    public DescriptionModel buildModel(final SourceCollector c, DescriptionModel model) {
       
        Class[] classes = c.getClasses();

        if (model == null) {
            model = new DescriptionModel();
        }

        while (classes.length != 0) {
            classes = fillModel(classes, model);
        }
View Full Code Here

Examples of org.jfree.xml.generator.model.DescriptionModel

            ModelBuilder.getInstance().addAttributeHandlers(handlers);
        }

        final String source = p.getProperty("sourcedirectory", ".");
        final String target = p.getProperty("targetfile", "model.xml");
        DescriptionModel model = null;
        try {
            model = new DefaultModelReader().load(target);
        }
        catch (Exception e) {
            Log.debug("Unable to load default model. Ignoring...");
        }
//        Log.debug (model.getModelComments());
        model = generate(source, p, model);
        model.prune();
        writeMultiFile(target, model);
        System.exit(0);
    }
View Full Code Here

Examples of org.jfree.xml.generator.model.DescriptionModel

     * @throws ObjectDescriptionException  if there is a problem reading the object descriptions.
     */
    public synchronized DescriptionModel load(final String file) throws IOException,
                                                                  ObjectDescriptionException {
       
        this.model = new DescriptionModel();
        this.baseURL = new File (file).toURL();
        parseXml(this.baseURL);
        fillSuperClasses();
        return this.model;
       
View Full Code Here

Examples of org.jfree.xml.generator.model.DescriptionModel

     *
     * @throws IOException if there is an I/O problem.
     */
    public synchronized void write(final String target) throws IOException {
    
        final DescriptionModel model = getModel();
        this.sources = new ArrayList(Arrays.asList(model.getSources()));
        this.targetFile = new File(target);
        this.plainFileName = IOUtils.getInstance().stripFileExtension(this.targetFile.getName());
        this.extension = IOUtils.getInstance().getFileExtension(target);

        // split into classDescriptionByPackage ...
        this.classDescriptionByPackage = new HashNMap();
        for (int i = 0; i < model.size(); i++) {
            final ClassDescription cd = model.get(i);
            if (cd.getSource() == null) {
                final String packageName = getPackage(cd.getObjectClass());
                final String includeFileName = this.plainFileName + "-" + packageName
                    + this.extension;
                this.classDescriptionByPackage.add(includeFileName, cd);
            }
            else {
                this.classDescriptionByPackage.add(cd.getSource(), cd);
            }
        }

        final MappingModel mappingModel = model.getMappingModel();

        // split manual mappings into packages ...
        final ManualMappingInfo[] manualMappings = mappingModel.getManualMapping();
        this.manualMappingByPackage = new HashNMap();
        for (int i = 0; i < manualMappings.length; i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.