001/** 002 * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 003 * This file is part of the LDP4j Project: 004 * http://www.ldp4j.org/ 005 * 006 * Center for Open Middleware 007 * http://www.centeropenmiddleware.com/ 008 * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 009 * Copyright (C) 2014 Center for Open Middleware. 010 * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 011 * Licensed under the Apache License, Version 2.0 (the "License"); 012 * you may not use this file except in compliance with the License. 013 * You may obtain a copy of the License at 014 * 015 * http://www.apache.org/licenses/LICENSE-2.0 016 * 017 * Unless required by applicable law or agreed to in writing, software 018 * distributed under the License is distributed on an "AS IS" BASIS, 019 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 020 * See the License for the specific language governing permissions and 021 * limitations under the License. 022 * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 023 * Artifact : org.ldp4j.framework:ldp4j-application-api:0.2.0 024 * Bundle : ldp4j-application-api-0.2.0.jar 025 * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 026 */ 027package org.ldp4j.application.ext; 028 029import java.util.Collections; 030import java.util.List; 031import java.util.Set; 032 033/** 034 * Provides a programmatic mechanism for an LDP4j application to specify the 035 * configuration parameters for the <b>LDP4j Application Engine</b>. <br/> 036 * 037 * This class is meant to be extended (refined) to also include specific 038 * configuration requirements of LDP4j applications. 039 */ 040public class Configuration { 041 042 private static final class NullNamespaces implements Namespaces { 043 @Override 044 public List<String> getPrefixes(String namespaceURI) { 045 return Collections.emptyList(); 046 } 047 048 @Override 049 public String getPrefix(String namespaceURI) { 050 return null; 051 } 052 053 @Override 054 public String getNamespaceURI(String prefix) { 055 return null; 056 } 057 058 @Override 059 public Set<String> getDeclaredPrefixes() { 060 return Collections.emptySet(); 061 } 062 } 063 064 /** 065 * Get the namespace declarations of the application. 066 * 067 * @return the namespaces of the application 068 */ 069 public Namespaces namespaces() { 070 return new NullNamespaces(); 071 } 072 073}