/* * 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 #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_