コード例 #1
0
	    /**
	     * Gets the request.
	     * 
	     * @param input
	     *            the input
	     * @return the request
	     * @throws XMLRealiserException
	     *             the xML realiser exception
	     */
		public static wrapper.RequestType getRequest(StringReader input)
		{
			wrapper.NLGSpec spec = UnWrapper.getNLGSpec(input);
			wrapper.RequestType request = spec.Request;
			if (request == null)
			{
				throw new XMLRealiserException("Must have Request element");
			}

			return request;
		}
コード例 #2
0
	    /**
	     * Gets the recording.
	     * 
	     * @param input
	     *            the input
	     * @return the recording
	     * @throws XMLRealiserException
	     *             the xML realiser exception
	     */
		public static wrapper.RecordSet getRecording(StringReader input)
		{
			wrapper.NLGSpec spec = UnWrapper.getNLGSpec(input);
			wrapper.RecordSet recording = spec.Recording;
			if (recording == null)
			{
				throw new XMLRealiserException("Must have Recording element");
			}

			return recording;

		}