tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / unoxml / source / rdf / CURI.cxx
blob8554a9a9fd5a3dc076a35cbbc8e7a4fe2439ee0f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <cppuhelper/implbase.hxx>
21 #include <cppuhelper/supportsservice.hxx>
22 #include <com/sun/star/lang/XServiceInfo.hpp>
23 #include <com/sun/star/lang/XInitialization.hpp>
24 #include <com/sun/star/rdf/XURI.hpp>
25 #include <com/sun/star/rdf/URIs.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <com/sun/star/lang/IllegalArgumentException.hpp>
31 /// anonymous implementation namespace
32 namespace {
34 class CURI:
35 public ::cppu::WeakImplHelper<
36 css::lang::XServiceInfo,
37 css::lang::XInitialization,
38 css::rdf::XURI>
40 public:
41 explicit CURI();
43 // css::lang::XServiceInfo:
44 virtual OUString SAL_CALL getImplementationName() override;
45 virtual sal_Bool SAL_CALL supportsService(const OUString & ServiceName) override;
46 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
48 // css::lang::XInitialization:
49 virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > & aArguments) override;
51 // css::rdf::XNode:
52 virtual OUString SAL_CALL getStringValue() override;
54 // css::rdf::XURI:
55 virtual OUString SAL_CALL getLocalName() override;
56 virtual OUString SAL_CALL getNamespace() override;
58 private:
59 CURI(CURI const&) = delete;
60 CURI& operator=(CURI const&) = delete;
62 /// handle css.rdf.URIs
63 void initFromConstant(const sal_Int16 i_Constant);
65 OUString m_Namespace;
66 OUString m_LocalName;
69 CURI::CURI()
72 // com.sun.star.uno.XServiceInfo:
73 OUString SAL_CALL CURI::getImplementationName()
75 return u"CURI"_ustr;
78 sal_Bool SAL_CALL CURI::supportsService(OUString const & serviceName)
80 return cppu::supportsService(this, serviceName);
83 css::uno::Sequence< OUString > SAL_CALL CURI::getSupportedServiceNames()
85 return { u"com.sun.star.rdf.URI"_ustr };
88 constexpr OUString s_nsXSD = u"http://www.w3.org/2001/XMLSchema-datatypes#"_ustr;
89 constexpr OUString s_nsRDF = u"http://www.w3.org/1999/02/22-rdf-syntax-ns#"_ustr;
90 constexpr OUString s_nsRDFs = u"http://www.w3.org/2000/01/rdf-schema#"_ustr;
91 constexpr OUString s_nsOWL = u"http://www.w3.org/2002/07/owl#"_ustr;
92 constexpr OUString s_nsPkg = u"http://docs.oasis-open.org/ns/office/1.2/meta/pkg#"_ustr;
93 constexpr OUString s_nsODF = u"http://docs.oasis-open.org/ns/office/1.2/meta/odf#"_ustr;
94 constexpr OUString s_nsLO_EXT =
95 u"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0odf#"_ustr;
97 void CURI::initFromConstant(const sal_Int16 i_Constant)
99 OUString ns;
100 OUString ln;
101 switch (i_Constant)
103 case css::rdf::URIs::XSD_NCNAME:
104 ns = s_nsXSD;
105 ln = u"NCName"_ustr;
106 break;
108 case css::rdf::URIs::XSD_STRING:
109 ns = s_nsXSD;
110 ln = u"string"_ustr;
111 break;
113 case css::rdf::URIs::XSD_NORMALIZEDSTRING:
114 ns = s_nsXSD;
115 ln = u"normalizedString"_ustr;
116 break;
118 case css::rdf::URIs::XSD_BOOLEAN:
119 ns = s_nsXSD;
120 ln = u"boolean"_ustr;
121 break;
123 case css::rdf::URIs::XSD_DECIMAL:
124 ns = s_nsXSD;
125 ln = u"decimal"_ustr;
126 break;
128 case css::rdf::URIs::XSD_FLOAT:
129 ns = s_nsXSD;
130 ln = u"float"_ustr;
131 break;
133 case css::rdf::URIs::XSD_DOUBLE:
134 ns = s_nsXSD;
135 ln = u"double"_ustr;
136 break;
138 case css::rdf::URIs::XSD_INTEGER:
139 ns = s_nsXSD;
140 ln = u"integer"_ustr;
141 break;
143 case css::rdf::URIs::XSD_NONNEGATIVEINTEGER:
144 ns = s_nsXSD;
145 ln = u"nonNegativeInteger"_ustr;
146 break;
148 case css::rdf::URIs::XSD_POSITIVEINTEGER:
149 ns = s_nsXSD;
150 ln = u"positiveInteger"_ustr;
151 break;
153 case css::rdf::URIs::XSD_NONPOSITIVEINTEGER:
154 ns = s_nsXSD;
155 ln = u"nonPositiveInteger"_ustr;
156 break;
158 case css::rdf::URIs::XSD_NEGATIVEINTEGER:
159 ns = s_nsXSD;
160 ln = u"negativeInteger"_ustr;
161 break;
163 case css::rdf::URIs::XSD_LONG:
164 ns = s_nsXSD;
165 ln = u"long"_ustr;
166 break;
168 case css::rdf::URIs::XSD_INT:
169 ns = s_nsXSD;
170 ln = u"int"_ustr;
171 break;
173 case css::rdf::URIs::XSD_SHORT:
174 ns = s_nsXSD;
175 ln = u"short"_ustr;
176 break;
178 case css::rdf::URIs::XSD_BYTE:
179 ns = s_nsXSD;
180 ln = u"byte"_ustr;
181 break;
183 case css::rdf::URIs::XSD_UNSIGNEDLONG:
184 ns = s_nsXSD;
185 ln = u"unsignedLong"_ustr;
186 break;
188 case css::rdf::URIs::XSD_UNSIGNEDINT:
189 ns = s_nsXSD;
190 ln = u"unsignedInt"_ustr;
191 break;
193 case css::rdf::URIs::XSD_UNSIGNEDSHORT:
194 ns = s_nsXSD;
195 ln = u"unsignedShort"_ustr;
196 break;
198 case css::rdf::URIs::XSD_UNSIGNEDBYTE:
199 ns = s_nsXSD;
200 ln = u"unsignedByte"_ustr;
201 break;
203 case css::rdf::URIs::XSD_HEXBINARY:
204 ns = s_nsXSD;
205 ln = u"hexBinary"_ustr;
206 break;
208 case css::rdf::URIs::XSD_BASE64BINARY:
209 ns = s_nsXSD;
210 ln = u"base64Binary"_ustr;
211 break;
213 case css::rdf::URIs::XSD_DATETIME:
214 ns = s_nsXSD;
215 ln = u"dateTime"_ustr;
216 break;
218 case css::rdf::URIs::XSD_TIME:
219 ns = s_nsXSD;
220 ln = u"time"_ustr;
221 break;
223 case css::rdf::URIs::XSD_DATE:
224 ns = s_nsXSD;
225 ln = u"date"_ustr;
226 break;
228 case css::rdf::URIs::XSD_GYEARMONTH:
229 ns = s_nsXSD;
230 ln = u"gYearMonth"_ustr;
231 break;
233 case css::rdf::URIs::XSD_GYEAR:
234 ns = s_nsXSD;
235 ln = u"gYear"_ustr;
236 break;
238 case css::rdf::URIs::XSD_GMONTHDAY:
239 ns = s_nsXSD;
240 ln = u"gMonthDay"_ustr;
241 break;
243 case css::rdf::URIs::XSD_GDAY:
244 ns = s_nsXSD;
245 ln = u"gDay"_ustr;
246 break;
248 case css::rdf::URIs::XSD_GMONTH:
249 ns = s_nsXSD;
250 ln = u"gMonth"_ustr;
251 break;
253 case css::rdf::URIs::XSD_ANYURI:
254 ns = s_nsXSD;
255 ln = u"anyURI"_ustr;
256 break;
258 case css::rdf::URIs::XSD_TOKEN:
259 ns = s_nsXSD;
260 ln = u"token"_ustr;
261 break;
263 case css::rdf::URIs::XSD_LANGUAGE:
264 ns = s_nsXSD;
265 ln = u"language"_ustr;
266 break;
268 case css::rdf::URIs::XSD_NMTOKEN:
269 ns = s_nsXSD;
270 ln = u"NMTOKEN"_ustr;
271 break;
273 case css::rdf::URIs::XSD_NAME:
274 ns = s_nsXSD;
275 ln = u"Name"_ustr;
276 break;
278 case css::rdf::URIs::XSD_DURATION:
279 ns = s_nsXSD;
280 ln = u"duration"_ustr;
281 break;
283 case css::rdf::URIs::XSD_QNAME:
284 ns = s_nsXSD;
285 ln = u"QName"_ustr;
286 break;
288 case css::rdf::URIs::XSD_NOTATION:
289 ns = s_nsXSD;
290 ln = u"NOTATION"_ustr;
291 break;
293 case css::rdf::URIs::XSD_NMTOKENS:
294 ns = s_nsXSD;
295 ln = u"NMTOKENS"_ustr;
296 break;
298 case css::rdf::URIs::XSD_ID:
299 ns = s_nsXSD;
300 ln = u"ID"_ustr;
301 break;
303 case css::rdf::URIs::XSD_IDREF:
304 ns = s_nsXSD;
305 ln = u"IDREF"_ustr;
306 break;
308 case css::rdf::URIs::XSD_IDREFS:
309 ns = s_nsXSD;
310 ln = u"IDREFS"_ustr;
311 break;
313 case css::rdf::URIs::XSD_ENTITY:
314 ns = s_nsXSD;
315 ln = u"ENTITY"_ustr;
316 break;
318 case css::rdf::URIs::XSD_ENTITIES:
319 ns = s_nsXSD;
320 ln = u"ENTITIES"_ustr;
321 break;
323 case css::rdf::URIs::RDF_TYPE:
324 ns = s_nsRDF;
325 ln = u"type"_ustr;
326 break;
328 case css::rdf::URIs::RDF_SUBJECT:
329 ns = s_nsRDF;
330 ln = u"subject"_ustr;
331 break;
333 case css::rdf::URIs::RDF_PREDICATE:
334 ns = s_nsRDF;
335 ln = u"predicate"_ustr;
336 break;
338 case css::rdf::URIs::RDF_OBJECT:
339 ns = s_nsRDF;
340 ln = u"object"_ustr;
341 break;
343 case css::rdf::URIs::RDF_PROPERTY:
344 ns = s_nsRDF;
345 ln = u"Property"_ustr;
346 break;
348 case css::rdf::URIs::RDF_STATEMENT:
349 ns = s_nsRDF;
350 ln = u"Statement"_ustr;
351 break;
353 case css::rdf::URIs::RDF_VALUE:
354 ns = s_nsRDF;
355 ln = u"value"_ustr;
356 break;
358 case css::rdf::URIs::RDF_FIRST:
359 ns = s_nsRDF;
360 ln = u"first"_ustr;
361 break;
363 case css::rdf::URIs::RDF_REST:
364 ns = s_nsRDF;
365 ln = u"rest"_ustr;
366 break;
368 case css::rdf::URIs::RDF_NIL:
369 ns = s_nsRDF;
370 ln = u"nil"_ustr;
371 break;
373 case css::rdf::URIs::RDF_XMLLITERAL:
374 ns = s_nsRDF;
375 ln = u"XMLLiteral"_ustr;
376 break;
378 case css::rdf::URIs::RDF_ALT:
379 ns = s_nsRDF;
380 ln = u"Alt"_ustr;
381 break;
383 case css::rdf::URIs::RDF_BAG:
384 ns = s_nsRDF;
385 ln = u"Bag"_ustr;
386 break;
388 case css::rdf::URIs::RDF_LIST:
389 ns = s_nsRDF;
390 ln = u"List"_ustr;
391 break;
393 case css::rdf::URIs::RDF_SEQ:
394 ns = s_nsRDF;
395 ln = u"Seq"_ustr;
396 break;
398 case css::rdf::URIs::RDF_1:
399 ns = s_nsRDF;
400 ln = u"_1"_ustr;
401 break;
403 case css::rdf::URIs::RDFS_COMMENT:
404 ns = s_nsRDFs;
405 ln = u"comment"_ustr;
406 break;
408 case css::rdf::URIs::RDFS_LABEL:
409 ns = s_nsRDFs;
410 ln = u"label"_ustr;
411 break;
413 case css::rdf::URIs::RDFS_DOMAIN:
414 ns = s_nsRDFs;
415 ln = u"domain"_ustr;
416 break;
418 case css::rdf::URIs::RDFS_RANGE:
419 ns = s_nsRDFs;
420 ln = u"range"_ustr;
421 break;
423 case css::rdf::URIs::RDFS_SUBCLASSOF:
424 ns = s_nsRDFs;
425 ln = u"subClassOf"_ustr;
426 break;
428 case css::rdf::URIs::RDFS_LITERAL:
429 ns = s_nsRDFs;
430 ln = u"Literal"_ustr;
431 break;
433 case css::rdf::URIs::OWL_CLASS:
434 ns = s_nsOWL;
435 ln = u"Class"_ustr;
436 break;
438 case css::rdf::URIs::OWL_OBJECTPROPERTY:
439 ns = s_nsOWL;
440 ln = u"ObjectProperty"_ustr;
441 break;
443 case css::rdf::URIs::OWL_DATATYPEPROPERTY:
444 ns = s_nsOWL;
445 ln = u"DatatypeProperty"_ustr;
446 break;
448 case css::rdf::URIs::OWL_FUNCTIONALPROPERTY:
449 ns = s_nsOWL;
450 ln = u"FunctionalProperty"_ustr;
451 break;
453 case css::rdf::URIs::OWL_THING:
454 ns = s_nsOWL;
455 ln = u"Thing"_ustr;
456 break;
458 case css::rdf::URIs::OWL_NOTHING:
459 ns = s_nsOWL;
460 ln = u"Nothing"_ustr;
461 break;
463 case css::rdf::URIs::OWL_INDIVIDUAL:
464 ns = s_nsOWL;
465 ln = u"Individual"_ustr;
466 break;
468 case css::rdf::URIs::OWL_EQUIVALENTCLASS:
469 ns = s_nsOWL;
470 ln = u"equivalentClass"_ustr;
471 break;
473 case css::rdf::URIs::OWL_EQUIVALENTPROPERTY:
474 ns = s_nsOWL;
475 ln = u"equivalentProperty"_ustr;
476 break;
478 case css::rdf::URIs::OWL_SAMEAS:
479 ns = s_nsOWL;
480 ln = u"sameAs"_ustr;
481 break;
483 case css::rdf::URIs::OWL_DIFFERENTFROM:
484 ns = s_nsOWL;
485 ln = u"differentFrom"_ustr;
486 break;
488 case css::rdf::URIs::OWL_ALLDIFFERENT:
489 ns = s_nsOWL;
490 ln = u"AllDifferent"_ustr;
491 break;
493 case css::rdf::URIs::OWL_DISTINCTMEMBERS:
494 ns = s_nsOWL;
495 ln = u"distinctMembers"_ustr;
496 break;
498 case css::rdf::URIs::OWL_INVERSEOF:
499 ns = s_nsOWL;
500 ln = u"inverseOf"_ustr;
501 break;
503 case css::rdf::URIs::OWL_TRANSITIVEPROPERTY:
504 ns = s_nsOWL;
505 ln = u"TransitiveProperty"_ustr;
506 break;
508 case css::rdf::URIs::OWL_SYMMETRICPROPERTY:
509 ns = s_nsOWL;
510 ln = u"SymmetricProperty"_ustr;
511 break;
513 case css::rdf::URIs::OWL_INVERSEFUNCTIONALPROPERTY:
514 ns = s_nsOWL;
515 ln = u"InverseFunctionalProperty"_ustr;
516 break;
518 case css::rdf::URIs::OWL_RESTRICTION:
519 ns = s_nsOWL;
520 ln = u"Restriction"_ustr;
521 break;
523 case css::rdf::URIs::OWL_ONPROPERTY:
524 ns = s_nsOWL;
525 ln = u"onProperty"_ustr;
526 break;
528 case css::rdf::URIs::OWL_ALLVALUESFROM:
529 ns = s_nsOWL;
530 ln = u"allValuesFrom"_ustr;
531 break;
533 case css::rdf::URIs::OWL_SOMEVALUESFROM:
534 ns = s_nsOWL;
535 ln = u"someValuesFrom"_ustr;
536 break;
538 case css::rdf::URIs::OWL_MINCARDINALITY:
539 ns = s_nsOWL;
540 ln = u"minCardinality"_ustr;
541 break;
543 case css::rdf::URIs::OWL_MAXCARDINALITY:
544 ns = s_nsOWL;
545 ln = u"maxCardinality"_ustr;
546 break;
548 case css::rdf::URIs::OWL_CARDINALITY:
549 ns = s_nsOWL;
550 ln = u"cardinality"_ustr;
551 break;
553 case css::rdf::URIs::OWL_ONTOLOGY:
554 ns = s_nsOWL;
555 ln = u"Ontology"_ustr;
556 break;
558 case css::rdf::URIs::OWL_IMPORTS:
559 ns = s_nsOWL;
560 ln = u"imports"_ustr;
561 break;
563 case css::rdf::URIs::OWL_VERSIONINFO:
564 ns = s_nsOWL;
565 ln = u"versionInfo"_ustr;
566 break;
568 case css::rdf::URIs::OWL_PRIORVERSION:
569 ns = s_nsOWL;
570 ln = u"priorVersion"_ustr;
571 break;
573 case css::rdf::URIs::OWL_BACKWARDCOMPATIBLEWITH:
574 ns = s_nsOWL;
575 ln = u"backwardCompatibleWith"_ustr;
576 break;
578 case css::rdf::URIs::OWL_INCOMPATIBLEWITH:
579 ns = s_nsOWL;
580 ln = u"incompatibleWith"_ustr;
581 break;
583 case css::rdf::URIs::OWL_DEPRECATEDCLASS:
584 ns = s_nsOWL;
585 ln = u"DeprecatedClass"_ustr;
586 break;
588 case css::rdf::URIs::OWL_DEPRECATEDPROPERTY:
589 ns = s_nsOWL;
590 ln = u"DeprecatedProperty"_ustr;
591 break;
593 case css::rdf::URIs::OWL_ANNOTATIONPROPERTY:
594 ns = s_nsOWL;
595 ln = u"AnnotationProperty"_ustr;
596 break;
598 case css::rdf::URIs::OWL_ONTOLOGYPROPERTY:
599 ns = s_nsOWL;
600 ln = u"OntologyProperty"_ustr;
601 break;
603 case css::rdf::URIs::OWL_ONEOF:
604 ns = s_nsOWL;
605 ln = u"oneOf"_ustr;
606 break;
608 case css::rdf::URIs::OWL_DATARANGE:
609 ns = s_nsOWL;
610 ln = u"dataRange"_ustr;
611 break;
613 case css::rdf::URIs::OWL_DISJOINTWITH:
614 ns = s_nsOWL;
615 ln = u"disjointWith"_ustr;
616 break;
618 case css::rdf::URIs::OWL_UNIONOF:
619 ns = s_nsOWL;
620 ln = u"unionOf"_ustr;
621 break;
623 case css::rdf::URIs::OWL_COMPLEMENTOF:
624 ns = s_nsOWL;
625 ln = u"complementOf"_ustr;
626 break;
628 case css::rdf::URIs::OWL_INTERSECTIONOF:
629 ns = s_nsOWL;
630 ln = u"intersectionOf"_ustr;
631 break;
633 case css::rdf::URIs::OWL_HASVALUE:
634 ns = s_nsOWL;
635 ln = u"hasValue"_ustr;
636 break;
639 case css::rdf::URIs::PKG_HASPART:
640 ns = s_nsPkg;
641 ln = u"hasPart"_ustr;
642 break;
644 case css::rdf::URIs::PKG_MIMETYPE:
645 ns = s_nsPkg;
646 ln = u"mimeType"_ustr;
647 break;
649 case css::rdf::URIs::PKG_PACKAGE:
650 ns = s_nsPkg;
651 ln = u"Package"_ustr;
652 break;
654 case css::rdf::URIs::PKG_ELEMENT:
655 ns = s_nsPkg;
656 ln = u"Element"_ustr;
657 break;
659 case css::rdf::URIs::PKG_FILE:
660 ns = s_nsPkg;
661 ln = u"File"_ustr;
662 break;
664 case css::rdf::URIs::PKG_METADATAFILE:
665 ns = s_nsPkg;
666 ln = u"MetadataFile"_ustr;
667 break;
669 case css::rdf::URIs::PKG_DOCUMENT:
670 ns = s_nsPkg;
671 ln = u"Document"_ustr;
672 break;
674 case css::rdf::URIs::ODF_PREFIX:
675 ns = s_nsODF;
676 ln = u"prefix"_ustr;
677 break;
679 case css::rdf::URIs::ODF_SUFFIX:
680 ns = s_nsODF;
681 ln = u"suffix"_ustr;
682 break;
684 case css::rdf::URIs::ODF_ELEMENT:
685 ns = s_nsODF;
686 ln = u"Element"_ustr;
687 break;
689 case css::rdf::URIs::ODF_CONTENTFILE:
690 ns = s_nsODF;
691 ln = u"ContentFile"_ustr;
692 break;
694 case css::rdf::URIs::ODF_STYLESFILE:
695 ns = s_nsODF;
696 ln = u"StylesFile"_ustr;
697 break;
699 case css::rdf::URIs::LO_EXT_SHADING:
700 ns = s_nsLO_EXT;
701 ln = u"shading"_ustr;
702 break;
704 default:
705 throw css::lang::IllegalArgumentException(
706 u"CURI::initialize: invalid URIs constant argument"_ustr, *this, 0);
708 m_Namespace = ns;
709 m_LocalName = ln;
712 // css::lang::XInitialization:
713 void SAL_CALL CURI::initialize(const css::uno::Sequence< css::uno::Any > & aArguments)
715 sal_Int32 len = aArguments.getLength();
716 if ((len < 1) || (len > 2)) {
717 throw css::lang::IllegalArgumentException(
718 u"CURI::initialize: must give 1 or 2 argument(s)"_ustr, *this, 2);
721 sal_Int16 arg(0);
722 OUString arg0;
723 OUString arg1;
724 if (aArguments[0] >>= arg) {
725 // integer argument: constant from rdf::URIs
726 if (len != 1) {
727 throw css::lang::IllegalArgumentException(
728 u"CURI::initialize: must give 1 int argument"_ustr, *this, 1);
730 initFromConstant(arg);
731 return;
733 if (!(aArguments[0] >>= arg0)) {
734 throw css::lang::IllegalArgumentException(
735 u"CURI::initialize: argument must be string or short"_ustr, *this, 0);
737 if (len > 1) {
738 if (!(aArguments[1] >>= arg1)) {
739 throw css::lang::IllegalArgumentException(
740 u"CURI::initialize: argument must be string"_ustr, *this, 1);
742 // just append the parameters and then split them again; seems simplest
743 arg0 = arg0 + arg1;
744 arg1.clear();
747 // split parameter
748 sal_Int32 idx = arg0.indexOf('#');
749 if (idx < 0)
750 idx = arg0.lastIndexOf('/');
751 if (idx < 0)
752 idx = arg0.lastIndexOf(':');
753 if (idx < 0)
755 throw css::lang::IllegalArgumentException(
756 u"CURI::initialize: argument not splittable: no separator [#/:]"_ustr, *this, 0);
758 if (idx < arg0.getLength() - 1) {
759 arg1 = arg0.copy(idx+1);
760 arg0 = arg0.copy(0, idx+1);
763 //FIXME: what is legal?
764 if (arg0.isEmpty()) {
765 throw css::lang::IllegalArgumentException(
766 u"CURI::initialize: argument is not valid namespace"_ustr, *this, 0);
768 m_Namespace = arg0;
770 //FIXME: what is legal?
771 if ((false)) {
772 throw css::lang::IllegalArgumentException(
773 u"CURI::initialize: argument is not valid local name"_ustr, *this, 1);
775 m_LocalName = arg1;
778 // css::rdf::XNode:
779 OUString SAL_CALL CURI::getStringValue()
781 return m_Namespace + m_LocalName;
784 // css::rdf::XURI:
785 OUString SAL_CALL CURI::getNamespace()
787 return m_Namespace;
790 OUString SAL_CALL CURI::getLocalName()
792 return m_LocalName;
795 } // closing anonymous implementation namespace
798 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
799 unoxml_CURI_get_implementation(
800 css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
802 return cppu::acquire(new CURI());
805 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */