blob: f7c40e7ff6b38dde005e1d3d0169716a5fada18d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/*******************************************************************************
* Copyright (c) 2002-2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM - Initial API and implementation
*******************************************************************************/
package org.eclipse.wst.wsi.internal.core.wsdl.xsd;
import java.util.Hashtable;
import java.util.Map;
/**
* The default implementation of the XML Catalog.
*
* @author Lawrence Mandel (lmandel@ca.ibm.com)
*/
public class XMLCatalogImpl extends XMLCatalog
{
protected Map catalog = new Hashtable();
/* (non-Javadoc)
* @see org.eclipse.wsdl.validate.xmlconformance.XMLCatalog#addEntryToCatalog(java.lang.String, java.lang.String)
*/
public void addEntryToCatalog(String publicId, String systemId)
{
catalog.put(publicId, systemId);
}
/* (non-Javadoc)
* @see org.eclipse.wsdl.validate.xmlconformance.XMLCatalog#resolveEntityLocation(java.lang.String, java.lang.String)
*/
public String resolveEntityLocation(String publicId, String systemId)
{
// if there's no system id use the public id
if (systemId == null || systemId.equals(""))
{
systemId = publicId;
}
return (String)catalog.get(systemId);
}
}
|