+++ /dev/null
-/*--------------------------------------------------------------------------\r
- * Copyright 2009 Taro L. Saito\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- *--------------------------------------------------------------------------*/\r
-//--------------------------------------\r
-// XerialJ\r
-//\r
-// SilkNodeBuilder.java\r
-// Since: Jul 29, 2009 6:32:16 PM\r
-//\r
-// $URL$\r
-// $Author$\r
-//--------------------------------------\r
-package org.xerial.silk;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import org.xerial.silk.impl.SilkNode;\r
-import org.xerial.silk.impl.SilkNodeOccurrence;\r
-\r
-/**\r
- * Silk node builder\r
- * \r
- * <pre>\r
- * - book(isbn:xxx-xxx, title: XML Data Management)\r
- * \r
- * @author leo\r
- * \r
- */\r
-public class SilkNodeBuilder {\r
-\r
- public final String nodeName;\r
- public final String nodeValue;\r
-\r
- public final List<SilkNode> attributeList = new ArrayList<SilkNode>();\r
-\r
- public SilkNodeBuilder(String nodeName, String nodeValue) {\r
- this.nodeName = nodeName;\r
- this.nodeValue = nodeValue;\r
- }\r
-\r
- public SilkNodeBuilder addNode(String nodeName, String value, SilkNodeOccurrence occurrence) {\r
-\r
- SilkNode n = new SilkNode();\r
- n.setName(nodeName);\r
- n.setValue(value);\r
- n.setOccurrence(occurrence);\r
- attributeList.add(n);\r
- return this;\r
- }\r
-\r
-}\r