summaryrefslogtreecommitdiffstats
path: root/sdo-cpp/trunk/runtime/core/src/commonj/sdo/PropertyDefinition.h
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-16 06:48:18 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-16 06:48:18 +0000
commit2cd577564c1e4a37b25f4064b84af15d112b0654 (patch)
treec2181bdc5c0e13fd9fa54b5fb9f4e4f359971303 /sdo-cpp/trunk/runtime/core/src/commonj/sdo/PropertyDefinition.h
parentc5846d0e19e3b5fd9d818d714fea2df3f3ef90eb (diff)
Cleaning up SVN structure, moving sdo trunk to sdo-cpp/trunk.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@880627 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sdo-cpp/trunk/runtime/core/src/commonj/sdo/PropertyDefinition.h')
-rw-r--r--sdo-cpp/trunk/runtime/core/src/commonj/sdo/PropertyDefinition.h139
1 files changed, 139 insertions, 0 deletions
diff --git a/sdo-cpp/trunk/runtime/core/src/commonj/sdo/PropertyDefinition.h b/sdo-cpp/trunk/runtime/core/src/commonj/sdo/PropertyDefinition.h
new file mode 100644
index 0000000000..d468c8f4f6
--- /dev/null
+++ b/sdo-cpp/trunk/runtime/core/src/commonj/sdo/PropertyDefinition.h
@@ -0,0 +1,139 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#ifndef _PROPERTYDefinition_H_
+#define _PROPERTYDefinition_H_
+
+#include "export.h"
+
+#include <vector>
+#include "commonj/sdo/SDOString.h"
+
+
+
+namespace commonj
+{
+ namespace sdo
+ {
+ namespace internal
+ {
+ class PropertyDefinitionImpl;
+
+/**
+ * Internal Helper Class
+ * PropertyDefinitionImpl holds a property as defined by an XSD.
+ * The XSD holds more information than does the SDO Property.
+ * This class holds the extra information found as the XSD is
+ * parsed.
+ */
+ class SDO_API PropertyDefinition
+ {
+
+ public:
+
+
+ PropertyDefinition();
+ PropertyDefinition(const PropertyDefinition& pd);
+ PropertyDefinition& operator=(const PropertyDefinition& pd);
+
+ virtual ~PropertyDefinition();
+
+ PropertyDefinitionImpl* getPropertyDefinition();
+
+
+
+ // where this property is to be substituted for another
+ void setSubstituteName(const char * name);
+ void setSubstituteName(const SDOString& name);
+ const char* getSubstituteName() const;
+
+ void setSubstituteUri(const char* name);
+ void setSubstituteUri(const SDOString& name);
+ const char* getSubstituteUri() const;
+
+ // where there are substitute names for this property.
+ void addSubstitute(const char* name,
+ const char* localname);
+ void addSubstitute(const SDOString& name,
+ const SDOString& localname);
+ int getSubstituteCount() const;
+ const char* getSubstituteNames(unsigned int index) const;
+ const char* getSubstituteLocalNames(unsigned int index) const;
+
+
+ void setAliases(const char* aliases);
+ void setAliases(const SDOString& aliases);
+ const char* getAliases() const;
+
+ void setName(const char* name);
+ void setName(const SDOString& name);
+ const char* getName() const;
+
+ void setLocalName(const char* name);
+ void setLocalName(const SDOString& name);
+ const char* getLocalName() const;
+
+ void setType(const char* uri, const char* name);
+ void setType(const SDOString& uri, const SDOString& name);
+ const char * getTypeName() const;
+ const char * getTypeUri() const;
+ const char * getTypeFullName() const;
+ const char * getTypeFullLocalName() const ;
+
+ void setTypeFullLocalName(const char* name);
+ void setTypeFullLocalName(const SDOString& name);
+
+ void setDefaultValue(const char* value);
+ void setDefaultValue(const SDOString& value);
+ const char* getDefaultValue() const;
+
+ bool getIsMany() const;
+ bool getIsContainment() const;
+ bool getIsReadOnly() const;
+ bool getIsID() const;
+ bool getIsIDREF() const;
+ bool getIsReference() const;
+ bool getIsElement() const;
+ bool getIsQName() const;
+ bool getIsSubstitute() const;
+
+ void setIsMany(bool value);
+ void setIsContainment(bool value);
+ void setIsReadOnly(bool value);
+ void setIsID(bool value);
+ void setIsIDREF(bool value);
+ void setIsReference(bool value);
+ void setIsElement(bool value);
+ void setIsQName(bool value);
+ void setIsSubstitute(bool value);
+
+
+ private:
+ PropertyDefinitionImpl* propertydefinition;
+ void copy(const PropertyDefinition& pd);
+ };
+
+ } // End - namespace internal
+ } // End - namespace sdo
+} // End - namespace commonj
+
+
+#endif //_PROPERTYDefinitionImpl_H_