Skip to content

Configuring Library Descriptor

Siminov Framework edited this page Dec 25, 2015 · 23 revisions

Library Descriptor is the one who defines the properties of library.

               <!-- Design Of LibraryDescriptor.xml -->

    <library-descriptor>

        <!-- General Properties Of Library -->
            <!-- Mandatory Field -->
        <property name="name">name_of_library</property>
	
            <!-- Optional Field -->
        <property name="description">description_of_library</property>

	
        <!-- Entity Descriptors Needed Under This Library Descriptor -->
            <!-- Optional Field -->
                <!-- Entity Descriptors -->
        <entity-descriptors>
            <entity-descriptor>name_of_database_descriptor.full_path_of_entity_descriptor_file</entity-descriptor>
        </entity-descriptors>
	 
    </library-descriptor>
                   <!-- Android Sample: LibraryDescriptor.xml -->

    <library-descriptor>

        <property name="name">SIMINOV CORE LIBRARY SAMPLE</property>
        <property name="description">Siminov Core Library Sample</property>

        <entity-descriptors>
            <entity-descriptor>SIMINOV-CORE-SAMPLE.Credential.xml</entity-descriptor>
        </entity-descriptors>
	 
    </library-descriptor>
                  <!-- iOS Sample: LibraryDescriptor.xml -->

    <library-descriptor>

        <property name="name">SIMINOV CORE LIBRARY SAMPLE</property>
        <property name="description">Siminov Core Library Sample</property>

        <entity-descriptors>
            <entity-descriptor>SIMINOV-CORE-SAMPLE.Credential.xml</entity-descriptor>
        </entity-descriptors>
	 
    </library-descriptor>
                  <!-- Windows Sample: LibraryDescriptor.xml -->

    <library-descriptor>

        <property name="name">SIMINOV CORE LIBRARY SAMPLE</property>
        <property name="description">Siminov Core Library Sample</property>

        <entity-descriptors>
            <entity-descriptor>SIMINOV-CORE-SAMPLE.Credential.xml</entity-descriptor>
        </entity-descriptors>
	 
    </library-descriptor>

Note: Application Developer can provide their own properties also, and by using following API's they can use properties.

  • Get Properties - [Android:getProperties | iOS:getProperties | Windows:GetProperties]: It will return all properties associated with Library Descriptor.

  • Get Property - [Android:getProperty(Name-of-Property) | iOS:getProperty:Name-Of-Property | Windows:GetProperty(Name-Of-Property)]: It will return property value associated with property name provided.

  • Contains Property - [Android:containsProperty(Name-of-Property) | iOS:containsProperty:Name-of-Property | Windows:ContainsProperty(Name-of-Property)]: It will return TRUE/FALSE whether property exists or not.

  • Add Property - [Android:addProperty(Name-of-Property, Value-of-Property) | iOS:addProperty:Name-of-Property value:Value-of-Property | Windows:AddProperty(Name-of-Property, Value-of-Property)]: It will add new property to the collection of Library Descriptor properties.

  • Remove Property - [Android:removeProperty(Name-of-Property) | iOS:removeProperty:Name-of-Property | Windows:RemoveProperty(Name-of-Property)]: It will remove property from Library Descriptor properties based on name provided.

Library Descriptor Elements

1. General properties about library descriptor
  • name*: Name of library. It is mandatory field.

  • descriptor: Description of library. It is optional field.

2. Entity descriptor paths needed under this database descriptor.

Note

  • Provide entity descriptor file name and path.
3. Important points about library descriptor

Note

  • Library descriptor file name should be same as LibraryDescriptor.xml.

  • It should always be in root package specified in DatabaseDescriptor.xml file.

Android Sample: Library Descriptor


![Android Sample: Library Descriptor] (https://raw.github.com/Siminov/core/docs/github/v2.0/library_descriptor_path.android.png "Android Sample: Library Descriptor")


iOS Sample: Library Descriptor


![iOS Sample: Library Descriptor] (https://raw.github.com/Siminov/core/docs/github/v2.0/library_descriptor_path.ios.png "iOS Sample: Library Descriptor")


Windows Sample: Library Descriptor


![Windows Sample: Library Descriptor] (https://raw.github.com/Siminov/core/docs/github/v2.0/library_descriptor_path.windows.png "Windows Sample: Library Descriptor")