All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sun.msv.reader.trex.NameClassState Maven / Gradle / Ivy

There is a newer version: 2.2.5.1
Show newest version
/*
 * @(#)$Id: NameClassState.java,v 1.6 2003/06/09 20:37:29 kk122374 Exp $
 *
 * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
 * 
 * This software is the proprietary information of Sun Microsystems, Inc.  
 * Use is subject to license terms.
 * 
 */
package com.sun.msv.reader.trex;

import com.sun.msv.grammar.NameClass;
import com.sun.msv.reader.SimpleState;

/**
 * Base implementation for NameClass primitives
 * 
 * @author Kohsuke KAWAGUCHI
 */
public abstract class NameClassState extends SimpleState {
    public final void endSelf() {
        // pass the pattern to the parent
        ((NameClassOwner)parentState).onEndChild(makeNameClass());
        super.endSelf();
    }
        
    /**
     * This method is called from endElement method.
     * Implementation has to provide NameClass object that represents the content of
     * this element.
     */
    protected abstract NameClass makeNameClass();
    
    protected final String getPropagatedNamespace() {
        return ((TREXBaseReader)reader).targetNamespace;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy