⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mappingproperty.java

📁 METAmorphoses is a system for flexible and easy-to-use generation of RDF metadata directly from a re
💻 JAVA
字号:
package cz.cvut.felk.cs.metamorphoses.mapping;import java.util.ArrayList;import java.util.List;/** * <p>This class represents rdf 'Property' in mapping.</p> * <p> * <b>History:</b><br/> * Created: 29.7.2004<br/> * Last change: 29.7.2004<br/> * </p> * @author Martin Svihla (martin@svihla.net) */public class MappingProperty {	public static final int NO_CONTAINER = 0;	public static final int SEQ_CONTAINER = 1;	public static final int BAG_CONTAINER = 2;	public static final int ALT_CONTAINER = 3;		private String rdfLabel;	private String sql;	private String prefix;	private String suffix;	private int container = MappingProperty.NO_CONTAINER;	private boolean collection = false;	//private String containerNodeId;		private List attributes;		/**	 * 	 */	public MappingProperty(String rdfLabel, String sql, String prefix, String suffix, String container, List attributes) {		this.rdfLabel = rdfLabel;		this.sql = sql;		this.prefix = prefix;		this.suffix = suffix;				if (container.equals("")) this.container = MappingProperty.NO_CONTAINER;		else if (container.toLowerCase().equals(MappingTags.VALUE_SEQ)) this.container = MappingProperty.SEQ_CONTAINER;		else if (container.toLowerCase().equals(MappingTags.VALUE_BAG)) this.container = MappingProperty.BAG_CONTAINER;		else if (container.toLowerCase().equals(MappingTags.VALUE_ALT)) this.container = MappingProperty.ALT_CONTAINER;		else if (container.toLowerCase().equals(MappingTags.VALUE_COLLECTION)) {			attributes.add(new MappingAttribute("rdf:parseType", "", "Collection", ""));			this.container = MappingProperty.NO_CONTAINER;			this.collection = true;		} else throw new IllegalArgumentException("Illegal container value in MappingProperty constructor. Value: " + container);				//this.containerNodeId = containerNodeId;		this.attributes = attributes;			}		/**	 * @return	 */	public List getAttributes() {		return attributes;	}	/**	 * @return	 */	public String getRdfLabel() {		return rdfLabel;	}	/**	 * @return	 */	public String getSql() {		return sql;	}	public String getPrefix() {		return prefix;	}		public String getSuffix() {		return suffix;	}	/**	 * @return Returns the container.	 */	public int getContainer() {		return container;	}		public String getContainerLabel() {		switch (this.container) {			case MappingProperty.SEQ_CONTAINER: return "Seq";			case MappingProperty.BAG_CONTAINER: return "Bag";			case MappingProperty.ALT_CONTAINER: return "Alt";			default: return "";		}	}	/**	 * @return Returns the containerNodeId.	 */	//public String getContainerNodeId() {	//	return containerNodeId;	//}	public boolean isCollection() {		return collection;	}	public void setCollection(boolean collection) {		this.collection = collection;	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -