From 7147bc15709f718c9ab87d3f06498eb9cdfa3a6d Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Mon, 24 Feb 2014 21:48:53 +0100 Subject: [PATCH] [New] added a new StrolchRootElement interface for Resource and Order --- src/main/java/li/strolch/model/Order.java | 5 ++-- src/main/java/li/strolch/model/Resource.java | 2 +- .../li/strolch/model/StrolchRootElement.java | 27 +++++++++++++++++++ 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 src/main/java/li/strolch/model/StrolchRootElement.java diff --git a/src/main/java/li/strolch/model/Order.java b/src/main/java/li/strolch/model/Order.java index feec6abc5..51026960a 100644 --- a/src/main/java/li/strolch/model/Order.java +++ b/src/main/java/li/strolch/model/Order.java @@ -33,10 +33,9 @@ import ch.eitchnet.utils.iso8601.ISO8601FormatFactory; * In this sense, orders do not need to be verified, so all verifier chracteristics are disabled and the * getVerifier()-method will return the null reference * - * @author eitch - * + * @author Robert von Burg */ -public class Order extends GroupedParameterizedElement { +public class Order extends GroupedParameterizedElement implements StrolchRootElement { private static final long serialVersionUID = 0L; diff --git a/src/main/java/li/strolch/model/Resource.java b/src/main/java/li/strolch/model/Resource.java index 7a86483d8..f33964b49 100644 --- a/src/main/java/li/strolch/model/Resource.java +++ b/src/main/java/li/strolch/model/Resource.java @@ -23,7 +23,7 @@ import org.w3c.dom.Element; /** * @author Robert von Burg */ -public class Resource extends GroupedParameterizedElement { +public class Resource extends GroupedParameterizedElement implements StrolchRootElement { private static final long serialVersionUID = 0L; diff --git a/src/main/java/li/strolch/model/StrolchRootElement.java b/src/main/java/li/strolch/model/StrolchRootElement.java new file mode 100644 index 000000000..37699c783 --- /dev/null +++ b/src/main/java/li/strolch/model/StrolchRootElement.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013 Robert von Burg + * + * 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 li.strolch.model; + +/** + * Root element for all top level {@link StrolchElement}. These are elements which have no parent, e.g. {@link Resource + * Resources} and {@link Order Orders} + * + * @author Robert von Burg + */ +public interface StrolchRootElement extends StrolchElement { + + // marker interface +}