Package org.infoset.xml.sax

Examples of org.infoset.xml.sax.SAXDocumentLoader


   {
      this.context = context;
      this.internalRouter = internalRouter;
      this.hostConf = hostConf;
      this.edited = edited;
      this.docLoader = new SAXDocumentLoader();
      this.isStatic = isStatic;
      context.getAttributes().put(WebComponent.LINKS_ATTR, hostConf.getLinks());
      getLogger().info("Adding host "+hostConf.getName()+":"+server.getPort());
      this.vhost = new VirtualHost(context) {
         public void handle(Request request, Response response) {
View Full Code Here


      this.autoconfCheck = 180*1000;
      this.loaders = new HashMap<String,ClassLoader>();
      this.definitions = new HashMap<String,Class>();
      this.servers = new ArrayList<Server>();
      this.clients = new ArrayList<Protocol>();
      this.docLoader = new SAXDocumentLoader();
   }
View Full Code Here

   }
  
   public void load(URI location)
      throws IOException,XMLException
   {
      DocumentLoader loader = new SAXDocumentLoader();
      Document doc = loader.load(location);
      Element top = doc.getDocumentElement();
      if (!top.getName().equals(SERVER)) {
         throw new XMLException("Expecting "+SERVER+" but found "+top.getName());
      }
     
View Full Code Here

   }
     
   public void load(URI location)
      throws IOException,XMLException
   {
      DocumentLoader loader = new SAXDocumentLoader();
      Document doc = loader.load(location);
      Element top = doc.getDocumentElement();
      if (!top.getName().equals(AdminXML.NM_SERVER)) {
         throw new XMLException("Expecting "+AdminXML.NM_SERVER+" but found "+top.getName());
      }
      String value = top.getAttributeValue("autoconf-check");
View Full Code Here

     
   }
   public void init(Properties props)
      throws AuthException
   {
      loader = new SAXDocumentLoader();
      groups = new TreeMap<String,String>();
      users = new TreeMap<String,User>();
      passwords = new TreeMap<String,String>();
      URI baseURI = URI.create(props.getProperty("base-uri"));
      String href = props.getProperty("href");
View Full Code Here

   }

   public void load(URL url)
      throws IOException,XMLException
   {
      DocumentLoader loader = new SAXDocumentLoader();
      try {
         loader.generate(url.toURI(), new ItemDestination() {
            String separator = "/";
            TermNode current = null;
            public void send(Item item)
               throws XMLException
            {
View Full Code Here

         if (!inFile.canRead()) {
            getResponse().setStatus(Status.CLIENT_ERROR_EXPECTATION_FAILED);
            return new StringRepresentation("Cannot read input file "+inFile.getAbsolutePath());
         }
         getContext().getLogger().info("Restoring database from "+inFile.getAbsolutePath());
         DocumentLoader loader = new SAXDocumentLoader();
         loader.generate(inFile.toURI(),new RestoreDestination(getContext().getLogger(),db));
         getContext().getLogger().info("Restore finished.");
         getResponse().setStatus(Status.SUCCESS_NO_CONTENT);
         return null;
      } catch (IOException ex) {
         getContext().getLogger().log(Level.SEVERE,"Cannot get write data to output.",ex);
View Full Code Here

      String charset = entity.getMediaType().getParameters().getValues("charset");
      if (charset==null) {
         charset = "UTF-8";
      }
      try {
         DocumentLoader loader = new SAXDocumentLoader();
         Reader r = new InputStreamReader(entity.getStream(),charset);
         Document doc = loader.load(r);
         r.close();
        
         // Find the entry
        
         try {
View Full Code Here

   Map<String,FileStorage> cache;
   DocumentLoader loader;
   Context context;
   public FileStorageFactory() {
      cache = new TreeMap<String,FileStorage>();
      loader = new SAXDocumentLoader();
   }
View Full Code Here

      String charset = postType.getParameters().getValues("charset");
      if (charset==null) {
         charset = "UTF-8";
      }
      Document doc = null;
      DocumentLoader loader = new SAXDocumentLoader();
      try {
         Reader r = new InputStreamReader(entity.getStream(),charset);
         doc = loader.load(r);
         r.close();
      } catch (IOException ex) {
         getResponse().setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
         return new StringRepresentation("I/O error while parsing document: "+ex.getMessage());
      } catch (XMLException ex) {
View Full Code Here

TOP

Related Classes of org.infoset.xml.sax.SAXDocumentLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.