Examples of loadDocument()


Examples of org.auto.xml.XmlDocumentLoader.loadDocument()

    delegatingResolver.setXmlDefinitionManager(xmlDefinitionManager);
    documentLoader.setEntityResolver(delegatingResolver);

    ClassPathResource resource = new ClassPathResource(
        "org//auto//dataSync-ywgy.sync.xml");
    Document document = documentLoader.loadDocument(resource
        .getInputStream());
    Element element = document.getDocumentElement();

    System.out.println(element.getNamespaceURI());
View Full Code Here

Examples of org.impalaframework.module.source.XMLModulelDefinitionDocumentLoader.loadDocument()

public class XMLModuleDefinitionDocumentLoaderTest extends TestCase {

    public final void testLoadDocument() {
        XMLModulelDefinitionDocumentLoader builder = new XMLModulelDefinitionDocumentLoader();
        Document document = builder.loadDocument(new ClassPathResource("xmlspec/moduledefinition.xml"));
        assertNotNull(document);
    }
   
    public final void testNotPresentLoadDocument() {
        XMLModulelDefinitionDocumentLoader builder = new XMLModulelDefinitionDocumentLoader();
View Full Code Here

Examples of org.olat.modules.scorm.server.servermodels.ScoDocument.loadDocument()

    List<VFSItem> contents = scoFolder.getItems(new XMLFilter());
    for(VFSItem file:contents) {
      ScoDocument document = new ScoDocument(null);
      try {
        if(file instanceof LocalFileImpl) {
          document.loadDocument(((LocalFileImpl)file).getBasefile());
        }
        else {
          logger.warn("Cannot use this type of VSFItem to load a SCO Datamodel: " + file.getClass().getName(), null);
          continue;
        }
View Full Code Here

Examples of org.olat.modules.scorm.server.servermodels.ScoDocument.loadDocument()

    List<VFSItem> contents = scoFolder.getItems(new XMLFilter());
    for(VFSItem file:contents) {
      ScoDocument document = new ScoDocument(null);
      try {
        if(file instanceof LocalFileImpl) {
          document.loadDocument(((LocalFileImpl)file).getBasefile());
        }
        else {
          logger.warn("Cannot use this type of VSFItem to load a SCO Datamodel: " + file.getClass().getName(), null);
          continue;
        }
View Full Code Here

Examples of org.olat.modules.scorm.server.servermodels.ScoDocument.loadDocument()

        // if this is a sco then we need to access the
        // cmi data model we created when importing the package
        if (isItemSco()) {
            if (_scoitemID != null) {
                ScoDocument anSco = new ScoDocument(settings);
                anSco.loadDocument(_scoitemID);
                _scoDataModel = anSco;
            }
        }
    }
View Full Code Here

Examples of org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument()

    public static Document loadDocument(Reader reader, String description) {
        Document document = null;
        DefaultDocumentLoader loader = new DefaultDocumentLoader();
        try {
            InputSource inputSource = new InputSource(reader);
            document = loader.loadDocument(inputSource, null, new SimpleSaxErrorHandler(logger),
                    XmlBeanDefinitionReader.VALIDATION_NONE, true);
        }
        catch (Exception e) {
            throw new ExecutionException("Unable to load XML document from resource " + description, e);
        }
View Full Code Here

Examples of org.springframework.beans.factory.xml.DocumentLoader.loadDocument()

    if (!m2Settings.exists())
      return null;

    try {
      DocumentLoader docLoader = new DefaultDocumentLoader();
      Document document = docLoader.loadDocument(new InputSource(m2Settings.getInputStream()), null, null,
        XmlValidationModeDetector.VALIDATION_NONE, false);

      return (DomUtils.getChildElementValueByTagName(document.getDocumentElement(), LOCAL_REPOSITORY_ELEM));
    }
    catch (Exception ex) {
View Full Code Here

Examples of org.teiid.query.mapping.xml.MappingLoader.loadDocument()

            String document = tableRecord.getSelectTransformation();           
            InputStream inputStream = new ByteArrayInputStream(document.getBytes());
            MappingLoader reader = new MappingLoader();
            MappingDocument mappingDoc = null;
            try{
                mappingDoc = reader.loadDocument(inputStream);
                mappingDoc.setName(groupName);
            } catch (Exception e){
                throw new TeiidComponentException(e, QueryPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1", groupName, mappingDoc)); //$NON-NLS-1$
            } finally {
              try {
View Full Code Here

Examples of org.teiid.query.mapping.xml.MappingLoader.loadDocument()

        byte[] bytes = xml.getBytes();

        InputStream istream = new ByteArrayInputStream (bytes);
       
        return reader.loadDocument(istream);
    }   
   
    public void testSourceAtRootXML50() throws Exception{
        String xml =
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" //$NON-NLS-1$
View Full Code Here

Examples of org.teiid.query.mapping.xml.MappingLoader.loadDocument()

    /** Load a mapping definition from a file. */
    private static MappingNode loadFromFile( String filename )
        throws Exception {
        String fileAbsolutePath = getFilePathInDataDir(filename);
        MappingLoader loader = new MappingLoader();
        return loader.loadDocument(fileAbsolutePath);
    }

    /** Load a mapping definition from a stream. */
    private static MappingNode loadFromStream( String filename )
        throws Exception {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.