// Path: src/org/openddr/simpleapi/oddr/model/device/Device.java
// public class Device extends BuiltObject implements Comparable, Cloneable {
// 
//     private String id;
//     private String parentId = "root";
// 
//     public String getId() {
//         return id;
//     }
// 
//     public void setId(String id) {
//         this.id = id;
//     }
// 
//     public String getParentId() {
//         return parentId;
//     }
// 
//     public void setParentId(String parentId) {
//         this.parentId = parentId;
//     }
// 
//     public int compareTo(Object o) {
//         if (o == null || !(o instanceof Device)) {
//             return Integer.MAX_VALUE;
//         }
// 
//         Device bd = (Device) o;
//         return this.getConfidence() - bd.getConfidence();
//     }
// 
//     public Object clone() {
//         Device d = new Device();
//         d.setId(id);
//         d.setParentId(parentId);
//         d.setConfidence(getConfidence());
//         d.putPropertiesMap(getPropertiesMap());
//         return d;
//     }
// 
//     public boolean containsProperty(String propertyName) {
// 	return
// 	    properties != null &&
// 	    properties.containsKey(propertyName);
//     }
// }


import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.Map;
import org.openddr.simpleapi.oddr.model.device.Device;
/**
 * Copyright 2011 OpenDDR LLC
 * This software is distributed under the terms of the GNU Lesser General Public License.
 *
 *
 * This file is part of OpenDDR Simple APIs.
 * OpenDDR Simple APIs is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 *
 * OpenDDR Simple APIs is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Simple APIs.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
package org.openddr.simpleapi.oddr.builder.device;


public abstract class OrderedTokenDeviceBuilder implements DeviceBuilder {

    protected LinkedHashMap<String, Object> orderedRules;

    public OrderedTokenDeviceBuilder() {
        orderedRules = new LinkedHashMap<String, Object>();
    }

// Path: src/org/openddr/simpleapi/oddr/model/device/Device.java
// public class Device extends BuiltObject implements Comparable, Cloneable {
// 
//     private String id;
//     private String parentId = "root";
// 
//     public String getId() {
//         return id;
//     }
// 
//     public void setId(String id) {
//         this.id = id;
//     }
// 
//     public String getParentId() {
//         return parentId;
//     }
// 
//     public void setParentId(String parentId) {
//         this.parentId = parentId;
//     }
// 
//     public int compareTo(Object o) {
//         if (o == null || !(o instanceof Device)) {
//             return Integer.MAX_VALUE;
//         }
// 
//         Device bd = (Device) o;
//         return this.getConfidence() - bd.getConfidence();
//     }
// 
//     public Object clone() {
//         Device d = new Device();
//         d.setId(id);
//         d.setParentId(parentId);
//         d.setConfidence(getConfidence());
//         d.putPropertiesMap(getPropertiesMap());
//         return d;
//     }
// 
//     public boolean containsProperty(String propertyName) {
// 	return
// 	    properties != null &&
// 	    properties.containsKey(propertyName);
//     }
// }


// Path: src/org/openddr/simpleapi/oddr/builder/device/OrderedTokenDeviceBuilder.java
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.Map;
import org.openddr.simpleapi.oddr.model.device.Device;

/**
 * Copyright 2011 OpenDDR LLC
 * This software is distributed under the terms of the GNU Lesser General Public License.
 *
 *
 * This file is part of OpenDDR Simple APIs.
 * OpenDDR Simple APIs is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 *
 * OpenDDR Simple APIs is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Simple APIs.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
package org.openddr.simpleapi.oddr.builder.device;


public abstract class OrderedTokenDeviceBuilder implements DeviceBuilder {

    protected LinkedHashMap<String, Object> orderedRules;

    public OrderedTokenDeviceBuilder() {
        orderedRules = new LinkedHashMap<String, Object>();
    }

    abstract protected void afterOderingCompleteInit(Map<String, Device> devices);