C# Class DataServer.BaseContent

Inheritance: PropertyChangedBase, IContent, IComparable, IConvertibleGeoJson, ITextSearchable
ファイルを表示 Open project: TNOCS/csTouch Class Usage Examples

Public Properties

Property Type Description
CalloutActions List
UpdateSensorData bool

Private Properties

Property Type Description
AppendPropertyToGeoJson void
CheckIcon void
LookupPropertyPoiTypeInPoITypes void
TriggerDeleted void
UppercaseFirst XName
allMedia_CollectionChanged void

Public Methods

Method Description
AddFilter ( string title, string label, string stringvalue = "", double numbervalue ) : Highlight
AddHighlighter ( string title, string label, string stringvalue = "" ) : Highlight

Create a highlighter. Note that you still need to add it to the Style.Analysis.

AddLocalMediaItem ( string pId, string img ) : void
AddMetaInfo ( string title, string source, MetaTypes type = MetaTypes.text, bool searchable = false, bool visibleInCallout = true, string section = "Info", List options = null, double minvalue = Double.NaN, double maxvalue = Double.NaN, string format = null, bool editActive = false, bool canEdit = true ) : MetaInfo

Add meta info to the PoIType.

AddMetaInfo ( string title, MetaTypes type = MetaTypes.text, bool searchable = false, bool callout = true, string section = "Info", List options = null, double minvalue = Double.NaN, double maxvalue = Double.NaN, string format = null, bool editActive = false, bool canEdit = true ) : void

Add meta info to the PoIType.

AddPosition ( Position myPosition, System.DateTime date, bool track = true ) : void
AddSensorData ( string sensor, System.DateTime date, double value, string description = "", bool trigger = true ) : void
CalculateVisible ( double p ) : void
CompareTo ( object obj ) : int
ForceUpdate ( bool triggerLabelChanged = false, bool triggerUpdatePosition = false ) : void

Update the effective style, optionally triggering a label changed and position changed.

FromGeoJson ( Newtonsoft.Json.Linq.JObject geoJsonObject, bool newObject = true ) : IConvertibleGeoJson
FromGeoJson ( string geoJson, bool newObject ) : IConvertibleGeoJson
FromXml ( System.Xml.Linq.XElement element ) : void
FromXml ( System.Xml.Linq.XElement element, string directoryName ) : void
FromXmlBase ( System.Xml.Linq.XElement &res, string directoryName ) : void
GetEffectiveAnalysis ( BaseContent p, AnalysisMetaInfo &a ) : void
GetMetaLabels ( ) : ObservableCollection
IconImageReceived ( string anId, byte content, Service s ) : void
IsVisibleInExtent ( BoundingBox t ) : bool
OnDataChanged ( string key, string old = "", string newvalue = "" ) : void
OnLabelChanged ( string key, string old = "", string newvalue = "" ) : void
Select ( ) : void
SetPosition ( double pLongitude, double pLatitude ) : void
StartRotation ( ) : void
ToGeoJson ( ) : string

Convert the PoI to a GeoJSON string.

ToXml ( ) : XElement
ToXml ( ServiceSettings settings ) : XElement
ToXmlBase ( ServiceSettings settings ) : XElement
TriggerChanged ( ) : void
TriggerItemsLeft ( ) : void
TriggerLabelChanged ( string key, string oldValue = "", string newValue = "" ) : void
TriggerPositionChanged ( ) : void
TriggerUpdated ( bool visibility = true ) : void
TypeFromGeoJson ( JProperty json ) : void
TypeToGeoJson ( ) : string

Convert the type information to JSON format.

UpdateAnalysisStyle ( ) : bool

Recalculate analysis style based on filters. Also resets the effective style.

UpdateEffectiveStyle ( ) : void
UpdateStyle ( BaseContent poiType, bool triggerLabelChanged = false, bool triggerUpdatePosition = false ) : void

Update the PoI's style, optionally triggering a label changed and position changed.

Protected Methods

Method Description
HasChanged ( ) : void

triggers changed event, for syncing content

OnDeleted ( ) : void

Private Methods

Method Description
AppendPropertyToGeoJson ( StringBuilder builder, PropertyInfo property, bool startWithComma = true ) : void
CheckIcon ( ) : void

Check if Icon exists, if not request it from service

LookupPropertyPoiTypeInPoITypes ( ) : void

Look up PoiTypeId in the Service.PoITypes (if found, property PoiType is set)

TriggerDeleted ( ) : void
UppercaseFirst ( XName x ) : XName
allMedia_CollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void

Method Details

AddFilter() public method

public AddFilter ( string title, string label, string stringvalue = "", double numbervalue ) : Highlight
title string
label string
stringvalue string
numbervalue double
return PoiServer.PoI.Highlight

AddHighlighter() public method

Create a highlighter. Note that you still need to add it to the Style.Analysis.
public AddHighlighter ( string title, string label, string stringvalue = "" ) : Highlight
title string
label string
stringvalue string
return PoiServer.PoI.Highlight

AddLocalMediaItem() public method

public AddLocalMediaItem ( string pId, string img ) : void
pId string
img string
return void

AddMetaInfo() public method

Add meta info to the PoIType.
public AddMetaInfo ( string title, string source, MetaTypes type = MetaTypes.text, bool searchable = false, bool visibleInCallout = true, string section = "Info", List options = null, double minvalue = Double.NaN, double maxvalue = Double.NaN, string format = null, bool editActive = false, bool canEdit = true ) : MetaInfo
title string Display title
source string Source label
type MetaTypes
searchable bool
visibleInCallout bool
section string
options List
minvalue double
maxvalue double
format string
editActive bool
canEdit bool
return MetaInfo

AddMetaInfo() public method

Add meta info to the PoIType.
public AddMetaInfo ( string title, MetaTypes type = MetaTypes.text, bool searchable = false, bool callout = true, string section = "Info", List options = null, double minvalue = Double.NaN, double maxvalue = Double.NaN, string format = null, bool editActive = false, bool canEdit = true ) : void
title string
type MetaTypes
searchable bool
callout bool
section string
options List
minvalue double
maxvalue double
format string
editActive bool
canEdit bool
return void

AddPosition() public method

public AddPosition ( Position myPosition, System.DateTime date, bool track = true ) : void
myPosition Position
date System.DateTime
track bool
return void

AddSensorData() public method

public AddSensorData ( string sensor, System.DateTime date, double value, string description = "", bool trigger = true ) : void
sensor string
date System.DateTime
value double
description string
trigger bool
return void

CalculateVisible() public method

public CalculateVisible ( double p ) : void
p double
return void

CompareTo() public method

public CompareTo ( object obj ) : int
obj object
return int

ForceUpdate() public method

Update the effective style, optionally triggering a label changed and position changed.
public ForceUpdate ( bool triggerLabelChanged = false, bool triggerUpdatePosition = false ) : void
triggerLabelChanged bool
triggerUpdatePosition bool
return void

FromGeoJson() public method

public FromGeoJson ( Newtonsoft.Json.Linq.JObject geoJsonObject, bool newObject = true ) : IConvertibleGeoJson
geoJsonObject Newtonsoft.Json.Linq.JObject
newObject bool
return IConvertibleGeoJson

FromGeoJson() public method

public FromGeoJson ( string geoJson, bool newObject ) : IConvertibleGeoJson
geoJson string
newObject bool
return IConvertibleGeoJson

FromXml() public method

public FromXml ( System.Xml.Linq.XElement element ) : void
element System.Xml.Linq.XElement
return void

FromXml() public method

public FromXml ( System.Xml.Linq.XElement element, string directoryName ) : void
element System.Xml.Linq.XElement
directoryName string
return void

FromXmlBase() public method

public FromXmlBase ( System.Xml.Linq.XElement &res, string directoryName ) : void
res System.Xml.Linq.XElement
directoryName string
return void

GetEffectiveAnalysis() public static method

public static GetEffectiveAnalysis ( BaseContent p, AnalysisMetaInfo &a ) : void
p BaseContent
a PoiServer.PoI.AnalysisMetaInfo
return void

GetMetaLabels() public method

public GetMetaLabels ( ) : ObservableCollection
return ObservableCollection

HasChanged() protected method

triggers changed event, for syncing content
protected HasChanged ( ) : void
return void

IconImageReceived() public method

public IconImageReceived ( string anId, byte content, Service s ) : void
anId string
content byte
s Service
return void

IsVisibleInExtent() public method

public IsVisibleInExtent ( BoundingBox t ) : bool
t BoundingBox
return bool

OnDataChanged() public method

public OnDataChanged ( string key, string old = "", string newvalue = "" ) : void
key string
old string
newvalue string
return void

OnDeleted() protected method

protected OnDeleted ( ) : void
return void

OnLabelChanged() public method

public OnLabelChanged ( string key, string old = "", string newvalue = "" ) : void
key string
old string
newvalue string
return void

Select() public method

public Select ( ) : void
return void

SetPosition() public method

public SetPosition ( double pLongitude, double pLatitude ) : void
pLongitude double
pLatitude double
return void

StartRotation() public method

public StartRotation ( ) : void
return void

ToGeoJson() public method

Convert the PoI to a GeoJSON string.
public ToGeoJson ( ) : string
return string

ToXml() public method

public ToXml ( ) : XElement
return XElement

ToXml() public method

public ToXml ( ServiceSettings settings ) : XElement
settings ServiceSettings
return XElement

ToXmlBase() public method

public ToXmlBase ( ServiceSettings settings ) : XElement
settings ServiceSettings
return XElement

TriggerChanged() public method

public TriggerChanged ( ) : void
return void

TriggerItemsLeft() public method

public TriggerItemsLeft ( ) : void
return void

TriggerLabelChanged() public method

public TriggerLabelChanged ( string key, string oldValue = "", string newValue = "" ) : void
key string
oldValue string
newValue string
return void

TriggerPositionChanged() public method

public TriggerPositionChanged ( ) : void
return void

TriggerUpdated() public method

public TriggerUpdated ( bool visibility = true ) : void
visibility bool
return void

TypeFromGeoJson() public method

public TypeFromGeoJson ( JProperty json ) : void
json JProperty
return void

TypeToGeoJson() public method

Convert the type information to JSON format.
public TypeToGeoJson ( ) : string
return string

UpdateAnalysisStyle() public method

Recalculate analysis style based on filters. Also resets the effective style.
public UpdateAnalysisStyle ( ) : bool
return bool

UpdateEffectiveStyle() public method

public UpdateEffectiveStyle ( ) : void
return void

UpdateStyle() public method

Update the PoI's style, optionally triggering a label changed and position changed.
public UpdateStyle ( BaseContent poiType, bool triggerLabelChanged = false, bool triggerUpdatePosition = false ) : void
poiType BaseContent
triggerLabelChanged bool
triggerUpdatePosition bool
return void

Property Details

CalloutActions public_oe property

public List CalloutActions
return List

UpdateSensorData public_oe property

public bool UpdateSensorData
return bool