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

/*
 * GazoogleDataObjectLoader.java
 *
 * Created on 12 July 2001 1656 MDT
 */

package com.example.nb.tutorial.chapter_4;

import java.io.IOException;

import org.openide.filesystems.FileObject;
import org.openide.loaders.DataObjectExistsException;
import org.openide.loaders.MultiDataObject;
import org.openide.loaders.UniFileLoader;

/**
 *
 * @author  adams
 * @version 1.0
 */
public class GazoogleDataObjectLoader extends UniFileLoader
{

    /** Creates new GazoogleDataObjectLoader */
    public GazoogleDataObjectLoader() 
    {
        super(GazoogleDataObject.class);
    }

    protected MultiDataObject createMultiObject(FileObject fileObject) 
      throws DataObjectExistsException, IOException 
    {
        return new GazoogleDataObject(fileObject, this);
    }
    
    protected String defaultDisplayName() {
        return "Chapter 4 Gazoogle Data Object Loader";  //NOI18N
    }

    /**
     * We have a qualifying FileObject if the object
     * is a file with extension ".gazoogle".
     */
    protected FileObject findPrimaryFile(FileObject fo)
    {
        FileObject primaryFile = null;
        if (fo.isData() && fo.hasExt("gazoogle"))
        {
            primaryFile = fo;
        }
        return primaryFile;
    }
}
... 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.