1 /*
2 * Copyright (C) The Spice Group. All rights reserved.
3 *
4 * This software is published under the terms of the Spice
5 * Software License version 1.1, a copy of which has been included
6 * with this distribution in the LICENSE.txt file.
7 */
8 package org.codehaus.spice.configkit;
9
10 /***
11 * Holds information about a given Entity.
12 *
13 * @author Peter Donald
14 * @version $Revision: 1.1 $ $Date: 2003/12/03 03:19:28 $
15 */
16 class EntityInfo
17 {
18 /*** The public identifier. Null if unknown. */
19 private final String m_publicId;
20
21 /*** The system identifier. Null if unknown. */
22 private final String m_systemId;
23
24 /*** The resource name, if a copy of the document is available. */
25 private final String m_resource;
26
27 EntityInfo( final String publicId,
28 final String systemId,
29 final String resource )
30 {
31 //One of systemId and publicId should be non-null
32 if( null == publicId && null == systemId )
33 {
34 throw new NullPointerException( "systemId" );
35 }
36 if( null == resource )
37 {
38 throw new NullPointerException( "resource" );
39 }
40 m_publicId = publicId;
41 m_systemId = systemId;
42 m_resource = resource;
43 }
44
45 /***
46 * Returns the public identifier. Null if unknown.
47 *
48 * @return the public identifier. Null if unknown.
49 */
50 String getPublicId()
51 {
52 return m_publicId;
53 }
54
55 /***
56 * Return the system identifier. Null if unknown.
57 *
58 * @return the system identifier. Null if unknown.
59 */
60 String getSystemId()
61 {
62 return m_systemId;
63 }
64
65 /***
66 * Return the resource name, if a copy of the document is available.
67 *
68 * @return the resource name, if a copy of the document is available.
69 */
70 String getResource()
71 {
72 return m_resource;
73 }
74 }
This page was automatically generated by Maven