Examples of writeModel()


Examples of org.evolizer.ontology.exporter.main.Exporter.writeModel()

   
    for (Object object : testEntities) {
      exporter.export(object);
    }
   
    exporter.writeModel();
   
    fail("Hey dude, you should really implement a real test!");
 

  private void createModel() {
View Full Code Here

Examples of org.evolizer.ontology.exporter.main.Exporter.writeModel()

   
    for (Object object : testEntities) {
      exporter.export(object);
    }
   
    exporter.writeModel();
   
    fail("Hey dude, you should really implement a real test!");
 

  private void createModel() {
View Full Code Here

Examples of org.gephi.data.attributes.serialization.AttributeModelSerializer.writeModel()

    public void testSerializer() {
        try {
            AttributeModelSerializer serializer = new AttributeModelSerializer();
            StringWriter stringWriter = new StringWriter();
            XMLStreamWriter writer = createWriter(stringWriter);
            serializer.writeModel(writer, model);
            writer.close();
            String s1 = stringWriter.toString();
            System.out.println(s1);
            IndexedAttributeModel model2 = new IndexedAttributeModel();
            StringReader stringReader = new StringReader(s1);
View Full Code Here

Examples of org.gephi.data.attributes.serialization.AttributeModelSerializer.writeModel()

            StringReader stringReader = new StringReader(s1);
            XMLStreamReader reader = createReader(stringReader);
            serializer.readModel(reader, model2);
            stringWriter = new StringWriter();
            writer = createWriter(stringWriter);
            serializer.writeModel(writer, model2);
            String s2 = stringWriter.toString();
            System.out.println(s2);
            assertEquals(s1, s2);
        } catch (XMLStreamException ex) {
            Exceptions.printStackTrace(ex);
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

        final Resource rootResource = Resource.Factory.create();
        final Resource host = Resource.Factory.create();
        final Resource serverOneConfig = Resource.Factory.create();
        final ModelNode serverOneModel = new ModelNode();
        serverOneModel.get(GROUP).set("group-one");
        serverOneConfig.writeModel(serverOneModel);
        host.registerChild(PathElement.pathElement(SERVER_CONFIG, "server-one"), serverOneConfig);

        final Resource serverTwoConfig = Resource.Factory.create();
        final ModelNode serverTwoModel = new ModelNode();
        serverTwoModel.get(GROUP).set("group-one");
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

        host.registerChild(PathElement.pathElement(SERVER_CONFIG, "server-one"), serverOneConfig);

        final Resource serverTwoConfig = Resource.Factory.create();
        final ModelNode serverTwoModel = new ModelNode();
        serverTwoModel.get(GROUP).set("group-one");
        serverTwoConfig.writeModel(serverTwoModel);
        host.registerChild(PathElement.pathElement(SERVER_CONFIG, "server-two"), serverTwoConfig);

        final Resource serverThreeConfig = Resource.Factory.create();
        final ModelNode serverThreeModel = new ModelNode();
        serverThreeModel.get(GROUP).set("group-two");
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

        host.registerChild(PathElement.pathElement(SERVER_CONFIG, "server-two"), serverTwoConfig);

        final Resource serverThreeConfig = Resource.Factory.create();
        final ModelNode serverThreeModel = new ModelNode();
        serverThreeModel.get(GROUP).set("group-two");
        serverThreeConfig.writeModel(serverThreeModel);
        host.registerChild(PathElement.pathElement(SERVER_CONFIG, "server-three"), serverThreeConfig);

        rootResource.registerChild(PathElement.pathElement(HOST, "localhost"), host);
        hack(rootResource, EXTENSION);
        hack(rootResource, PATH);
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

                if (!appliedExtensions.contains(module)) {
                    appliedExtensions.add(module);
                    initializeExtension(module);
                }
            }
            resource.writeModel(resourceDescription.get("domain-resource-model"));

            // Track deployment and management content hashes and server group deployments so we can pull over the content we need
            if (resourceAddress.size() == 1) {
                PathElement pe = resourceAddress.getElement(0);
                String peKey = pe.getKey();
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

        }
        if(recursive) {
            return model.clone();
        } else {
            final Resource copy = Resource.Factory.create();
            copy.writeModel(model.getModel());
            for(final String childType : model.getChildTypes()) {
                for(final Resource.ResourceEntry child : model.getChildren(childType)) {
                    copy.registerChild(child.getPathElement(), PlaceholderResource.INSTANCE);
                }
            }
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

        synthOp.get(contentAttribute.getName()).set(operation.get(ModelDescriptionConstants.VALUE));
        contentAttribute.validateAndSet(synthOp, model);

        final Resource resource = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS);
        // IMPORTANT: Use writeModel, as this is what causes the content to be flushed to the content repo!
        resource.writeModel(model);

        context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER);
    }
}
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.