version 1.61, 2002/07/25 16:19:45
|
version 1.62, 2002/07/30 16:14:53
|
|
|
// | // |
//------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ |
| |
String XmlReader::getClassOriginAttribute( |
CIMName XmlReader::getClassOriginAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
const XmlEntry& entry, | const XmlEntry& entry, |
const char* tagName) | const char* tagName) |
|
|
String name; | String name; |
| |
if (!entry.getAttributeValue("CLASSORIGIN", name)) | if (!entry.getAttributeValue("CLASSORIGIN", name)) |
return String(); |
return CIMName(); |
| |
if (!CIMName::legal(name)) | if (!CIMName::legal(name)) |
{ | { |
|
|
// | // |
//------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ |
| |
String XmlReader::getReferenceClassAttribute( |
CIMName XmlReader::getReferenceClassAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
const XmlEntry& entry, | const XmlEntry& entry, |
const char* elementName) | const char* elementName) |
|
|
String name; | String name; |
| |
if (!entry.getAttributeValue("REFERENCECLASS", name)) | if (!entry.getAttributeValue("REFERENCECLASS", name)) |
return String(); |
return CIMName(); |
| |
if (!CIMName::legal(name)) | if (!CIMName::legal(name)) |
{ | { |
|
|
// | // |
//------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ |
| |
String XmlReader::getSuperClassAttribute( |
CIMName XmlReader::getSuperClassAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
const XmlEntry& entry, | const XmlEntry& entry, |
const char* tagName) | const char* tagName) |
|
|
String superClass; | String superClass; |
| |
if (!entry.getAttributeValue("SUPERCLASS", superClass)) | if (!entry.getAttributeValue("SUPERCLASS", superClass)) |
return String(); |
return CIMName(); |
| |
if (!CIMName::legal(superClass)) | if (!CIMName::legal(superClass)) |
{ | { |
|
|
| |
// Get PROPERTY.CLASSORIGIN attribute: | // Get PROPERTY.CLASSORIGIN attribute: |
| |
String classOrigin = |
CIMName classOrigin = |
getClassOriginAttribute(parser.getLine(), entry, "PROPERTY"); | getClassOriginAttribute(parser.getLine(), entry, "PROPERTY"); |
| |
// Get PROPERTY.PROPAGATED | // Get PROPERTY.PROPAGATED |
|
|
// Create property: Sets type and !isarray | // Create property: Sets type and !isarray |
| |
CIMValue value(type, false); | CIMValue value(type, false); |
property = CIMProperty(name, value, 0, String(), classOrigin, propagated); |
property = CIMProperty(name, value, 0, CIMName(), classOrigin, propagated); |
| |
if (!empty) | if (!empty) |
{ | { |
|
|
| |
// Get PROPERTY.CLASSORIGIN attribute: | // Get PROPERTY.CLASSORIGIN attribute: |
| |
String classOrigin |
CIMName classOrigin |
= getClassOriginAttribute(parser.getLine(), entry, "PROPERTY.ARRAY"); | = getClassOriginAttribute(parser.getLine(), entry, "PROPERTY.ARRAY"); |
| |
// Get PROPERTY.ARRAY.PROPAGATED | // Get PROPERTY.ARRAY.PROPAGATED |
|
|
| |
CIMValue value(type, true, arraySize); | CIMValue value(type, true, arraySize); |
property = CIMProperty( | property = CIMProperty( |
name, value, arraySize, String(), classOrigin, propagated); |
name, value, arraySize, CIMName(), classOrigin, propagated); |
| |
if (!empty) | if (!empty) |
{ | { |
|
|
if (!XmlReader::getInstanceNameElement(parser, className, keyBindings)) | if (!XmlReader::getInstanceNameElement(parser, className, keyBindings)) |
return false; | return false; |
| |
instanceName.set(String(), String(), className, keyBindings); |
instanceName.set(String(), CIMNamespaceName(), className, keyBindings); |
return true; | return true; |
} | } |
| |
|
|
parser.putBack(entry); | parser.putBack(entry); |
String className; | String className; |
getClassNameElement(parser, className); | getClassNameElement(parser, className); |
reference.set(String(), String(), className); |
reference.set(String(), CIMNamespaceName(), className); |
} | } |
else if (strcmp(entry.text, "INSTANCEPATH") == 0) | else if (strcmp(entry.text, "INSTANCEPATH") == 0) |
{ | { |
|
|
String className; | String className; |
Array<KeyBinding> keyBindings; | Array<KeyBinding> keyBindings; |
getInstanceNameElement(parser, className, keyBindings); | getInstanceNameElement(parser, className, keyBindings); |
reference.set(String(), String(), className, keyBindings); |
reference.set(String(), CIMNamespaceName(), className, keyBindings); |
} | } |
| |
expectEndTag(parser, "VALUE.REFERENCE"); | expectEndTag(parser, "VALUE.REFERENCE"); |
|
|
| |
// Get PROPERTY.REFERENCECLASS attribute: | // Get PROPERTY.REFERENCECLASS attribute: |
| |
String referenceClass = getReferenceClassAttribute( |
CIMName referenceClass = getReferenceClassAttribute( |
parser.getLine(), entry, "PROPERTY.REFERENCE"); | parser.getLine(), entry, "PROPERTY.REFERENCE"); |
| |
// Get PROPERTY.CLASSORIGIN attribute: | // Get PROPERTY.CLASSORIGIN attribute: |
| |
String classOrigin = |
CIMName classOrigin = |
getClassOriginAttribute(parser.getLine(), entry, "PROPERTY.REFERENCE"); | getClassOriginAttribute(parser.getLine(), entry, "PROPERTY.REFERENCE"); |
| |
// Get PROPERTY.PROPAGATED | // Get PROPERTY.PROPAGATED |
|
|
| |
// Get PARAMETER.REFERENCECLASS attribute: | // Get PARAMETER.REFERENCECLASS attribute: |
| |
String referenceClass = getReferenceClassAttribute( |
CIMName referenceClass = getReferenceClassAttribute( |
parser.getLine(), entry, "PARAMETER.REFERENCE"); | parser.getLine(), entry, "PARAMETER.REFERENCE"); |
| |
// Create parameter: | // Create parameter: |
|
|
| |
// Get PARAMETER.REFERENCECLASS attribute: | // Get PARAMETER.REFERENCECLASS attribute: |
| |
String referenceClass = getReferenceClassAttribute( |
CIMName referenceClass = getReferenceClassAttribute( |
parser.getLine(), entry, "PARAMETER.REFARRAY"); | parser.getLine(), entry, "PARAMETER.REFARRAY"); |
| |
// Get PARAMETER.ARRAYSIZE attribute: | // Get PARAMETER.ARRAYSIZE attribute: |
|
|
| |
CIMType type = getCimTypeAttribute(parser.getLine(), entry, "PROPERTY"); | CIMType type = getCimTypeAttribute(parser.getLine(), entry, "PROPERTY"); |
| |
String classOrigin = |
CIMName classOrigin = |
getClassOriginAttribute(parser.getLine(), entry, "PROPERTY"); | getClassOriginAttribute(parser.getLine(), entry, "PROPERTY"); |
| |
Boolean propagated = getCimBooleanAttribute( | Boolean propagated = getCimBooleanAttribute( |
|
|
| |
String name = getCimNameAttribute(parser.getLine(), entry, "CLASS"); | String name = getCimNameAttribute(parser.getLine(), entry, "CLASS"); |
| |
String superClass = getSuperClassAttribute(parser.getLine(), entry,"CLASS"); |
CIMName superClass = getSuperClassAttribute(parser.getLine(), entry,"CLASS"); |
| |
cimClass = CIMClass(name, superClass); | cimClass = CIMClass(name, superClass); |
| |
|
|
| |
if (getClassNameElement(parser, className, false)) | if (getClassNameElement(parser, className, false)) |
{ | { |
objectName.set(String(), String(), className); |
objectName.set(String(), CIMNamespaceName(), className); |
return true; | return true; |
} | } |
else if (getInstanceNameElement(parser, objectName)) | else if (getInstanceNameElement(parser, objectName)) |