📄 objelement.java
字号:
// You can redistribute this software and/or modify it under the terms of
// the Ozone Core License version 1 published by ozone-db.org.
//
// The original code and portions created by SMB are
// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
//
// $Id: ObjElement.java,v 1.2 2002/08/27 08:32:26 per_nyfelt Exp $
package org.ozoneDB.core.xml;
import org.xml.sax.*;
/**
* This class saves all attributes of the objElement.
*
* @version $Revision: 1.2 $
* @author <a href="http://www.softwarebuero.de">SMB</a>
*/
public class ObjElement implements Consts {
//
// member
//
/**
* The type of the obj.
*/
private String className;
/**
* The id of the obj.
*/
private String id;
/**
* The object!!
*/
private Object obj;
/**
* The name of the OzoneObject (if the object is an OzoneObject).
*/
private String ozoneObjectName;
/**
* The id of the OzoneObject (if the object is an OzoneObject).
*/
private String ozoneObjectId;
//
// construcor
//
/**
*/
public ObjElement () {
}
/**
* The constructor creates a new instance of the obj with this className.
*
* @param atts (the attributes)
*/
public ObjElement (Attributes atts)
throws ClassNotFoundException, InstantiationException, IllegalAccessException {
className = atts.getValue(ATTR_TYPE);
id = atts.getValue(ATTR_ID);
ozoneObjectName = atts.getValue(OzoneObjAttsFactory.ATTR_OBJNAME);
ozoneObjectId = atts.getValue(OzoneObjAttsFactory.ATTR_OBJID);
Class objClass = Thread.currentThread().getContextClassLoader().loadClass(className);
obj = objClass.newInstance();
}
//
// methods
//
/**
*/
public String getClassName() {
return className;
}
/**
*/
public String getId() {
return id;
}
/**
*/
public Object getObject() {
return obj;
}
/**
*/
public Object getOzoneObjectName() {
return ozoneObjectName;
}
/**
*/
public Object getOzoneObjectId() {
return ozoneObjectId;
}
/**
*/
public String toString() {
return ("ObjElement: " + className);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -