mn8 Language Reference | Index    

OCS

SUMMARY: NO ATTRIBUTES  ELEMENTS SUMMARY  NO CONSTRUCTORS  NO OPERATORS  METHODS SUMMARYDETAIL: NO ATTRIBUTES  ELEMENT DETAILS  NO CONSTRUCTORS  NO OPERATORS  METHOD DETAILS

Description

Usage

        If you only want to get an OCS use the folowing:

          $x = OCS.getOCS( $url )

        for obtaining the xml use the toXML method ( $x.toXML )
        To get the changed OCS use this:

          $x = OCS.getChangedOCS( $url )

        in this case in the variable $x will return only the differencies between the concepts
        the changed OCS will be stored in your home directory

Version: 0.1
Authors:Antal Attila ()
Location:
Inherits: Concept

Element List

static home! TYPEOF String LABEL "home"
static diff! TYPEOF String LABEL "diff"
static file! TYPEOF String LABEL "file"
top

Method List

diffs (OCS:04 $h, OCS:04 $t)
OCS:channeldiffs (OCS:channel $h, OCS:channel $t)
static OCSgetChangedOCS (String $url)
static OCSgetOCS (String $url)
static setHomeDir (String $url)
Stringenlarge (String $h, String $s, String $p, Integer $i, String $f)
StringgetHead (OCS:channel $c, Integer $w, String $s, String $line)
toTXT
top
Methods inherited from: Concept
cloneConcept, extendsConcept, fromXML, getAllInheritedConcepts, getConceptAttribute, getConceptAttributeField, getConceptAttributeFields, getConceptAttributes, getConceptConstructors, getConceptElement, getConceptElementField, getConceptElementFields, getConceptElements, getConceptLabel, getConceptMethod, getConceptMethods, getConceptOperators, getConceptType, getErrorHandler, getInheritedConcepts, getResourceURI, hasConceptAttribute, hasConceptElement, hasConceptMethod, hasPath, isHidden, loadContent, setConceptLabel, setErrorHandler, setHidden, setShowEmpty, showEmpty, toTXT, toXML, setResourceURI

Detailed Element Info

home

Label:home
Type:String
Is Static:true
Is Hidden:true
Is Multi:false
Show Empty:true

Hidden element to store the home directory info

top

diff

Label:diff
Type:String
Is Static:true
Is Hidden:true
Is Multi:false
Show Empty:true

Hidden element to store your diff file name and path

top

file

Label:file
Type:String
Is Static:true
Is Hidden:true
Is Multi:false
Show Empty:true

Hidden element to store your OCS file name and path

top

Detailed Method Info

diffs (OCS:04 $h, OCS:04 $t)
Parameters:
$h :Previuosly stored OCS concept
$t :Newer OCS concept
Returns:

Calculate differeces between two OCS concept

top
diffs (OCS:channel $h, OCS:channel $t)
Parameters:
$h :Channel element from the previuosly stored OCS Concept
$t :Channel element from the newer OCS concept
Returns: OCS:channel

Calculate differences between two OCS channel element

top
static getChangedOCS (String $url)
Parameters:
$url :The url string to OCS
Returns: OCS

Method to get the changed OCS. It will be stored in the .mn8/OCS directory in your home directory. Returns only the differences between de newer and the previuosly stored OCS

top
static getOCS (String $url)
Parameters:
$url :The url string to OCS
Returns: OCS

Method to get an OCS from url. Returns the OCS

top
static setHomeDir (String $url)
Parameters:
$url :URL to home directory
Returns:

Sets the OCS file names and its locations to store

top
enlarge (String $h, String $s, String $p, Integer $i, String $f)
Parameters:
$h :Header string for starts a line
$s :The line base string
$p :Pattern character to fill the rest of line
$i :Total line width
$f :Line ending footer string
Returns: String

Helper method to enlarge the size of the line to a fix width. Make enalrging with using the pattern character to fill the rest of the line. Finally appends the header and the footer strings to this line.

top
getHead (OCS:channel $c, Integer $w, String $s, String $line)
Parameters:
$c :Channel concept with header
$w :Total line width
$s :String to identify a header
$line :Simple line string to separate other lines
Returns: String

Gets header informations from the OCS concept

top
toTXT
Returns:

Creates a text representation from the OCS concept

top