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

Friki example source code file (BasicDriver.java)

This example Friki source code file (BasicDriver.java) 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.

Java - Friki tags/keywords

basicdriver, object, object, repositorydriver, repositorydriver, string, string, tract, tract

The Friki BasicDriver.java source code

package com.efsol.friki;

import org.stringtree.util.tract.Tract;

public abstract class BasicDriver 
	implements RepositoryDriver
{
	public boolean isWritable(String name)
	{
		return true;
	}

	public boolean isReadable(String name)
	{
		return true;
	}

	public Object getObject(String name)
	{
		return get(name);
	}
	
	public void put(String name, Object obj)
	{
		if (obj instanceof Tract)
		{
			put(name, (Tract)obj);
		}
		else
		{
			System.out.println("Warning, attempt to put unknown object '" + obj + "' to Page repository");
		}
	}
	
	public String escape(String name)
	{
		return name;
	}
	
	public String unescape(String name)
	{
		return name;
	}
	
	public void remove(String arg0)
	{
		// do nothing
	}
	
	public void clear()
	{
		// do nothing
	}
}

Other Friki examples (source code examples)

Here is a short list of links related to this Friki BasicDriver.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 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.