Examples of registerRootElement()


Examples of org.jboss.staxmapper.XMLMapper.registerRootElement()

        CliConfigImpl config = new CliConfigImpl();

        BufferedInputStream input = null;
        try {
            final XMLMapper mapper = XMLMapper.Factory.create();
            mapper.registerRootElement(new QName("urn:jboss:cli:1.0", "jboss-cli"), new XMLElementReader<CliConfigImpl>(){
                @Override
                public void readElement(XMLExtendedStreamReader reader, CliConfigImpl config) throws XMLStreamException {

                    boolean jbossCliEnded = false;
                    while (reader.hasNext() && jbossCliEnded == false) {
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.registerRootElement()

      XMLMapper xmlMapper = XMLMapper.Factory.create();
      @SuppressWarnings("rawtypes")
      ServiceLoader<ConfigurationParser> parsers = ServiceLoader.load(ConfigurationParser.class, cl);
      for (ConfigurationParser<?> parser : parsers) {
         for (Namespace ns : parser.getSupportedNamespaces()) {
            xmlMapper.registerRootElement(new QName(ns.getUri(), ns.getRootElement()), parser);
         }
      }

      ConfigurationBuilderHolder holder = new ConfigurationBuilderHolder(cl);
      for (int i = 0; i < xmls.length; ++i) {
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.registerRootElement()

    private ModelNode loadServerModel(File file) throws Exception {
        final List<ModelNode> operations = new ArrayList<ModelNode>();

        XMLMapper mapper = XMLMapper.Factory.create();
        mapper.registerRootElement(new QName(Namespace.CURRENT.getUri(), "subsystem"), Namespace.CURRENT.getXMLReader());

        XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream(file));
        mapper.parseDocument(operations, reader);

        final ModelNode ret = operations.get(0);
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.registerRootElement()

    @Before
    public void initializeParser() throws Exception {
        //Initialize the parser
        XMLMapper mapper = XMLMapper.Factory.create();
        testParser = new TestParser();
        mapper.registerRootElement(new QName(TEST_NAMESPACE, "test"), testParser);
        parsingContext = new ExtensionParsingContextImpl(mapper);
        mainExtension.initializeParsers(parsingContext);
        addedExtraParsers = false;

        stack.set(new Stack<String>());
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.registerRootElement()

        return strWriter.toString();
    }

    public static List<ModelNode> xmlToModelOperations(String xml, String nameSpaceUriString, XMLElementReader<List<ModelNode>> parser) throws Exception {
        XMLMapper mapper = XMLMapper.Factory.create();
        mapper.registerRootElement(new QName(nameSpaceUriString, "subsystem"), parser);

        StringReader strReader = new StringReader(xml);

        XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new StreamSource(strReader));
        List<ModelNode> newList = new ArrayList<ModelNode>();
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.registerRootElement()

        final Set<VirtualFile> files = messageDestinations(deploymentUnit);


        final XMLMapper mapper = XMLMapper.Factory.create();
        final MessagingDeploymentParser_1_0 messagingDeploymentParser_1_0 = new MessagingDeploymentParser_1_0(JBossDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
        mapper.registerRootElement(ROOT_1_0, messagingDeploymentParser_1_0);
        mapper.registerRootElement(ROOT_NO_NAMESPACE, messagingDeploymentParser_1_0);

        for (final VirtualFile file : files) {
            InputStream xmlStream = null;
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.registerRootElement()


        final XMLMapper mapper = XMLMapper.Factory.create();
        final MessagingDeploymentParser_1_0 messagingDeploymentParser_1_0 = new MessagingDeploymentParser_1_0(JBossDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
        mapper.registerRootElement(ROOT_1_0, messagingDeploymentParser_1_0);
        mapper.registerRootElement(ROOT_NO_NAMESPACE, messagingDeploymentParser_1_0);

        for (final VirtualFile file : files) {
            InputStream xmlStream = null;

            try {
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.registerRootElement()

        return timers;
    }

    private XMLMapper createMapper(TimerServiceImpl timerService) {
        final XMLMapper mapper = XMLMapper.Factory.create();
        mapper.registerRootElement(new QName(EjbTimerXmlParser_1_0.NAMESPACE, EjbTimerXmlPersister.TIMERS), new EjbTimerXmlParser_1_0(timerService, factory, configuration, timerService.getTimedObjectInvoker().getValue().getClassLoader()));
        return mapper;
    }


    private File fileName(String timedObjectId, String timerId) {
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.registerRootElement()

        final Set<VirtualFile> files = messageDestinations(deploymentUnit);


        final XMLMapper mapper = XMLMapper.Factory.create();
        final MessagingDeploymentParser_1_0 messagingDeploymentParser_1_0 = new MessagingDeploymentParser_1_0(JBossDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
        mapper.registerRootElement(ROOT_1_0, messagingDeploymentParser_1_0);
        mapper.registerRootElement(ROOT_NO_NAMESPACE, messagingDeploymentParser_1_0);

        for (final VirtualFile file : files) {
            InputStream xmlStream = null;
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.registerRootElement()


        final XMLMapper mapper = XMLMapper.Factory.create();
        final MessagingDeploymentParser_1_0 messagingDeploymentParser_1_0 = new MessagingDeploymentParser_1_0(JBossDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
        mapper.registerRootElement(ROOT_1_0, messagingDeploymentParser_1_0);
        mapper.registerRootElement(ROOT_NO_NAMESPACE, messagingDeploymentParser_1_0);

        for (final VirtualFile file : files) {
            InputStream xmlStream = null;

            try {
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.