📄 o3qname.java
字号:
// You can redistribute this software and/or modify it under the terms of// the Ozone Library 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: O3QName.java,v 1.1 2003/11/02 18:10:03 per_nyfelt Exp $package org.ozoneDB.xml.dom4j.o3impl;import org.dom4j.*;import org.ozoneDB.OzoneInterface;import org.ozoneDB.OzoneRemoteException;import org.ozoneDB.xml.dom4j.OzoneDocumentFactory;import java.io.Serializable;/** * * @author Per Nyfelt */public class O3QName extends DefaultQName implements Serializable { final static long serialVersionUID = 1L; //private static final String SEP = OPP.SIGNATURE_DELIMITER; private transient OzoneInterface db; //private OzoneObject ozoneObject; private void init() { //ozoneObject = new OzoneObject(); } public static QName create(OzoneInterface db, String name) {// return (OzoneQName) db.createObject(O3QName.class,// String.class.getName(),// new Object[]{name}); NodeFactory nodeFactory = OzoneDocumentFactoryImpl.getInstance(db); O3QName obj = new O3QName(name, nodeFactory); obj.db = db; return obj; } public O3QName(String name, NodeFactory nodeFactory) { super(name, nodeFactory); init(); } public static QName create(OzoneInterface db, String name, Namespace namespace) {// final String signature = String.class.getName() + SEP + AbstractNamespace.class.getName();// return (OzoneQName) db.createObject(O3QName.class,// signature,// new Object[]{name, namespace}); NodeFactory nodeFactory = OzoneDocumentFactoryImpl.getInstance(db); O3QName obj = new O3QName(name, namespace, nodeFactory); obj.db = db; return obj; } public O3QName(String name, Namespace namespace, NodeFactory nodeFactory) { super(name, namespace, nodeFactory); init(); } public static QName create(OzoneInterface db, String name, Namespace namespace, String qualifiedName) {// final String signature = String.class.getName()// + SEP + AbstractNamespace.class.getName()// + SEP + String.class.getName();// return (OzoneQName) db.createObject(O3QName.class,// signature,// new Object[]{name, namespace, qualifiedName}); NodeFactory nodeFactory = OzoneDocumentFactoryImpl.getInstance(db); O3QName obj = new O3QName(name, namespace, qualifiedName, nodeFactory); obj.db = db; return obj; } public O3QName(String name, Namespace namespace, String qualifiedName, NodeFactory nodeFactory) { super(name, namespace, qualifiedName, nodeFactory); init(); } public DocumentFactory getDocumentFactory() { throw new OzoneRemoteException("getDocumentFactory will not work in Ozone"); } public NodeFactory getNodeFactory() { try { // todo: might be faster to return super.getNodeFactory() if it is instanceof OzoneCompatible first // before falling back to object for name look-up return (NodeFactory) db.objectForName(OzoneDocumentFactory.OBJECT_NAME); } catch (Exception e) { throw new OzoneRemoteException("NodeFctory not registered" + e.toString()); } } protected XPathFactory getXPathFactory() { try { // todo: might be faster to return super.getXPathFactory() if it is instanceof OzoneCompatible first // before falling back to object for name look-up return (XPathFactory) db.objectForName(OzoneDocumentFactory.OBJECT_NAME); } catch (Exception e) { throw new OzoneRemoteException("XPathFactory not registered" + e.toString()); } }/* public ObjectID getObjectID() { return ozoneObject.getObjectID(); } public void setContainer(ObjectContainer _container) { ozoneObject.setContainer(_container); } public ObjectContainer container() { return ozoneObject.container(); } public OzoneProxy self() { return ozoneObject.self(); } public OzoneInterface database() { return ozoneObject.database(); } public boolean toXML(ContentHandler ch) throws SAXException { return ozoneObject.toXML(ch); } public void onCreate() { } public void onActivate() { } public void onPassivate() { } public void onDelete() { }*/}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -