01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/metaobj/tags/sakai_2-4-1/metaobj-api/api/src/java/org/sakaiproject/metaobj/utils/xml/ValidatedNode.java $
03: * $Id: ValidatedNode.java 9469 2006-05-15 14:52:05Z chmaurer@iupui.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2004, 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.metaobj.utils.xml;
21:
22: import java.util.List;
23:
24: import org.jdom.Element;
25:
26: /**
27: * Created by IntelliJ IDEA.
28: * User: John Ellis
29: * Date: Apr 15, 2004
30: * Time: 11:10:17 AM
31: * To change this template use File | Settings | File Templates.
32: */
33: public interface ValidatedNode {
34:
35: /**
36: * Get the schema responsible for this node.
37: *
38: * @return
39: */
40: public SchemaNode getSchema();
41:
42: /**
43: * Get the named child node as a validated node
44: *
45: * @param elementName
46: * @return
47: */
48: public ValidatedNode getChild(String elementName);
49:
50: /**
51: * Get all the direct children of this node as
52: * a list of ValidatedNode objects
53: *
54: * @return
55: */
56: public List getChildren();
57:
58: /**
59: * Get all the named direct children of this node
60: * as a list of ValidatedNode objects.
61: *
62: * @param elementName
63: * @return
64: */
65: public List getChildren(String elementName);
66:
67: /**
68: * Get the normalized value of this element as an object.
69: * Note: in the case of complex nodes, this could return
70: * either a List of ValidatedNode objects (the children of this node)
71: *
72: * @return
73: */
74: public Object getNormalizedValue();
75:
76: /**
77: * The list of errors associated with this node
78: *
79: * @return
80: */
81: public List getErrors();
82:
83: /**
84: * This returnes the element associated with this node.
85: *
86: * @return
87: */
88: public Element getElement();
89:
90: }
|