001: /*
002: * This file or a portion of this file is licensed under the terms of
003: * the Globus Toolkit Public License, found in file ../GTPL, or at
004: * http://www.globus.org/toolkit/download/license.html. This notice must
005: * appear in redistributions of this file, with or without modification.
006: *
007: * Redistributions of this Software, with or without modification, must
008: * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
009: * some other similar material which is provided with the Software (if
010: * any).
011: *
012: * Copyright 1999-2004 University of Chicago and The University of
013: * Southern California. All rights reserved.
014: */
015: package org.griphyn.vdl.dbschema;
016:
017: import java.sql.*;
018: import org.griphyn.vdl.classes.Definition;
019:
020: /**
021: * This common schema interface defines advanced search interfaces for
022: * VDC. The advanced methods required permit wildcard searches, partial
023: * matches, and candidate list compilations that are not part of the
024: * simpler @{link VDC} interface.
025: *
026: * @author Jens-S. Vöckler
027: * @author Yong Zhao
028: * @version $Revision: 50 $
029: *
030: * @see org.griphyn.vdl.dbschema.DatabaseSchema
031: * @see org.griphyn.vdl.dbdriver
032: */
033: public interface Advanced extends VDC {
034: //
035: // higher level methods, allowing for partial matching
036: //
037:
038: /**
039: * Delete one or more definitions from the backend database. The key
040: * triple parameters may be wildcards. Wildcards are expressed as
041: * <code>null</code> value, or have special characters '%' and '_'.
042: *
043: * @param namespace namespace
044: * @param name name
045: * @param version version
046: * @param type definition type (TR or DV)
047: * @return a list of definitions that were deleted.
048: *
049: * @see org.griphyn.vdl.classes.Definition#TRANSFORMATION
050: * @see org.griphyn.vdl.classes.Definition#DERIVATION
051: */
052: public abstract java.util.List deleteDefinitionEx(String namespace,
053: String name, String version, int type) throws SQLException;
054:
055: /**
056: * Searches the database for definitions by ns::name:version triple
057: * and by type (either Transformation or Derivation). This version of
058: * the search allows for jokers expressed as null value
059: *
060: * @param namespace namespace, null to match any namespace
061: * @param name name, null to match any name
062: * @param version version, null to match any version
063: * @param type type of definition, see below, or -1 as wildcard
064: * @return a list of Definition items, which may be empty
065: *
066: * @see org.griphyn.vdl.classes.Definition#TRANSFORMATION
067: * @see org.griphyn.vdl.classes.Definition#DERIVATION
068: * @see #loadDefinition( String, String, String, int )
069: */
070: public abstract java.util.List searchDefinitionEx(String namespace,
071: String name, String version, int type) throws SQLException;
072:
073: /**
074: * Searches the database for all LFNs that match a certain pattern.
075: * The linkage is an additional constraint. This method allows
076: * joker characters such as '%' and '_'.
077: *
078: * @param lfn the LFN name
079: * @param link the linkage type of the LFN
080: * @return a list of filenames that match the criterion.
081: *
082: * @see org.griphyn.vdl.classes.LFN#NONE
083: * @see org.griphyn.vdl.classes.LFN#INPUT
084: * @see org.griphyn.vdl.classes.LFN#OUTPUT
085: * @see org.griphyn.vdl.classes.LFN#INOUT
086: */
087: public abstract java.util.List searchLFN(String lfn, int link)
088: throws SQLException;
089:
090: /**
091: * Searches the database for a list of namespaces of the definitions
092: * Sorted in ascending order.
093: *
094: * @param type type of definition, see below, or -1 for both
095: * @return a list of namespaces
096: *
097: * @see org.griphyn.vdl.classes.Definition#TRANSFORMATION
098: * @see org.griphyn.vdl.classes.Definition#DERIVATION
099: */
100: public abstract java.util.List getNamespaceList(int type)
101: throws SQLException;
102:
103: /**
104: * Searches the database for a list of fully-qualified names of
105: * the definitions sorted in ascending order.
106: *
107: * @param type type of definition, see below, or -1 for both.
108: * @return a list of FQDNs
109: *
110: * @see org.griphyn.vdl.classes.Definition#TRANSFORMATION
111: * @see org.griphyn.vdl.classes.Definition#DERIVATION
112: */
113: public abstract java.util.List getFQDNList(int type)
114: throws SQLException;
115: }
|