KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > xml > querying > impl > xtas > XMLQueryingServiceImpl


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5
6 package org.exoplatform.services.xml.querying.impl.xtas;
7
8 import java.io.InputStream JavaDoc;
9 import org.exoplatform.services.xml.querying.InvalidSourceException;
10 import org.exoplatform.services.xml.querying.Statement;
11 import org.exoplatform.services.xml.querying.XMLQuery;
12 import org.exoplatform.services.xml.querying.XMLQueryingService;
13 import org.exoplatform.services.xml.querying.helper.SimpleStatementHelper;
14 import org.exoplatform.services.xml.querying.helper.XMLDataManager;
15 import org.exoplatform.services.xml.querying.impl.xtas.helper.SimpleStatementHelperImpl;
16 import org.exoplatform.services.xml.querying.impl.xtas.helper.XMLDataManagerFacade;
17
18
19
20 /**
21  * Created by The eXo Platform SARL .
22  *
23  * Xtas query entry point implementation
24 * @author Gennady Azarenkov
25  * @version $Id: XMLQueryingServiceImpl.java 566 2005-01-25 12:50:49Z kravchuk $
26  */

27
28 public class XMLQueryingServiceImpl implements XMLQueryingService
29 {
30   /**
31    * Creates an empty query object
32    * Typical lifecycle: prepare()->[setInput()]->execute()->getResult()|serialize()
33    * See xtas.sourceforge.net for details
34    * @return xtas.Query object
35    */

36    public XMLQuery createQuery()
37    {
38        return new Query();
39    }
40
41    public XMLQuery createQuery(Statement statement) throws InvalidSourceException
42    {
43        return new Query(statement);
44    }
45
46    public XMLQuery createQuery(Statement statement, InputStream JavaDoc inputStream) throws InvalidSourceException
47    {
48        return new Query(statement, inputStream);
49    }
50
51    public SimpleStatementHelper createStatementHelper()
52    {
53        return new SimpleStatementHelperImpl();
54    }
55
56    public XMLDataManager createXMLDataManager() {
57
58        return new XMLDataManagerFacade();
59    }
60
61 }
62
Popular Tags