001 /*
002 * (c) Copyright 2010 University of Bristol
003 * All rights reserved.
004 * [See end of file]
005 */
006 package net.rootdev.javardfa.uri;
007
008 import java.util.List;
009 import java.util.Set;
010 import javax.xml.stream.events.Attribute;
011 import javax.xml.stream.events.StartElement;
012 import net.rootdev.javardfa.EvalContext;
013 import net.rootdev.javardfa.Setting;
014
015 /**
016 *
017 * @author pldms
018 */
019 public interface URIExtractor {
020
021 void setSettings(Set<Setting> settings);
022
023 String expandCURIE(StartElement element, String value, EvalContext context);
024
025 String expandSafeCURIE(StartElement element, String value, EvalContext context);
026
027 String getURI(StartElement element, Attribute attr, EvalContext context);
028
029 List<String> getURIs(StartElement element, Attribute attr, EvalContext context);
030
031 String resolveURI(String uri, EvalContext context);
032 }
033
034
035 /*
036 * (c) Copyright 2010 University of Bristol
037 * All rights reserved.
038 *
039 * Redistribution and use in source and binary forms, with or without
040 * modification, are permitted provided that the following conditions
041 * are met:
042 * 1. Redistributions of source code must retain the above copyright
043 * notice, this list of conditions and the following disclaimer.
044 * 2. Redistributions in binary form must reproduce the above copyright
045 * notice, this list of conditions and the following disclaimer in the
046 * documentation and/or other materials provided with the distribution.
047 * 3. The name of the author may not be used to endorse or promote products
048 * derived from this software without specific prior written permission.
049 *
050 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
051 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
052 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
053 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
054 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
055 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
056 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
057 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
058 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
059 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
060 */