Package org.jboss.vfs

Examples of org.jboss.vfs.VFSInputSource


      {
         return this.ddParser.parse(file.toURL());
      }
      else if (this.ddProcessor != null)
      {
         InputSource source = new VFSInputSource(file);
         Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
         unmarshaller.setValidation(this.ddProcessor.isValidating());
         ObjectModelFactory factory = this.ddProcessor.getFactory(file.toURL());
         return (T)unmarshaller.unmarshal(source, factory, root);
      }
View Full Code Here


      if (file == null)
         throw new IllegalArgumentException("Null file");

      log.debugf("Parsing: %1s", file.getName());
     
      InputSource source = new VFSInputSource(file);
      DocumentBuilderFactory factory = getDocumentBuilderFactory();
      DocumentBuilder parser = factory.newDocumentBuilder();
      parser.setEntityResolver(new JBossEntityResolver());
      return parser.parse(source);
   }
View Full Code Here

      namespaces.clear();
   }

   protected <U> U parse(Class<U> expectedType, VirtualFile file, Object root) throws Exception
   {
      InputSource source = new VFSInputSource(file);
      return getHelper().parse(expectedType, source);
   }
View Full Code Here

   protected T parse(VirtualFile file) throws Exception
   {
      if (file == null)
         throw new IllegalArgumentException("Null file");

      InputSource source = new VFSInputSource(file);
      return getHelper().parse(source);
   }
View Full Code Here

      ObjectModelFactory objectModelFactory = getObjectModelFactory(expectedType, file, tRoot);
      if (objectModelFactory == null)
         log.warn("ObjectModelFactory factory is null, expectedType=" + expectedType + ", file=" + file);

      InputSource source = new VFSInputSource(file);
      return getHelper().parse(expectedType, source, tRoot, objectModelFactory);
   }
View Full Code Here

      unmarshaller.setEventHandler(validationEventHandler);
      Schema schema = SchemaHelper.getSchema(schemaLocation);
      if (schema != null)
         unmarshaller.setSchema(schema);

      InputSource source = new VFSInputSource(file);
      Object result = unmarshaller.unmarshal(source);
      return getOutput().cast(result);
   }
View Full Code Here

   }

   @Override
   protected T parse(VFSDeploymentUnit unit, VirtualFile file, T root) throws Exception
   {
      InputSource source = new VFSInputSource(file);
      return getHelper().parse(source, root, getObjectModelFactory(root));
   }
View Full Code Here

TOP

Related Classes of org.jboss.vfs.VFSInputSource

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.