|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
EntityInfo.java | 100% | 100% | 100% | 100% |
|
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 | 43 |
EntityInfo( final String publicId, |
28 |
final String systemId, |
|
29 |
final String resource ) |
|
30 |
{ |
|
31 |
//One of systemId and publicId should be non-null
|
|
32 | 43 |
if( null == publicId && null == systemId ) |
33 |
{ |
|
34 | 1 |
throw new NullPointerException( "systemId" ); |
35 |
} |
|
36 | 42 |
if( null == resource ) |
37 |
{ |
|
38 | 1 |
throw new NullPointerException( "resource" ); |
39 |
} |
|
40 | 41 |
m_publicId = publicId; |
41 | 41 |
m_systemId = systemId; |
42 | 41 |
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 | 44 |
String getPublicId() |
51 |
{ |
|
52 | 44 |
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 | 53 |
String getSystemId() |
61 |
{ |
|
62 | 53 |
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 | 24 |
String getResource() |
71 |
{ |
|
72 | 24 |
return m_resource;
|
73 |
} |
|
74 |
} |
|
75 |
|
|