Coverage report

| %line | %branch
--- | --- | ---
tsukuba_bunko.peko.resource.PekoResourceLoader |
0% |
0% |

1 |  |
     /*
2 |  |
      * "Peko" Visual Novel System
3 |  |
      *
4 |  |
      * All Rights Reserved.
5 |  |
      * Copyright (c) 1999-2003 Tsukuba Bunko.
6 |  |
      *
7 |  |
      * $Id: PekoResourceLoader.java,v 1.1 2005/07/11 12:49:18 ppoi Exp $
8 |  |
      */
9 |  |
     package tsukuba_bunko.peko.resource;
10 |  |
11 |  |
     import	javax.xml.parsers.ParserConfigurationException;
12 |  |
13 |  |
     import	org.xml.sax.Attributes;
14 |  |
     import	org.xml.sax.SAXException;
15 |  |
16 |  |
     import	tsukuba_bunko.resource.ResourceDeserializer;
17 |  |
     import	tsukuba_bunko.resource.ResourceLoader;
18 |  |
19 |  |
20 |  |
     /**
21 |  |
      * "Peko" 用のリソースをロードする ResouceLoader です。
22 |  |
      * @author	$Author: ppoi $
23 |  |
      * @version	$Revision: 1.1 $
24 |  |
      */
25 |  |
     public class PekoResourceLoader	extends ResourceLoader	{
26 |  |
27 |  |
     	/**
28 |  |
     	 * パス情報
29 |  |
     	 */
30 | 0 |
     	private StringBuffer	_path = null;
31 |  |
32 |  |
33 |  |
     	/**
34 |  |
     	 * <code>PekoResourceLoader</code> のインスタンスを作成します。
35 |  |
     	 * @throws	InitializationError	初期化に失敗した場合
36 |  |
     	 */
37 |  |
     	public PekoResourceLoader()
38 |  |
     		throws ParserConfigurationException, SAXException
39 |  |
     	{
40 | 0 |
     		super();
41 | 0 |
     		setDeserializerMapping( TypeMapping.getInstance().getDeserializerMapping() );
42 | 0 |
     	}
43 |  |
44 |  |
45 |  |
     //
46 |  |
     //	ResourceLoader の実装
47 |  |
     //
48 |  |
     	protected ResourceDeserializer getResourceDeserializer( String namespaceURI, String localName, String qName, Attributes attrs )
49 |  |
     	{
50 | 0 |
     		ResourceDeserializer	deserializer = null;
51 |  |
52 | 0 |
     		if( (_path == null) || (_path.length() == 0) )	{
53 | 0 |
     			_path = new StringBuffer( getCurrentPath() );
54 | 0 |
     		}
55 |  |
     		else	{
56 | 0 |
     			_path.append( '.' );
57 | 0 |
     			_path.append( qName );
58 |  |
     		}
59 |  |
60 | 0 |
     		TypeMapping	mapping = TypeMapping.getInstance();
61 | 0 |
     		deserializer = mapping.getResourceDeserializer( new String(_path) );
62 | 0 |
     		return deserializer;
63 |  |
     	}
64 |  |
65 |  |
66 |  |
     //
67 |  |
     //	ContentHandler の実装
68 |  |
     //
69 |  |
     	public void startDocument()
70 |  |
     	{
71 | 0 |
     		super.startDocument();
72 | 0 |
     		_path = null;
73 | 0 |
     	}
74 |  |
75 |  |
     	public void endElement( String namespaceURI, String localName, String qName )
76 |  |
     		throws SAXException
77 |  |
     	{
78 | 0 |
     		super.endElement( namespaceURI, localName, qName );
79 | 0 |
     		_path = null;
80 | 0 |
     	}
81 |  |
     }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.