00001 /* AbiWord 00002 * Copyright (C) 2011 AbiSource, Inc. 00003 * Copyright (C) 2011 Ben Martin 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00018 * 02110-1301 USA. 00019 */ 00020 00021 #ifndef AP_DIALOG_RDFEDITOR_H 00022 #define AP_DIALOG_RDFEDITOR_H 00023 00024 #include <string> 00025 00026 #include "ap_Dialog_Modeless.h" 00027 #include "fv_View.h" 00028 #include "pd_DocumentRDF.h" 00029 00030 class XAP_Frame; 00031 00032 class ABI_EXPORT AP_Dialog_RDFEditor : public AP_Dialog_Modeless 00033 { 00034 protected: 00035 virtual XAP_String_Id getWindowTitleStringId(); 00036 00037 public: 00038 AP_Dialog_RDFEditor(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id); 00039 virtual ~AP_Dialog_RDFEditor(); 00040 00045 void showAllRDF(); 00046 void setRestrictedModel( PD_RDFModelHandle model ); 00047 std::string uriToPrefixed( const std::string& uri ); 00048 std::string prefixedToURI( const std::string& prefixed ); 00049 PD_RDFModelHandle getModel(); 00050 PD_DocumentRDFHandle getRDF(); 00051 void createStatement(); 00052 void copyStatement(); 00053 void setRestrictedXMLID( const std::string& xmlid ); 00054 00058 virtual void clear(); 00059 virtual void addStatement( const PD_RDFStatement& st ); 00060 virtual void setStatus( const std::string& msg ); 00061 virtual void removeStatement( const PD_RDFStatement& st ); 00062 virtual std::list< PD_RDFStatement > getSelection(); 00063 virtual void setSelection( const std::list< PD_RDFStatement >& l ); 00064 virtual void hideRestrictionXMLID( bool v ); 00065 00066 00067 protected: 00068 int m_count; 00069 PD_RDFModelHandle m_restrictedModel; 00070 bool m_hideRestrictionXMLID; 00071 00072 void setSelection( const PD_RDFStatement& st ); 00073 void statusIsTripleCount(); 00074 }; 00075 00076 #endif