/**
 * *****************************************************************************
 * Copyright (c) 2016
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *     http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************
 */
/*



 */
package com.exalttech.trex.ui.views.streams.binders;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

/**
 *
 * Ethernet data binding model
 *
 * @author Georgekh
 */
public class EthernetDataBinding extends AbstractStreamDataBinding implements Externalizable {

    BooleanProperty overrideProperty = new SimpleBooleanProperty();
    StringProperty typeProperty = new SimpleStringProperty();

    /**
     *
     */
    public EthernetDataBinding() {
        setInitialValues();
    }

    /**
     * Return override type property
     *
     * @return
     */
    public BooleanProperty getOverrideProperty() {
        return overrideProperty;
    }

    /**
     * Set override type property
     *
     * @param overrideProperty
     */
    public void setOverrideProperty(BooleanProperty overrideProperty) {
        this.overrideProperty = overrideProperty;
    }

    /**
     * Return type property
     *
     * @return
     */
    public StringProperty getTypeProperty() {
        return typeProperty;
    }

    /**
     * Set type property
     *
     * @param typeProperty
     */
    public void setTypeProperty(StringProperty typeProperty) {
        this.typeProperty = typeProperty;
    }

    /**
     * Write serialized data
     *
     * @param out
     * @throws IOException
     */
    @Override
    public void writeExternal(ObjectOutput out) throws IOException {
        out.writeBoolean(overrideProperty.get());
        out.writeObject(typeProperty.get());
    }

    /**
     * Read serialized data
     *
     * @param in
     * @throws IOException
     * @throws ClassNotFoundException
     */
    @Override
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        getOverrideProperty().set(in.readBoolean());
        getTypeProperty().set((String) in.readObject());
    }

    /**
     * Initialize Ethernet properties values
     */
    @Override
    protected void setInitialValues() {
        overrideProperty.set(false);
        typeProperty.set("0800");
    }

}

@@ -912,24 +912,25 @@
 jectOutput;%0A
+%0A
 import javaf
@@ -1116,72 +1116,115 @@
 y;%0A%0A
-/**%0A *%0A * Ethernet data binding model%0A *%0A * @author Georgekh%0A */
+import com.fasterxml.jackson.annotation.JsonIgnore;%0Aimport com.fasterxml.jackson.annotation.JsonProperty;%0A%0A
 %0Apub
@@ -1315,20 +1315,43 @@
 zable %7B%0A
-%0A
    
+ @JsonIgnore%0A    private
  Boolean
@@ -1411,16 +1411,40 @@
 ();%0A    
+@JsonIgnore%0A    private 
 StringPr
@@ -1498,31 +1498,8 @@
 );%0A%0A
-    /**%0A     *%0A     */%0A
     
@@ -1572,78 +1572,19 @@
     
-/**%0A     * Return override type property%0A     *%0A     * @return%0A     */
+@JsonIgnore
 %0A   
@@ -1679,91 +1679,19 @@
     
-/**%0A     * Set override type property%0A     *%0A     * @param overrideProperty%0A     */
+@JsonIgnore
 %0A   
@@ -1824,69 +1824,19 @@
     
-/**%0A     * Return type property%0A     *%0A     * @return%0A     */
+@JsonIgnore
 %0A   
@@ -1922,78 +1922,19 @@
     
-/**%0A     * Set type property%0A     *%0A     * @param typeProperty%0A     */
+@JsonIgnore
 %0A   
@@ -2050,100 +2050,462 @@
     
-/**%0A     * Write serialized data%0A     *%0A     * @param out%0A     * @throws IOException%0A     */
+@JsonProperty(%22is_override%22)%0A    public boolean isOverride() %7B%0A        return overrideProperty.get();%0A    %7D%0A%0A    @JsonProperty(%22is_override%22)%0A    public void setOverride(final boolean isOverride) %7B%0A        overrideProperty.set(isOverride);%0A    %7D%0A%0A    @JsonProperty(%22type%22)%0A    public String getType() %7B%0A        return typeProperty.get();%0A    %7D%0A%0A    @JsonProperty(%22type%22)%0A    public void setType(final String type) %7B%0A        typeProperty.set(type);%0A    %7D%0A
 %0A   
@@ -2690,141 +2690,8 @@
  %7D%0A%0A
-    /**%0A     * Read serialized data%0A     *%0A     * @param in%0A     * @throws IOException%0A     * @throws ClassNotFoundException%0A     */%0A
     
@@ -2911,69 +2911,8 @@
  %7D%0A%0A
-    /**%0A     * Initialize Ethernet properties values%0A     */%0A
     
@@ -3038,11 +3038,10 @@
 ;%0A    %7D%0A
-%0A
 %7D%0A

Add jackson annotations to the EthernetDataBinding class