001/*
002 * Match.java March 2002
003 *
004 * Copyright (C) 2001, Niall Gallagher <niallg@users.sf.net>
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
015 * implied. See the License for the specific language governing 
016 * permissions and limitations under the License.
017 */
018 
019package org.simpleframework.xml.util;
020
021/**
022 * This object is stored within a <code>Resolver</code> so that it 
023 * can be retrieved using a string that matches its pattern. Any
024 * object that extends this can be inserted into the resolver and
025 * retrieved using a string that matches its pattern. For example
026 * take the following pattern "*.html" this will match the string
027 * "/index.html" or "readme.html". This object should be extended
028 * to add more XML attributes and elements, which can be retrieved
029 * when the <code>Match</code> object is retrieve from a resolver.
030 *
031 * @author Niall Gallagher
032 */
033public interface Match {
034
035   /**
036    * This is the pattern string that is used by the resolver. A
037    * pattern can consist of a "*" character and a "?" character
038    * to match the pattern. Implementations of this class should
039    * provide the pattern so that it can be used for resolution.
040    * 
041    * @return this returns the pattern that is to be matched
042    */      
043   String getPattern();
044}