alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

/*
 *                 Sun Public License Notice
 * 
 * The contents of this file are subject to the Sun Public License
 * Version 1.0 (the "License"). You may not use this file except in
 * compliance with the License. A copy of the License is available at
 * http://www.sun.com/
 * 
 * The Original Code is NetBeans. The Initial Developer of the Original
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
 * Microsystems, Inc. All Rights Reserved.
 */

package org.netbeans.modules.schema2beansdev;

import java.util.*;
import java.io.*;

import org.netbeans.modules.schema2beans.*;

/**
 * The DTD parser handler
 */
public interface DocDefHandler {
    /**
     *	Called once, when the DTD is started to be parsed.
     *
     *	@param root root elemement name of the document (as the DOCTYPE
     *	specifies in the XML document)
     */
    public void startDocument(String root);
    public void endDocument();
    
    /**
     *	Called each time a DTD . The first element name doesn't
     *	generate a call to this method (@see startElement).
     *
     *	@param name the name of the element defined within the 
     *	declaration.
     *	@param instance has one of the three values: INSTANCE_0_1,
     *	INSTANCE_1, INSTANCE_0_N, INSTANCE_1_N
     *
     */
    public void element(String uniqueName, String typeName,
                        String attrName, String attrNamespace,
                        int instance, boolean externalType, String defaultValue);
    public void element(String name, int instance);

    public void addExtraDataNode(String typeName, Object data) throws Schema2BeansException;
    public void addExtraDataCurLink(Object data);

    public void nillable(boolean value);
    
    /**
     * Called to request that the current graph node be of a certain
     * Java class.
     * @param javaType is the name of a Java class (eg, "java.lang.Integer", or "int").
     */
    public void javaType(String uniqueName, String name, String javaType);

    /**
     * Set the namespace that will be used by default in the documents.
     */
    public void setDefaultNamespace(String ns);

    /**
     * set a special property to some value.
     */
    public void setExtendedProperty(String typeName, String propertyName,
                                    Object value) throws Schema2BeansException;
}
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.