// copyright => http://www.jxml.com/mdsax/License.txt

package com.jxml.quick;

import java.net.*;

/**
 * Hyper Reference
 */
public class HRef
	implements QMeta
{
	public String schema="";
	public String schemaClass="";
	public String href="";
	public String expects="java.lang.Object";

	public HRef()
	{
	}

	public HRef(String schema, String href, String expects)
	{
		this(schema,href,expects,"");
	}

	public HRef(String schema, String href, String expects, String schemaClass)
	{
		this.schema=schema;
		this.href=href;
		this.expects=expects;
		this.schemaClass=schemaClass;
	}


	public Object getWalkObject(Object parent, Object appObject, QDoc doc)
	{
		if (doc.isKnown(appObject))
			if (!doc.isMarked(appObject))
				return appObject;
			else
				return this;
		if (appObject==doc.getRoot())
		{
			if (parent==null)
			{
				return appObject;
			}
			return this;
		}
		return this;
	}
}
